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

    YANG Description: The specifies the type of the media plugged in
for this interface.

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

    YANG Description: The specifies the type of the media plugged in
for this interface.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'cfp2': {'value': 17}, u'gbic': {'value': 2}, u'qsfp': {'value': 12}, u'unknown': {'value': 1}, u'sfp': {'value': 4}, u'xff': {'value': 6}, u'qsfpp': {'value': 13}, u'xfp-e': {'value': 7}, u'xfp': {'value': 5}, u'fixed': {'value': 3}, u'cfp': {'value': 14}},), is_leaf=True, yang_name="media-type", rest_name="media-type", 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': """media_type 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'cfp2': {'value': 17}, u'gbic': {'value': 2}, u'qsfp': {'value': 12}, u'unknown': {'value': 1}, u'sfp': {'value': 4}, u'xff': {'value': 6}, u'qsfpp': {'value': 13}, u'xfp-e': {'value': 7}, u'xfp': {'value': 5}, u'fixed': {'value': 3}, u'cfp': {'value': 14}},), is_leaf=True, yang_name="media-type", rest_name="media-type", 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.__media_type = t
    if hasattr(self, '_set'):
      self._set()