def _set_if_state(self, v, load=False):
    """
    Setter method for if_state, mapped from YANG variable /brocade_xstp_ext_rpc/get_stp_mst_detail/output/cist/port/if_state (stp-port-state)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_if_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_if_state() directly.

    YANG Description: Interface state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'listening': {'value': 4}, u'discarding': {'value': 7}, u'disabled': {'value': 2}, u'learning': {'value': 5}, u'error': {'value': 1}, u'forwarding': {'value': 6}, u'blocking': {'value': 3}},), is_leaf=True, yang_name="if-state", rest_name="if-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-xstp-ext', defining_module='brocade-xstp-ext', yang_type='stp-port-state', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """if_state must be of a type compatible with stp-port-state""",
          'defined-type': "brocade-xstp-ext:stp-port-state",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'listening': {'value': 4}, u'discarding': {'value': 7}, u'disabled': {'value': 2}, u'learning': {'value': 5}, u'error': {'value': 1}, u'forwarding': {'value': 6}, u'blocking': {'value': 3}},), is_leaf=True, yang_name="if-state", rest_name="if-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-xstp-ext', defining_module='brocade-xstp-ext', yang_type='stp-port-state', is_config=True)""",
        })

    self.__if_state = t
    if hasattr(self, '_set'):
      self._set()
Setter method for if_state, mapped from YANG variable /brocade_xstp_ext_rpc/get_stp_mst_detail/output/cist/port/if_state (stp-port-state)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_if_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_if_state() directly.

    YANG Description: Interface state