Package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.acm.rev180214.nacm.rule.list
Interface Rule
-
- All Superinterfaces:
org.opendaylight.yangtools.yang.binding.Augmentable<Rule>,org.opendaylight.yangtools.yang.binding.BindingObject,org.opendaylight.yangtools.yang.binding.ChildOf<RuleList>,org.opendaylight.yangtools.yang.binding.DataContainer,org.opendaylight.yangtools.yang.binding.DataObject,org.opendaylight.yangtools.yang.binding.Identifiable<RuleKey>
@Generated("mdsal-binding-generator") public interface Rule extends org.opendaylight.yangtools.yang.binding.ChildOf<RuleList>, org.opendaylight.yangtools.yang.binding.Augmentable<Rule>, org.opendaylight.yangtools.yang.binding.Identifiable<RuleKey>
One access control rule. Rules are processed in user-defined order until a is found. A rule matches if 'module-name', 'rule-type', and 'access-operations' match the request. If a rule matches, the 'action' leaf determines whether or not access is granted.This class represents the following YANG schema fragment defined in module ietf-netconf-acm
list rule { key name; ordered-by user; leaf name { type string { length 1..max; } } leaf module-name { type union { type matchall-string-type; type string; } default *; } choice rule-type { case protocol-operation { leaf rpc-name { type union { type matchall-string-type; type string; } } } case notification { leaf notification-name { type union { type matchall-string-type; type string; } } } case data-node { leaf path { type node-instance-identifier; } } } leaf access-operations { type union { type matchall-string-type; type access-operations-type; } default *; } leaf action { type action-type; } leaf comment { type string; } }The schema path to identify an instance is ietf-netconf-acmnacmrule-listruleTo create instances of this class use
RuleBuilder.- See Also:
RuleBuilder,RuleKey
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRule.AccessOperationsstatic classRule.ModuleName
-
Field Summary
Fields Modifier and Type Field Description static @NonNull org.opendaylight.yangtools.yang.common.QNameQNAME
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static booleanbindingEquals(@NonNull Rule thisObj, Object obj)Default implementation ofObject.equals(Object)contract for this interface.static intbindingHashCode(@NonNull Rule obj)Default implementation ofObject.hashCode()contract for this interface.static StringbindingToString(@NonNull Rule obj)Default implementation ofObject.toString()contract for this interface.Rule.AccessOperationsgetAccessOperations()Return accessOperations, ornullif it is not present.ActionTypegetAction()Return action, ornullif it is not present.StringgetComment()Return comment, ornullif it is not present.Rule.ModuleNamegetModuleName()Return moduleName, ornullif it is not present.StringgetName()Return name, ornullif it is not present.RuleTypegetRuleType()Return ruleType, ornullif it is not present.default Class<Rule>implementedInterface()RuleKeykey()default @NonNull Rule.AccessOperationsrequireAccessOperations()Return accessOperations, guaranteed to be non-null.default @NonNull ActionTyperequireAction()Return action, guaranteed to be non-null.default @NonNull StringrequireComment()Return comment, guaranteed to be non-null.default @NonNull Rule.ModuleNamerequireModuleName()Return moduleName, guaranteed to be non-null.default @NonNull StringrequireName()Return name, guaranteed to be non-null.
-
-
-
Method Detail
-
implementedInterface
default Class<Rule> implementedInterface()
- Specified by:
implementedInterfacein interfaceorg.opendaylight.yangtools.yang.binding.DataContainer- Specified by:
implementedInterfacein interfaceorg.opendaylight.yangtools.yang.binding.DataObject
-
bindingHashCode
static int bindingHashCode(@NonNull Rule obj)
Default implementation ofObject.hashCode()contract for this interface. Implementations of this interface are encouraged to defer to this method to get consistent hashing results across all implementations.- Parameters:
obj- Object for which to generate hashCode() result.- Returns:
- Hash code value of data modeled by this interface.
- Throws:
NullPointerException- ifobjis null
-
bindingEquals
static boolean bindingEquals(@NonNull Rule thisObj, Object obj)
Default implementation ofObject.equals(Object)contract for this interface. Implementations of this interface are encouraged to defer to this method to get consistent equality results across all implementations.- Parameters:
thisObj- Object acting as the receiver of equals invocationobj- Object acting as argument to equals invocation- Returns:
- True if thisObj and obj are considered equal
- Throws:
NullPointerException- ifthisObjis null
-
bindingToString
static String bindingToString(@NonNull Rule obj)
Default implementation ofObject.toString()contract for this interface. Implementations of this interface are encouraged to defer to this method to get consistent string representations across all implementations.- Parameters:
obj- Object for which to generate toString() result.- Returns:
Stringvalue of data modeled by this interface.- Throws:
NullPointerException- ifobjis null
-
key
RuleKey key()
- Specified by:
keyin interfaceorg.opendaylight.yangtools.yang.binding.Identifiable<RuleKey>
-
getName
String getName()
Return name, ornullif it is not present.Arbitrary name assigned to the rule.- Returns:
Stringname, ornullif it is not present.
-
requireName
default @NonNull String requireName()
Return name, guaranteed to be non-null.Arbitrary name assigned to the rule.- Returns:
Stringname, guaranteed to be non-null.- Throws:
NoSuchElementException- if name is not present
-
getModuleName
Rule.ModuleName getModuleName()
Return moduleName, ornullif it is not present.Name of the module associated with this rule. This leaf matches if it has the value '*' or if the object being accessed is defined in the module with the specified module name.- Returns:
ModuleNamemoduleName, ornullif it is not present.
-
requireModuleName
default @NonNull Rule.ModuleName requireModuleName()
Return moduleName, guaranteed to be non-null.Name of the module associated with this rule. This leaf matches if it has the value '*' or if the object being accessed is defined in the module with the specified module name.- Returns:
ModuleNamemoduleName, guaranteed to be non-null.- Throws:
NoSuchElementException- if moduleName is not present
-
getRuleType
RuleType getRuleType()
Return ruleType, ornullif it is not present.This choice matches if all leafs present in the rule match the request. If no leafs are present, the choice matches all requests.- Returns:
RuleTyperuleType, ornullif it is not present.
-
getAccessOperations
Rule.AccessOperations getAccessOperations()
Return accessOperations, ornullif it is not present.Access operations associated with this rule. This leaf matches if it has the value '*' or if the bit corresponding to the requested operation is set.- Returns:
AccessOperationsaccessOperations, ornullif it is not present.
-
requireAccessOperations
default @NonNull Rule.AccessOperations requireAccessOperations()
Return accessOperations, guaranteed to be non-null.Access operations associated with this rule. This leaf matches if it has the value '*' or if the bit corresponding to the requested operation is set.- Returns:
AccessOperationsaccessOperations, guaranteed to be non-null.- Throws:
NoSuchElementException- if accessOperations is not present
-
getAction
ActionType getAction()
Return action, ornullif it is not present.The access control action associated with the rule. If a rule has been determined to match a particular request, then this object is used to determine whether to permit or deny the request.- Returns:
ActionTypeaction, ornullif it is not present.
-
requireAction
default @NonNull ActionType requireAction()
Return action, guaranteed to be non-null.The access control action associated with the rule. If a rule has been determined to match a particular request, then this object is used to determine whether to permit or deny the request.- Returns:
ActionTypeaction, guaranteed to be non-null.- Throws:
NoSuchElementException- if action is not present
-
getComment
String getComment()
Return comment, ornullif it is not present.A textual description of the access rule.- Returns:
Stringcomment, ornullif it is not present.
-
requireComment
default @NonNull String requireComment()
Return comment, guaranteed to be non-null.A textual description of the access rule.- Returns:
Stringcomment, guaranteed to be non-null.- Throws:
NoSuchElementException- if comment is not present
-
-