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-listrule

    To create instances of this class use RuleBuilder.

    See Also:
    RuleBuilder, RuleKey
    • Field Detail

      • QNAME

        static final @NonNull org.opendaylight.yangtools.yang.common.QName QNAME
    • Method Detail

      • implementedInterface

        default Class<Rule> implementedInterface()
        Specified by:
        implementedInterface in interface org.opendaylight.yangtools.yang.binding.DataContainer
        Specified by:
        implementedInterface in interface org.opendaylight.yangtools.yang.binding.DataObject
      • bindingHashCode

        static int bindingHashCode​(@NonNull Rule obj)
        Default implementation of Object.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 - if obj is null
      • bindingEquals

        static boolean bindingEquals​(@NonNull Rule thisObj,
                                     Object obj)
        Default implementation of Object.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 invocation
        obj - Object acting as argument to equals invocation
        Returns:
        True if thisObj and obj are considered equal
        Throws:
        NullPointerException - if thisObj is null
      • bindingToString

        static String bindingToString​(@NonNull Rule obj)
        Default implementation of Object.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:
        String value of data modeled by this interface.
        Throws:
        NullPointerException - if obj is null
      • key

        RuleKey key()
        Specified by:
        key in interface org.opendaylight.yangtools.yang.binding.Identifiable<RuleKey>
      • getName

        String getName()
        Return name, or null if it is not present.
             
                 Arbitrary name assigned to the rule.
             
         
        Returns:
        String name, or null if it is not present.
      • requireName

        default @NonNull String requireName()
        Return name, guaranteed to be non-null.
             
                 Arbitrary name assigned to the rule.
             
         
        Returns:
        String name, guaranteed to be non-null.
        Throws:
        NoSuchElementException - if name is not present
      • getModuleName

        Rule.ModuleName getModuleName()
        Return moduleName, or null if 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:
        ModuleName moduleName, or null if 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:
        ModuleName moduleName, guaranteed to be non-null.
        Throws:
        NoSuchElementException - if moduleName is not present
      • getRuleType

        RuleType getRuleType()
        Return ruleType, or null if 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:
        RuleType ruleType, or null if it is not present.
      • getAccessOperations

        Rule.AccessOperations getAccessOperations()
        Return accessOperations, or null if 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:
        AccessOperations accessOperations, or null if 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:
        AccessOperations accessOperations, guaranteed to be non-null.
        Throws:
        NoSuchElementException - if accessOperations is not present
      • getAction

        ActionType getAction()
        Return action, or null if 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:
        ActionType action, or null if 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:
        ActionType action, guaranteed to be non-null.
        Throws:
        NoSuchElementException - if action is not present
      • getComment

        String getComment()
        Return comment, or null if it is not present.
             
                 A textual description of the access rule.
             
         
        Returns:
        String comment, or null if it is not present.
      • requireComment

        default @NonNull String requireComment()
        Return comment, guaranteed to be non-null.
             
                 A textual description of the access rule.
             
         
        Returns:
        String comment, guaranteed to be non-null.
        Throws:
        NoSuchElementException - if comment is not present