Setter method for trigger_mode, mapped from YANG variable /rbridge_id/event_handler/activate/name/trigger_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_mode() directly.

def _set_trigger_mode(self, v, load=False):
    """
    Setter method for trigger_mode, mapped from YANG variable /rbridge_id/event_handler/activate/name/trigger_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_trigger_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_trigger_mode() directly.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'each-instance': {'value': 1}, u'only-once': {'value': 3}, u'on-first-instance': {'value': 2}},), default=unicode("each-instance"), is_leaf=True, yang_name="trigger-mode", rest_name="trigger-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Trigger-mode controls how the action is launched with the configured event trigger (default = each-instance).'}}, namespace='urn:brocade.com:mgmt:brocade-event-handler', defining_module='brocade-event-handler', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """trigger_mode must be of a type compatible with enumeration""",
          'defined-type': "brocade-event-handler:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'each-instance': {'value': 1}, u'only-once': {'value': 3}, u'on-first-instance': {'value': 2}},), default=unicode("each-instance"), is_leaf=True, yang_name="trigger-mode", rest_name="trigger-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Trigger-mode controls how the action is launched with the configured event trigger (default = each-instance).'}}, namespace='urn:brocade.com:mgmt:brocade-event-handler', defining_module='brocade-event-handler', yang_type='enumeration', is_config=True)""",
        })

    self.__trigger_mode = t
    if hasattr(self, '_set'):
      self._set()