Setter method for desire_distance, mapped from YANG variable /interface/fc_port/desire_distance (desire-distance-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_desire_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_desire_distance() directly.

def _set_desire_distance(self, v, load=False):
    """
    Setter method for desire_distance, mapped from YANG variable /interface/fc_port/desire_distance (desire-distance-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_desire_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_desire_distance() directly.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="desire-distance", rest_name="desire-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure Desired distance for LS and LD mode.', u'hidden': u'full', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='desire-distance-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """desire_distance must be of a type compatible with desire-distance-type""",
          'defined-type': "brocade-interface:desire-distance-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_size=32), is_leaf=True, yang_name="desire-distance", rest_name="desire-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure Desired distance for LS and LD mode.', u'hidden': u'full', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='desire-distance-type', is_config=True)""",
        })

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