Setter method for bgp_state, mapped from YANG variable /bgp_state/neighbor/evpn/bgp_state (bgp-states)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bgp_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bgp_state() directly.

    YANG Description: BGP state

def _set_bgp_state(self, v, load=False):
    """
    Setter method for bgp_state, mapped from YANG variable /bgp_state/neighbor/evpn/bgp_state (bgp-states)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_bgp_state is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_bgp_state() directly.

    YANG Description: BGP state
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'established': {'value': 6}, u'open-sent': {'value': 4}, u'no-state': {'value': 0}, u'idle': {'value': 1}, u'active': {'value': 3}, u'connect-state': {'value': 2}, u'open-confirm': {'value': 5}},), is_leaf=True, yang_name="bgp-state", rest_name="bgp-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-bgp-operational', defining_module='brocade-bgp-operational', yang_type='bgp-states', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """bgp_state must be of a type compatible with bgp-states""",
          'defined-type': "brocade-bgp-operational:bgp-states",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'established': {'value': 6}, u'open-sent': {'value': 4}, u'no-state': {'value': 0}, u'idle': {'value': 1}, u'active': {'value': 3}, u'connect-state': {'value': 2}, u'open-confirm': {'value': 5}},), is_leaf=True, yang_name="bgp-state", rest_name="bgp-state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='urn:brocade.com:mgmt:brocade-bgp-operational', defining_module='brocade-bgp-operational', yang_type='bgp-states', is_config=False)""",
        })

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