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

def _set_long_distance(self, v, load=False):
    """
    Setter method for long_distance, mapped from YANG variable /interface/fc_port/long_distance (fc-long-distance-cfg-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_long_distance is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_long_distance() directly.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'ld': {'value': 5}, u'le': {'value': 3}, u'ls': {'value': 6}, u'l0': {'value': 0}},), default=unicode("l0"), is_leaf=True, yang_name="long-distance", rest_name="long-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure Long Distance', u'hidden': u'full', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='fc-long-distance-cfg-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """long_distance must be of a type compatible with fc-long-distance-cfg-type""",
          'defined-type': "brocade-interface:fc-long-distance-cfg-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'ld': {'value': 5}, u'le': {'value': 3}, u'ls': {'value': 6}, u'l0': {'value': 0}},), default=unicode("l0"), is_leaf=True, yang_name="long-distance", rest_name="long-distance", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure Long Distance', u'hidden': u'full', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-interface', defining_module='brocade-interface', yang_type='fc-long-distance-cfg-type', is_config=True)""",
        })

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