Setter method for alarm_sample, mapped from YANG variable /rmon/alarm_entry/alarm_sample (alarm-sample-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alarm_sample is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alarm_sample() directly.

def _set_alarm_sample(self, v, load=False):
    """
    Setter method for alarm_sample, mapped from YANG variable /rmon/alarm_entry/alarm_sample (alarm-sample-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_alarm_sample is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_alarm_sample() 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'delta': {'value': 2}, u'absolute': {'value': 1}},), is_leaf=True, yang_name="alarm-sample", rest_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-drop-node-name': None, u'alt-name': u'type', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-rmon', defining_module='brocade-rmon', yang_type='alarm-sample-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """alarm_sample must be of a type compatible with alarm-sample-type""",
          'defined-type': "brocade-rmon:alarm-sample-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'delta': {'value': 2}, u'absolute': {'value': 1}},), is_leaf=True, yang_name="alarm-sample", rest_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-drop-node-name': None, u'alt-name': u'type', u'cli-incomplete-command': None}}, namespace='urn:brocade.com:mgmt:brocade-rmon', defining_module='brocade-rmon', yang_type='alarm-sample-type', is_config=True)""",
        })

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