def _set_restricted_role(self, v, load=False):
    """
    Setter method for restricted_role, mapped from YANG variable /interface/port_channel/spanning_tree/restricted_role (empty)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restricted_role is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restricted_role() directly.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="restricted-role", rest_name="restricted-role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'Restrict the role of the port', u'display-when': u'(/protocol/spanning-tree/mstp) '}}, namespace='urn:brocade.com:mgmt:brocade-xstp', defining_module='brocade-xstp', yang_type='empty', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """restricted_role must be of a type compatible with empty""",
          'defined-type': "empty",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="restricted-role", rest_name="restricted-role", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'cli-full-command': None, u'info': u'Restrict the role of the port', u'display-when': u'(/protocol/spanning-tree/mstp) '}}, namespace='urn:brocade.com:mgmt:brocade-xstp', defining_module='brocade-xstp', yang_type='empty', is_config=True)""",
        })

    self.__restricted_role = t
    if hasattr(self, '_set'):
      self._set()
Setter method for restricted_role, mapped from YANG variable /interface/port_channel/spanning_tree/restricted_role (empty)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_restricted_role is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_restricted_role() directly.