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

    YANG Description: This indicates the type of encoding used to
transmit the data on 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'sonet-scrambled': {'value': 9}, u'4b5b': {'value': 6}, u'rz': {'value': 1}, u'8b10b': {'value': 4}, u'nrz': {'value': 2}, u'sonet': {'value': 3}, u'manchester': {'value': 7}, u'unknown': {'value': 10}, u'64b66b': {'value': 5}, u'ieee-802-3ab': {'value': 8}},), is_leaf=True, yang_name="encoding", rest_name="encoding", parent=self, choice=(u'interface-identifier', u'qsfpp'), 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': """encoding 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'sonet-scrambled': {'value': 9}, u'4b5b': {'value': 6}, u'rz': {'value': 1}, u'8b10b': {'value': 4}, u'nrz': {'value': 2}, u'sonet': {'value': 3}, u'manchester': {'value': 7}, u'unknown': {'value': 10}, u'64b66b': {'value': 5}, u'ieee-802-3ab': {'value': 8}},), is_leaf=True, yang_name="encoding", rest_name="encoding", parent=self, choice=(u'interface-identifier', u'qsfpp'), 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.__encoding = t
    if hasattr(self, '_set'):
      self._set()
Setter method for encoding, mapped from YANG variable /brocade_interface_ext_rpc/get_media_detail/output/interface/qsfpp/encoding (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_encoding is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_encoding() directly.

    YANG Description: This indicates the type of encoding used to
transmit the data on this interface.