Setter method for port_mode, mapped from YANG variable /brocade_interface_ext_rpc/get_interface_detail/output/interface/port_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_mode() directly.

    YANG Description: This indicates operational mode of this 
interface. This is applicable only for physical
interfaces/port channel interfaces.

def _set_port_mode(self, v, load=False):
    """
    Setter method for port_mode, mapped from YANG variable /brocade_interface_ext_rpc/get_interface_detail/output/interface/port_mode (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_port_mode is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_port_mode() directly.

    YANG Description: This indicates operational mode of this 
interface. This is applicable only for physical
interfaces/port channel interfaces.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'unknown': {'value': 0}, u'l2': {'value': 2}, u'l3': {'value': 1}, u'mirror': {'value': 3}},), is_leaf=True, yang_name="port-mode", rest_name="port-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-interface-ext', defining_module='brocade-interface-ext', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """port_mode must be of a type compatible with enumeration""",
          'defined-type': "brocade-interface-ext:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'unknown': {'value': 0}, u'l2': {'value': 2}, u'l3': {'value': 1}, u'mirror': {'value': 3}},), is_leaf=True, yang_name="port-mode", rest_name="port-mode", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-interface-ext', defining_module='brocade-interface-ext', yang_type='enumeration', is_config=True)""",
        })

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