module yumaworks-event-filter {

  namespace "http://yumaworks.com/ns/yumaworks-event-filter";

  prefix "ef";

  import yuma-types { prefix yt; }

  import yuma-ncx { prefix ncx; }

  organization "YumaWorks, Inc.";

  contact
    "Support <support@yumaworks.com>";

  description
    "This module contains data structures representing
     notification event filters to be applied to
     the generation of events into a notification stream.

     Copyright (c) 2012 - 2014 YumaWorks, Inc. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the BSD 3-Clause License
     http://opensource.org/licenses/BSD-3-Clause";

  revision 2014-02-09 {
    description
       "Updated for implementation";
  }

  revision 2012-08-17 {
    description
       "Initial version";
  }

  container event-filters {
     description
       "Notification event source filters";
     ncx:sil-delete-children-first;
     presence
      "If this node is present then the event filtering
       service is enabled.";

     list event-filter {
      description
        "A list of notification event filters.";

      key "module event";

      leaf module {
        type yt:NcxName;
        description
          "The YANG module name for the this entry.";
      }

      leaf event {
        type yt:NcxName;
        description
          "The notification event name for this entry.";
      }

      leaf enabled {
        type boolean;
        description
          "If 'true' then this notification event is enabled.
           If 'false' then this notification event is disabled
           and no events of this type will be saved in the
           replay buffer.";
        default false;
      }

      leaf log-drops {
        type boolean;
        description
          "If 'true' then dropped events will generate a log entry.
           If 'false', then dropped events will not generate
           a log entry.";
        default false;
      }

      /*  TBD: not implemented!!!
      leaf max-rate {
        type uint32;
        default 0;
        units "events-per-minute";
        description
          "The maximum number of notifications of the specified
           event type to generate per minute.
           The value 0 indicates that no notifications of this
           event type will be generated.";
      }
      */
    }
  }

}
