All Superinterfaces:
org.opendaylight.yangtools.yang.binding.Augmentable<PolicyDefinition>, org.opendaylight.yangtools.yang.binding.BindingContract<org.opendaylight.yangtools.yang.binding.DataContainer>, org.opendaylight.yangtools.yang.binding.BindingObject, org.opendaylight.yangtools.yang.binding.ChildOf<PolicyDefinitions>, org.opendaylight.yangtools.yang.binding.DataContainer, org.opendaylight.yangtools.yang.binding.DataObject, org.opendaylight.yangtools.yang.binding.KeyAware<PolicyDefinitionKey>

@Generated("mdsal-binding-generator") public interface PolicyDefinition extends org.opendaylight.yangtools.yang.binding.ChildOf<PolicyDefinitions>, org.opendaylight.yangtools.yang.binding.Augmentable<PolicyDefinition>, org.opendaylight.yangtools.yang.binding.KeyAware<PolicyDefinitionKey>
List of top-level policy definitions, keyed by unique name. These policy definitions are expected to be referenced (by name) in policy chains specified in import or export configuration statements.

This class represents the following YANG schema fragment defined in module openconfig-routing-policy

 list policy-definition {
   key name;
   leaf name {
     type string;
   }
   container statements {
     list statement {
       key name;
       ordered-by user;
       leaf name {
         type string;
       }
       container conditions {
         leaf call-policy {
           type leafref {
             path /rpol:routing-policy/rpol:policy-definitions/rpol:policy-definition/rpol:name;
           }
         }
         uses generic-conditions;
         uses igp-conditions;
       }
       container actions {
         uses generic-actions;
         uses igp-actions;
       }
     }
   }
 }
 

To create instances of this class use PolicyDefinitionBuilder.

See Also:
  • Field Details

    • QNAME

      static final @NonNull org.opendaylight.yangtools.yang.common.QName QNAME
      YANG identifier of the statement represented by this class.
  • Method Details

    • implementedInterface

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

      static int bindingHashCode(@NonNull PolicyDefinition 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 PolicyDefinition 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 PolicyDefinition 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

      Specified by:
      key in interface org.opendaylight.yangtools.yang.binding.KeyAware<PolicyDefinitionKey>
    • getName

      String getName()
      Return name, or null if it is not present.
           
               Name of the top-level policy definition -- this name is used in references to
               the current policy
           
       
      Returns:
      String name, or null if it is not present.
    • requireName

      default @NonNull String requireName()
      Return name, guaranteed to be non-null.
           
               Name of the top-level policy definition -- this name is used in references to
               the current policy
           
       
      Returns:
      String name, guaranteed to be non-null.
      Throws:
      NoSuchElementException - if name is not present
    • getStatements

      Statements getStatements()
      Return statements, or null if it is not present.
           
               Enclosing container for policy statements
           
       
      Returns:
      Statements statements, or null if it is not present.
    • nonnullStatements

      @NonNull Statements nonnullStatements()
      Return statements, or an empty instance if it is not present.
      Returns:
      Statements statements, or an empty instance if it is not present.