text: # -*- coding: utf-8 -*-
  from operator import attrgetter
  from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
  from pyangbind.lib.yangtypes import RestrictedClassType
  from pyangbind.lib.yangtypes import TypedListType
  from pyangbind.lib.yangtypes import YANGBool
  from pyangbind.lib.yangtypes import YANGListType
  from pyangbind.lib.yangtypes import YANGDynClass
  from pyangbind.lib.yangtypes import ReferenceType
  from pyangbind.lib.base import PybindBase
  from collections import OrderedDict
  from decimal import Decimal
  from bitarray import bitarray
  import six
  
  # PY3 support of some PY2 keywords (needs improved)
  if six.PY3:
      import builtins as __builtin__
  
      long = int
  elif six.PY2:
      import __builtin__
  
  from . import config
  from . import state
  from . import graceful_restart
  from . import apply_policy
  from . import ipv4_unicast
  from . import ipv6_unicast
  from . import ipv4_labeled_unicast
  from . import ipv6_labeled_unicast
  from . import l3vpn_ipv4_unicast
  from . import l3vpn_ipv6_unicast
  from . import l3vpn_ipv4_multicast
  from . import l3vpn_ipv6_multicast
  from . import l2vpn_vpls
  from . import l2vpn_evpn
  from . import use_multiple_paths
  
  
  class afi_safi(PybindBase):
      """
    This class was auto-generated by the PythonClass plugin for PYANG
    from YANG module openconfig-network-instance - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi. Each member element of
    the container is represented as a class variable - with a specific
    YANG type.
  
    YANG Description: AFI,SAFI configuration available for the
  neighbour or group
    """
      __slots__ = (
          "_path_helper",
          "_extmethods",
          "__afi_safi_name",
          "__config",
          "__state",
          "__graceful_restart",
          "__apply_policy",
          "__ipv4_unicast",
          "__ipv6_unicast",
          "__ipv4_labeled_unicast",
          "__ipv6_labeled_unicast",
          "__l3vpn_ipv4_unicast",
          "__l3vpn_ipv6_unicast",
          "__l3vpn_ipv4_multicast",
          "__l3vpn_ipv6_multicast",
          "__l2vpn_vpls",
          "__l2vpn_evpn",
          "__use_multiple_paths",
      )
  
      _yang_name = "afi-safi"
  
      _pybind_generated_by = "container"
  
      def __init__(self, *args, **kwargs):
  
          self._path_helper = False
  
          self._extmethods = False
          self.__afi_safi_name = YANGDynClass(
              base=six.text_type,
              is_leaf=True,
              yang_name="afi-safi-name",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              is_keyval=True,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="leafref",
              is_config=True,
          )
          self.__config = YANGDynClass(
              base=config.config,
              is_container="container",
              yang_name="config",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__state = YANGDynClass(
              base=state.state,
              is_container="container",
              yang_name="state",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__graceful_restart = YANGDynClass(
              base=graceful_restart.graceful_restart,
              is_container="container",
              yang_name="graceful-restart",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__apply_policy = YANGDynClass(
              base=apply_policy.apply_policy,
              is_container="container",
              yang_name="apply-policy",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv4_unicast = YANGDynClass(
              base=ipv4_unicast.ipv4_unicast,
              is_container="container",
              yang_name="ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv6_unicast = YANGDynClass(
              base=ipv6_unicast.ipv6_unicast,
              is_container="container",
              yang_name="ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv4_labeled_unicast = YANGDynClass(
              base=ipv4_labeled_unicast.ipv4_labeled_unicast,
              is_container="container",
              yang_name="ipv4-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv6_labeled_unicast = YANGDynClass(
              base=ipv6_labeled_unicast.ipv6_labeled_unicast,
              is_container="container",
              yang_name="ipv6-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv4_unicast = YANGDynClass(
              base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast,
              is_container="container",
              yang_name="l3vpn-ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv6_unicast = YANGDynClass(
              base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast,
              is_container="container",
              yang_name="l3vpn-ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv4_multicast = YANGDynClass(
              base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast,
              is_container="container",
              yang_name="l3vpn-ipv4-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv6_multicast = YANGDynClass(
              base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast,
              is_container="container",
              yang_name="l3vpn-ipv6-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l2vpn_vpls = YANGDynClass(
              base=l2vpn_vpls.l2vpn_vpls,
              is_container="container",
              yang_name="l2vpn-vpls",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l2vpn_evpn = YANGDynClass(
              base=l2vpn_evpn.l2vpn_evpn,
              is_container="container",
              yang_name="l2vpn-evpn",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__use_multiple_paths = YANGDynClass(
              base=use_multiple_paths.use_multiple_paths,
              is_container="container",
              yang_name="use-multiple-paths",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
          load = kwargs.pop("load", None)
          if args:
              if len(args) > 1:
                  raise TypeError("cannot create a YANG container with >1 argument")
              all_attr = True
              for e in self._pyangbind_elements:
                  if not hasattr(args[0], e):
                      all_attr = False
                      break
              if not all_attr:
                  raise ValueError("Supplied object did not have the correct attributes")
              for e in self._pyangbind_elements:
                  nobj = getattr(args[0], e)
                  if nobj._changed() is False:
                      continue
                  setmethod = getattr(self, "_set_%s" % e)
                  if load is None:
                      setmethod(getattr(args[0], e))
                  else:
                      setmethod(getattr(args[0], e), load=load)
  
      def _path(self):
          if hasattr(self, "_parent"):
              return self._parent._path() + [self._yang_name]
          else:
              return [
                  "network-instances",
                  "network-instance",
                  "protocols",
                  "protocol",
                  "bgp",
                  "neighbors",
                  "neighbor",
                  "afi-safis",
                  "afi-safi",
              ]
  
      def _get_afi_safi_name(self):
          """
      Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/afi_safi_name (leafref)
  
      YANG Description: Reference to the AFI-SAFI name used as a key
  for the AFI-SAFI list
      """
          return self.__afi_safi_name
  
      def _set_afi_safi_name(self, v, load=False):
          """
      Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/afi_safi_name (leafref)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_afi_safi_name is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_afi_safi_name() directly.
  
      YANG Description: Reference to the AFI-SAFI name used as a key
  for the AFI-SAFI list
      """
          parent = getattr(self, "_parent", None)
          if parent is not None and load is False:
              raise AttributeError(
                  "Cannot set keys directly when" + " within an instantiated list"
              )
  
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=six.text_type,
                  is_leaf=True,
                  yang_name="afi-safi-name",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  is_keyval=True,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="leafref",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """afi_safi_name must be of a type compatible with leafref""",
                      "defined-type": "leafref",
                      "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
                  }
              )
  
          self.__afi_safi_name = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_afi_safi_name(self):
          self.__afi_safi_name = YANGDynClass(
              base=six.text_type,
              is_leaf=True,
              yang_name="afi-safi-name",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              is_keyval=True,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="leafref",
              is_config=True,
          )
  
      def _get_config(self):
          """
      Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config (container)
  
      YANG Description: Configuration parameters for the AFI-SAFI
      """
          return self.__config
  
      def _set_config(self, v, load=False):
          """
      Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_config is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_config() directly.
  
      YANG Description: Configuration parameters for the AFI-SAFI
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=config.config,
                  is_container="container",
                  yang_name="config",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """config must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=config.config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__config = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_config(self):
          self.__config = YANGDynClass(
              base=config.config,
              is_container="container",
              yang_name="config",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_state(self):
          """
      Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state (container)
  
      YANG Description: State information relating to the AFI-SAFI
      """
          return self.__state
  
      def _set_state(self, v, load=False):
          """
      Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_state is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_state() directly.
  
      YANG Description: State information relating to the AFI-SAFI
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=state.state,
                  is_container="container",
                  yang_name="state",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """state must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=state.state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__state = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_state(self):
          self.__state = YANGDynClass(
              base=state.state,
              is_container="container",
              yang_name="state",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_graceful_restart(self):
          """
      Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart (container)
  
      YANG Description: Parameters relating to BGP graceful-restart
      """
          return self.__graceful_restart
  
      def _set_graceful_restart(self, v, load=False):
          """
      Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_graceful_restart is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_graceful_restart() directly.
  
      YANG Description: Parameters relating to BGP graceful-restart
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=graceful_restart.graceful_restart,
                  is_container="container",
                  yang_name="graceful-restart",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """graceful_restart must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=graceful_restart.graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__graceful_restart = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_graceful_restart(self):
          self.__graceful_restart = YANGDynClass(
              base=graceful_restart.graceful_restart,
              is_container="container",
              yang_name="graceful-restart",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_apply_policy(self):
          """
      Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy (container)
  
      YANG Description: Anchor point for routing policies in the model.
  Import and export policies are with respect to the local
  routing table, i.e., export (send) and import (receive),
  depending on the context.
      """
          return self.__apply_policy
  
      def _set_apply_policy(self, v, load=False):
          """
      Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_apply_policy is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_apply_policy() directly.
  
      YANG Description: Anchor point for routing policies in the model.
  Import and export policies are with respect to the local
  routing table, i.e., export (send) and import (receive),
  depending on the context.
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=apply_policy.apply_policy,
                  is_container="container",
                  yang_name="apply-policy",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """apply_policy must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=apply_policy.apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__apply_policy = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_apply_policy(self):
          self.__apply_policy = YANGDynClass(
              base=apply_policy.apply_policy,
              is_container="container",
              yang_name="apply-policy",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv4_unicast(self):
          """
      Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast (container)
  
      YANG Description: IPv4 unicast configuration options
      """
          return self.__ipv4_unicast
  
      def _set_ipv4_unicast(self, v, load=False):
          """
      Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv4_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv4_unicast() directly.
  
      YANG Description: IPv4 unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv4_unicast.ipv4_unicast,
                  is_container="container",
                  yang_name="ipv4-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv4_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv4_unicast.ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv4_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv4_unicast(self):
          self.__ipv4_unicast = YANGDynClass(
              base=ipv4_unicast.ipv4_unicast,
              is_container="container",
              yang_name="ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv6_unicast(self):
          """
      Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast (container)
  
      YANG Description: IPv6 unicast configuration options
      """
          return self.__ipv6_unicast
  
      def _set_ipv6_unicast(self, v, load=False):
          """
      Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv6_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv6_unicast() directly.
  
      YANG Description: IPv6 unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv6_unicast.ipv6_unicast,
                  is_container="container",
                  yang_name="ipv6-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv6_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv6_unicast.ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv6_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv6_unicast(self):
          self.__ipv6_unicast = YANGDynClass(
              base=ipv6_unicast.ipv6_unicast,
              is_container="container",
              yang_name="ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv4_labeled_unicast(self):
          """
      Getter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast (container)
  
      YANG Description: IPv4 Labeled Unicast configuration options
      """
          return self.__ipv4_labeled_unicast
  
      def _set_ipv4_labeled_unicast(self, v, load=False):
          """
      Setter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv4_labeled_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv4_labeled_unicast() directly.
  
      YANG Description: IPv4 Labeled Unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv4_labeled_unicast.ipv4_labeled_unicast,
                  is_container="container",
                  yang_name="ipv4-labeled-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv4_labeled_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv4_labeled_unicast.ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv4_labeled_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv4_labeled_unicast(self):
          self.__ipv4_labeled_unicast = YANGDynClass(
              base=ipv4_labeled_unicast.ipv4_labeled_unicast,
              is_container="container",
              yang_name="ipv4-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv6_labeled_unicast(self):
          """
      Getter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast (container)
  
      YANG Description: IPv6 Labeled Unicast configuration options
      """
          return self.__ipv6_labeled_unicast
  
      def _set_ipv6_labeled_unicast(self, v, load=False):
          """
      Setter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv6_labeled_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv6_labeled_unicast() directly.
  
      YANG Description: IPv6 Labeled Unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv6_labeled_unicast.ipv6_labeled_unicast,
                  is_container="container",
                  yang_name="ipv6-labeled-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv6_labeled_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv6_labeled_unicast.ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv6_labeled_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv6_labeled_unicast(self):
          self.__ipv6_labeled_unicast = YANGDynClass(
              base=ipv6_labeled_unicast.ipv6_labeled_unicast,
              is_container="container",
              yang_name="ipv6-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv4_unicast(self):
          """
      Getter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
  
      YANG Description: Unicast IPv4 L3VPN configuration options
      """
          return self.__l3vpn_ipv4_unicast
  
      def _set_l3vpn_ipv4_unicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv4_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv4_unicast() directly.
  
      YANG Description: Unicast IPv4 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast,
                  is_container="container",
                  yang_name="l3vpn-ipv4-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv4_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv4_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv4_unicast(self):
          self.__l3vpn_ipv4_unicast = YANGDynClass(
              base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast,
              is_container="container",
              yang_name="l3vpn-ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv6_unicast(self):
          """
      Getter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
  
      YANG Description: Unicast IPv6 L3VPN configuration options
      """
          return self.__l3vpn_ipv6_unicast
  
      def _set_l3vpn_ipv6_unicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv6_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv6_unicast() directly.
  
      YANG Description: Unicast IPv6 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast,
                  is_container="container",
                  yang_name="l3vpn-ipv6-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv6_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv6_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv6_unicast(self):
          self.__l3vpn_ipv6_unicast = YANGDynClass(
              base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast,
              is_container="container",
              yang_name="l3vpn-ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv4_multicast(self):
          """
      Getter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
  
      YANG Description: Multicast IPv4 L3VPN configuration options
      """
          return self.__l3vpn_ipv4_multicast
  
      def _set_l3vpn_ipv4_multicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv4_multicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv4_multicast() directly.
  
      YANG Description: Multicast IPv4 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast,
                  is_container="container",
                  yang_name="l3vpn-ipv4-multicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv4_multicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv4_multicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv4_multicast(self):
          self.__l3vpn_ipv4_multicast = YANGDynClass(
              base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast,
              is_container="container",
              yang_name="l3vpn-ipv4-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv6_multicast(self):
          """
      Getter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
  
      YANG Description: Multicast IPv6 L3VPN configuration options
      """
          return self.__l3vpn_ipv6_multicast
  
      def _set_l3vpn_ipv6_multicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv6_multicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv6_multicast() directly.
  
      YANG Description: Multicast IPv6 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast,
                  is_container="container",
                  yang_name="l3vpn-ipv6-multicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv6_multicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv6_multicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv6_multicast(self):
          self.__l3vpn_ipv6_multicast = YANGDynClass(
              base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast,
              is_container="container",
              yang_name="l3vpn-ipv6-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l2vpn_vpls(self):
          """
      Getter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls (container)
  
      YANG Description: BGP-signalled VPLS configuration options
      """
          return self.__l2vpn_vpls
  
      def _set_l2vpn_vpls(self, v, load=False):
          """
      Setter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l2vpn_vpls is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l2vpn_vpls() directly.
  
      YANG Description: BGP-signalled VPLS configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l2vpn_vpls.l2vpn_vpls,
                  is_container="container",
                  yang_name="l2vpn-vpls",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l2vpn_vpls must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l2vpn_vpls.l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l2vpn_vpls = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l2vpn_vpls(self):
          self.__l2vpn_vpls = YANGDynClass(
              base=l2vpn_vpls.l2vpn_vpls,
              is_container="container",
              yang_name="l2vpn-vpls",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l2vpn_evpn(self):
          """
      Getter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn (container)
  
      YANG Description: BGP EVPN configuration options
      """
          return self.__l2vpn_evpn
  
      def _set_l2vpn_evpn(self, v, load=False):
          """
      Setter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l2vpn_evpn is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l2vpn_evpn() directly.
  
      YANG Description: BGP EVPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l2vpn_evpn.l2vpn_evpn,
                  is_container="container",
                  yang_name="l2vpn-evpn",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l2vpn_evpn must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l2vpn_evpn.l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l2vpn_evpn = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l2vpn_evpn(self):
          self.__l2vpn_evpn = YANGDynClass(
              base=l2vpn_evpn.l2vpn_evpn,
              is_container="container",
              yang_name="l2vpn-evpn",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_use_multiple_paths(self):
          """
      Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths (container)
  
      YANG Description: Parameters related to the use of multiple-paths for the same
  NLRI when they are received only from this neighbor
      """
          return self.__use_multiple_paths
  
      def _set_use_multiple_paths(self, v, load=False):
          """
      Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_use_multiple_paths is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_use_multiple_paths() directly.
  
      YANG Description: Parameters related to the use of multiple-paths for the same
  NLRI when they are received only from this neighbor
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=use_multiple_paths.use_multiple_paths,
                  is_container="container",
                  yang_name="use-multiple-paths",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """use_multiple_paths must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=use_multiple_paths.use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__use_multiple_paths = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_use_multiple_paths(self):
          self.__use_multiple_paths = YANGDynClass(
              base=use_multiple_paths.use_multiple_paths,
              is_container="container",
              yang_name="use-multiple-paths",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
      config = __builtin__.property(_get_config, _set_config)
      state = __builtin__.property(_get_state, _set_state)
      graceful_restart = __builtin__.property(
          _get_graceful_restart, _set_graceful_restart
      )
      apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
      ipv4_unicast = __builtin__.property(_get_ipv4_unicast, _set_ipv4_unicast)
      ipv6_unicast = __builtin__.property(_get_ipv6_unicast, _set_ipv6_unicast)
      ipv4_labeled_unicast = __builtin__.property(
          _get_ipv4_labeled_unicast, _set_ipv4_labeled_unicast
      )
      ipv6_labeled_unicast = __builtin__.property(
          _get_ipv6_labeled_unicast, _set_ipv6_labeled_unicast
      )
      l3vpn_ipv4_unicast = __builtin__.property(
          _get_l3vpn_ipv4_unicast, _set_l3vpn_ipv4_unicast
      )
      l3vpn_ipv6_unicast = __builtin__.property(
          _get_l3vpn_ipv6_unicast, _set_l3vpn_ipv6_unicast
      )
      l3vpn_ipv4_multicast = __builtin__.property(
          _get_l3vpn_ipv4_multicast, _set_l3vpn_ipv4_multicast
      )
      l3vpn_ipv6_multicast = __builtin__.property(
          _get_l3vpn_ipv6_multicast, _set_l3vpn_ipv6_multicast
      )
      l2vpn_vpls = __builtin__.property(_get_l2vpn_vpls, _set_l2vpn_vpls)
      l2vpn_evpn = __builtin__.property(_get_l2vpn_evpn, _set_l2vpn_evpn)
      use_multiple_paths = __builtin__.property(
          _get_use_multiple_paths, _set_use_multiple_paths
      )
  
      _pyangbind_elements = OrderedDict(
          [
              ("afi_safi_name", afi_safi_name),
              ("config", config),
              ("state", state),
              ("graceful_restart", graceful_restart),
              ("apply_policy", apply_policy),
              ("ipv4_unicast", ipv4_unicast),
              ("ipv6_unicast", ipv6_unicast),
              ("ipv4_labeled_unicast", ipv4_labeled_unicast),
              ("ipv6_labeled_unicast", ipv6_labeled_unicast),
              ("l3vpn_ipv4_unicast", l3vpn_ipv4_unicast),
              ("l3vpn_ipv6_unicast", l3vpn_ipv6_unicast),
              ("l3vpn_ipv4_multicast", l3vpn_ipv4_multicast),
              ("l3vpn_ipv6_multicast", l3vpn_ipv6_multicast),
              ("l2vpn_vpls", l2vpn_vpls),
              ("l2vpn_evpn", l2vpn_evpn),
              ("use_multiple_paths", use_multiple_paths),
          ]
      )
  
  
  from . import config
  from . import state
  from . import graceful_restart
  from . import apply_policy
  from . import ipv4_unicast
  from . import ipv6_unicast
  from . import ipv4_labeled_unicast
  from . import ipv6_labeled_unicast
  from . import l3vpn_ipv4_unicast
  from . import l3vpn_ipv6_unicast
  from . import l3vpn_ipv4_multicast
  from . import l3vpn_ipv6_multicast
  from . import l2vpn_vpls
  from . import l2vpn_evpn
  from . import use_multiple_paths
  
  
  class afi_safi(PybindBase):
      """
    This class was auto-generated by the PythonClass plugin for PYANG
    from YANG module openconfig-network-instance-l2 - based on the path /network-instances/network-instance/protocols/protocol/bgp/neighbors/neighbor/afi-safis/afi-safi. Each member element of
    the container is represented as a class variable - with a specific
    YANG type.
  
    YANG Description: AFI,SAFI configuration available for the
  neighbour or group
    """
      __slots__ = (
          "_path_helper",
          "_extmethods",
          "__afi_safi_name",
          "__config",
          "__state",
          "__graceful_restart",
          "__apply_policy",
          "__ipv4_unicast",
          "__ipv6_unicast",
          "__ipv4_labeled_unicast",
          "__ipv6_labeled_unicast",
          "__l3vpn_ipv4_unicast",
          "__l3vpn_ipv6_unicast",
          "__l3vpn_ipv4_multicast",
          "__l3vpn_ipv6_multicast",
          "__l2vpn_vpls",
          "__l2vpn_evpn",
          "__use_multiple_paths",
      )
  
      _yang_name = "afi-safi"
  
      _pybind_generated_by = "container"
  
      def __init__(self, *args, **kwargs):
  
          self._path_helper = False
  
          self._extmethods = False
          self.__afi_safi_name = YANGDynClass(
              base=six.text_type,
              is_leaf=True,
              yang_name="afi-safi-name",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              is_keyval=True,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="leafref",
              is_config=True,
          )
          self.__config = YANGDynClass(
              base=config.config,
              is_container="container",
              yang_name="config",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__state = YANGDynClass(
              base=state.state,
              is_container="container",
              yang_name="state",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__graceful_restart = YANGDynClass(
              base=graceful_restart.graceful_restart,
              is_container="container",
              yang_name="graceful-restart",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__apply_policy = YANGDynClass(
              base=apply_policy.apply_policy,
              is_container="container",
              yang_name="apply-policy",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv4_unicast = YANGDynClass(
              base=ipv4_unicast.ipv4_unicast,
              is_container="container",
              yang_name="ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv6_unicast = YANGDynClass(
              base=ipv6_unicast.ipv6_unicast,
              is_container="container",
              yang_name="ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv4_labeled_unicast = YANGDynClass(
              base=ipv4_labeled_unicast.ipv4_labeled_unicast,
              is_container="container",
              yang_name="ipv4-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__ipv6_labeled_unicast = YANGDynClass(
              base=ipv6_labeled_unicast.ipv6_labeled_unicast,
              is_container="container",
              yang_name="ipv6-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv4_unicast = YANGDynClass(
              base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast,
              is_container="container",
              yang_name="l3vpn-ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv6_unicast = YANGDynClass(
              base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast,
              is_container="container",
              yang_name="l3vpn-ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv4_multicast = YANGDynClass(
              base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast,
              is_container="container",
              yang_name="l3vpn-ipv4-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l3vpn_ipv6_multicast = YANGDynClass(
              base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast,
              is_container="container",
              yang_name="l3vpn-ipv6-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l2vpn_vpls = YANGDynClass(
              base=l2vpn_vpls.l2vpn_vpls,
              is_container="container",
              yang_name="l2vpn-vpls",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__l2vpn_evpn = YANGDynClass(
              base=l2vpn_evpn.l2vpn_evpn,
              is_container="container",
              yang_name="l2vpn-evpn",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
          self.__use_multiple_paths = YANGDynClass(
              base=use_multiple_paths.use_multiple_paths,
              is_container="container",
              yang_name="use-multiple-paths",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
          load = kwargs.pop("load", None)
          if args:
              if len(args) > 1:
                  raise TypeError("cannot create a YANG container with >1 argument")
              all_attr = True
              for e in self._pyangbind_elements:
                  if not hasattr(args[0], e):
                      all_attr = False
                      break
              if not all_attr:
                  raise ValueError("Supplied object did not have the correct attributes")
              for e in self._pyangbind_elements:
                  nobj = getattr(args[0], e)
                  if nobj._changed() is False:
                      continue
                  setmethod = getattr(self, "_set_%s" % e)
                  if load is None:
                      setmethod(getattr(args[0], e))
                  else:
                      setmethod(getattr(args[0], e), load=load)
  
      def _path(self):
          if hasattr(self, "_parent"):
              return self._parent._path() + [self._yang_name]
          else:
              return [
                  "network-instances",
                  "network-instance",
                  "protocols",
                  "protocol",
                  "bgp",
                  "neighbors",
                  "neighbor",
                  "afi-safis",
                  "afi-safi",
              ]
  
      def _get_afi_safi_name(self):
          """
      Getter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/afi_safi_name (leafref)
  
      YANG Description: Reference to the AFI-SAFI name used as a key
  for the AFI-SAFI list
      """
          return self.__afi_safi_name
  
      def _set_afi_safi_name(self, v, load=False):
          """
      Setter method for afi_safi_name, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/afi_safi_name (leafref)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_afi_safi_name is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_afi_safi_name() directly.
  
      YANG Description: Reference to the AFI-SAFI name used as a key
  for the AFI-SAFI list
      """
          parent = getattr(self, "_parent", None)
          if parent is not None and load is False:
              raise AttributeError(
                  "Cannot set keys directly when" + " within an instantiated list"
              )
  
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=six.text_type,
                  is_leaf=True,
                  yang_name="afi-safi-name",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  is_keyval=True,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="leafref",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """afi_safi_name must be of a type compatible with leafref""",
                      "defined-type": "leafref",
                      "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="afi-safi-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, is_keyval=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
                  }
              )
  
          self.__afi_safi_name = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_afi_safi_name(self):
          self.__afi_safi_name = YANGDynClass(
              base=six.text_type,
              is_leaf=True,
              yang_name="afi-safi-name",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              is_keyval=True,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="leafref",
              is_config=True,
          )
  
      def _get_config(self):
          """
      Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config (container)
  
      YANG Description: Configuration parameters for the AFI-SAFI
      """
          return self.__config
  
      def _set_config(self, v, load=False):
          """
      Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/config (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_config is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_config() directly.
  
      YANG Description: Configuration parameters for the AFI-SAFI
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=config.config,
                  is_container="container",
                  yang_name="config",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """config must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=config.config, is_container='container', yang_name="config", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__config = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_config(self):
          self.__config = YANGDynClass(
              base=config.config,
              is_container="container",
              yang_name="config",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_state(self):
          """
      Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state (container)
  
      YANG Description: State information relating to the AFI-SAFI
      """
          return self.__state
  
      def _set_state(self, v, load=False):
          """
      Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/state (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_state is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_state() directly.
  
      YANG Description: State information relating to the AFI-SAFI
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=state.state,
                  is_container="container",
                  yang_name="state",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """state must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=state.state, is_container='container', yang_name="state", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__state = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_state(self):
          self.__state = YANGDynClass(
              base=state.state,
              is_container="container",
              yang_name="state",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_graceful_restart(self):
          """
      Getter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart (container)
  
      YANG Description: Parameters relating to BGP graceful-restart
      """
          return self.__graceful_restart
  
      def _set_graceful_restart(self, v, load=False):
          """
      Setter method for graceful_restart, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/graceful_restart (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_graceful_restart is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_graceful_restart() directly.
  
      YANG Description: Parameters relating to BGP graceful-restart
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=graceful_restart.graceful_restart,
                  is_container="container",
                  yang_name="graceful-restart",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """graceful_restart must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=graceful_restart.graceful_restart, is_container='container', yang_name="graceful-restart", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__graceful_restart = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_graceful_restart(self):
          self.__graceful_restart = YANGDynClass(
              base=graceful_restart.graceful_restart,
              is_container="container",
              yang_name="graceful-restart",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_apply_policy(self):
          """
      Getter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy (container)
  
      YANG Description: Anchor point for routing policies in the model.
  Import and export policies are with respect to the local
  routing table, i.e., export (send) and import (receive),
  depending on the context.
      """
          return self.__apply_policy
  
      def _set_apply_policy(self, v, load=False):
          """
      Setter method for apply_policy, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/apply_policy (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_apply_policy is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_apply_policy() directly.
  
      YANG Description: Anchor point for routing policies in the model.
  Import and export policies are with respect to the local
  routing table, i.e., export (send) and import (receive),
  depending on the context.
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=apply_policy.apply_policy,
                  is_container="container",
                  yang_name="apply-policy",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """apply_policy must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=apply_policy.apply_policy, is_container='container', yang_name="apply-policy", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__apply_policy = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_apply_policy(self):
          self.__apply_policy = YANGDynClass(
              base=apply_policy.apply_policy,
              is_container="container",
              yang_name="apply-policy",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv4_unicast(self):
          """
      Getter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast (container)
  
      YANG Description: IPv4 unicast configuration options
      """
          return self.__ipv4_unicast
  
      def _set_ipv4_unicast(self, v, load=False):
          """
      Setter method for ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv4_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv4_unicast() directly.
  
      YANG Description: IPv4 unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv4_unicast.ipv4_unicast,
                  is_container="container",
                  yang_name="ipv4-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv4_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv4_unicast.ipv4_unicast, is_container='container', yang_name="ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv4_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv4_unicast(self):
          self.__ipv4_unicast = YANGDynClass(
              base=ipv4_unicast.ipv4_unicast,
              is_container="container",
              yang_name="ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv6_unicast(self):
          """
      Getter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast (container)
  
      YANG Description: IPv6 unicast configuration options
      """
          return self.__ipv6_unicast
  
      def _set_ipv6_unicast(self, v, load=False):
          """
      Setter method for ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv6_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv6_unicast() directly.
  
      YANG Description: IPv6 unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv6_unicast.ipv6_unicast,
                  is_container="container",
                  yang_name="ipv6-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv6_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv6_unicast.ipv6_unicast, is_container='container', yang_name="ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv6_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv6_unicast(self):
          self.__ipv6_unicast = YANGDynClass(
              base=ipv6_unicast.ipv6_unicast,
              is_container="container",
              yang_name="ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv4_labeled_unicast(self):
          """
      Getter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast (container)
  
      YANG Description: IPv4 Labeled Unicast configuration options
      """
          return self.__ipv4_labeled_unicast
  
      def _set_ipv4_labeled_unicast(self, v, load=False):
          """
      Setter method for ipv4_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv4_labeled_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv4_labeled_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv4_labeled_unicast() directly.
  
      YANG Description: IPv4 Labeled Unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv4_labeled_unicast.ipv4_labeled_unicast,
                  is_container="container",
                  yang_name="ipv4-labeled-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv4_labeled_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv4_labeled_unicast.ipv4_labeled_unicast, is_container='container', yang_name="ipv4-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv4_labeled_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv4_labeled_unicast(self):
          self.__ipv4_labeled_unicast = YANGDynClass(
              base=ipv4_labeled_unicast.ipv4_labeled_unicast,
              is_container="container",
              yang_name="ipv4-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_ipv6_labeled_unicast(self):
          """
      Getter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast (container)
  
      YANG Description: IPv6 Labeled Unicast configuration options
      """
          return self.__ipv6_labeled_unicast
  
      def _set_ipv6_labeled_unicast(self, v, load=False):
          """
      Setter method for ipv6_labeled_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/ipv6_labeled_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_ipv6_labeled_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_ipv6_labeled_unicast() directly.
  
      YANG Description: IPv6 Labeled Unicast configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=ipv6_labeled_unicast.ipv6_labeled_unicast,
                  is_container="container",
                  yang_name="ipv6-labeled-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """ipv6_labeled_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=ipv6_labeled_unicast.ipv6_labeled_unicast, is_container='container', yang_name="ipv6-labeled-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__ipv6_labeled_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_ipv6_labeled_unicast(self):
          self.__ipv6_labeled_unicast = YANGDynClass(
              base=ipv6_labeled_unicast.ipv6_labeled_unicast,
              is_container="container",
              yang_name="ipv6-labeled-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv4_unicast(self):
          """
      Getter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
  
      YANG Description: Unicast IPv4 L3VPN configuration options
      """
          return self.__l3vpn_ipv4_unicast
  
      def _set_l3vpn_ipv4_unicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv4_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv4_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv4_unicast() directly.
  
      YANG Description: Unicast IPv4 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast,
                  is_container="container",
                  yang_name="l3vpn-ipv4-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv4_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast, is_container='container', yang_name="l3vpn-ipv4-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv4_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv4_unicast(self):
          self.__l3vpn_ipv4_unicast = YANGDynClass(
              base=l3vpn_ipv4_unicast.l3vpn_ipv4_unicast,
              is_container="container",
              yang_name="l3vpn-ipv4-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv6_unicast(self):
          """
      Getter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
  
      YANG Description: Unicast IPv6 L3VPN configuration options
      """
          return self.__l3vpn_ipv6_unicast
  
      def _set_l3vpn_ipv6_unicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv6_unicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_unicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv6_unicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv6_unicast() directly.
  
      YANG Description: Unicast IPv6 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast,
                  is_container="container",
                  yang_name="l3vpn-ipv6-unicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv6_unicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast, is_container='container', yang_name="l3vpn-ipv6-unicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv6_unicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv6_unicast(self):
          self.__l3vpn_ipv6_unicast = YANGDynClass(
              base=l3vpn_ipv6_unicast.l3vpn_ipv6_unicast,
              is_container="container",
              yang_name="l3vpn-ipv6-unicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv4_multicast(self):
          """
      Getter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
  
      YANG Description: Multicast IPv4 L3VPN configuration options
      """
          return self.__l3vpn_ipv4_multicast
  
      def _set_l3vpn_ipv4_multicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv4_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv4_multicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv4_multicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv4_multicast() directly.
  
      YANG Description: Multicast IPv4 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast,
                  is_container="container",
                  yang_name="l3vpn-ipv4-multicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv4_multicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast, is_container='container', yang_name="l3vpn-ipv4-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv4_multicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv4_multicast(self):
          self.__l3vpn_ipv4_multicast = YANGDynClass(
              base=l3vpn_ipv4_multicast.l3vpn_ipv4_multicast,
              is_container="container",
              yang_name="l3vpn-ipv4-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l3vpn_ipv6_multicast(self):
          """
      Getter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
  
      YANG Description: Multicast IPv6 L3VPN configuration options
      """
          return self.__l3vpn_ipv6_multicast
  
      def _set_l3vpn_ipv6_multicast(self, v, load=False):
          """
      Setter method for l3vpn_ipv6_multicast, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l3vpn_ipv6_multicast (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l3vpn_ipv6_multicast is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l3vpn_ipv6_multicast() directly.
  
      YANG Description: Multicast IPv6 L3VPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast,
                  is_container="container",
                  yang_name="l3vpn-ipv6-multicast",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l3vpn_ipv6_multicast must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast, is_container='container', yang_name="l3vpn-ipv6-multicast", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l3vpn_ipv6_multicast = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l3vpn_ipv6_multicast(self):
          self.__l3vpn_ipv6_multicast = YANGDynClass(
              base=l3vpn_ipv6_multicast.l3vpn_ipv6_multicast,
              is_container="container",
              yang_name="l3vpn-ipv6-multicast",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l2vpn_vpls(self):
          """
      Getter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls (container)
  
      YANG Description: BGP-signalled VPLS configuration options
      """
          return self.__l2vpn_vpls
  
      def _set_l2vpn_vpls(self, v, load=False):
          """
      Setter method for l2vpn_vpls, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_vpls (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l2vpn_vpls is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l2vpn_vpls() directly.
  
      YANG Description: BGP-signalled VPLS configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l2vpn_vpls.l2vpn_vpls,
                  is_container="container",
                  yang_name="l2vpn-vpls",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l2vpn_vpls must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l2vpn_vpls.l2vpn_vpls, is_container='container', yang_name="l2vpn-vpls", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l2vpn_vpls = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l2vpn_vpls(self):
          self.__l2vpn_vpls = YANGDynClass(
              base=l2vpn_vpls.l2vpn_vpls,
              is_container="container",
              yang_name="l2vpn-vpls",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_l2vpn_evpn(self):
          """
      Getter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn (container)
  
      YANG Description: BGP EVPN configuration options
      """
          return self.__l2vpn_evpn
  
      def _set_l2vpn_evpn(self, v, load=False):
          """
      Setter method for l2vpn_evpn, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/l2vpn_evpn (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_l2vpn_evpn is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_l2vpn_evpn() directly.
  
      YANG Description: BGP EVPN configuration options
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=l2vpn_evpn.l2vpn_evpn,
                  is_container="container",
                  yang_name="l2vpn-evpn",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """l2vpn_evpn must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=l2vpn_evpn.l2vpn_evpn, is_container='container', yang_name="l2vpn-evpn", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__l2vpn_evpn = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_l2vpn_evpn(self):
          self.__l2vpn_evpn = YANGDynClass(
              base=l2vpn_evpn.l2vpn_evpn,
              is_container="container",
              yang_name="l2vpn-evpn",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      def _get_use_multiple_paths(self):
          """
      Getter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths (container)
  
      YANG Description: Parameters related to the use of multiple-paths for the same
  NLRI when they are received only from this neighbor
      """
          return self.__use_multiple_paths
  
      def _set_use_multiple_paths(self, v, load=False):
          """
      Setter method for use_multiple_paths, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/neighbors/neighbor/afi_safis/afi_safi/use_multiple_paths (container)
      If this variable is read-only (config: false) in the
      source YANG file, then _set_use_multiple_paths is considered as a private
      method. Backends looking to populate this variable should
      do so via calling thisObj._set_use_multiple_paths() directly.
  
      YANG Description: Parameters related to the use of multiple-paths for the same
  NLRI when they are received only from this neighbor
      """
          if hasattr(v, "_utype"):
              v = v._utype(v)
          try:
              t = YANGDynClass(
                  v,
                  base=use_multiple_paths.use_multiple_paths,
                  is_container="container",
                  yang_name="use-multiple-paths",
                  parent=self,
                  path_helper=self._path_helper,
                  extmethods=self._extmethods,
                  register_paths=True,
                  extensions=None,
                  namespace="http://openconfig.net/yang/network-instance",
                  defining_module="openconfig-network-instance",
                  yang_type="container",
                  is_config=True,
              )
          except (TypeError, ValueError):
              raise ValueError(
                  {
                      "error-string": """use_multiple_paths must be of a type compatible with container""",
                      "defined-type": "container",
                      "generated-type": """YANGDynClass(base=use_multiple_paths.use_multiple_paths, is_container='container', yang_name="use-multiple-paths", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions=None, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='container', is_config=True)""",
                  }
              )
  
          self.__use_multiple_paths = t
          if hasattr(self, "_set"):
              self._set()
  
      def _unset_use_multiple_paths(self):
          self.__use_multiple_paths = YANGDynClass(
              base=use_multiple_paths.use_multiple_paths,
              is_container="container",
              yang_name="use-multiple-paths",
              parent=self,
              path_helper=self._path_helper,
              extmethods=self._extmethods,
              register_paths=True,
              extensions=None,
              namespace="http://openconfig.net/yang/network-instance",
              defining_module="openconfig-network-instance",
              yang_type="container",
              is_config=True,
          )
  
      afi_safi_name = __builtin__.property(_get_afi_safi_name, _set_afi_safi_name)
      config = __builtin__.property(_get_config, _set_config)
      state = __builtin__.property(_get_state, _set_state)
      graceful_restart = __builtin__.property(
          _get_graceful_restart, _set_graceful_restart
      )
      apply_policy = __builtin__.property(_get_apply_policy, _set_apply_policy)
      ipv4_unicast = __builtin__.property(_get_ipv4_unicast, _set_ipv4_unicast)
      ipv6_unicast = __builtin__.property(_get_ipv6_unicast, _set_ipv6_unicast)
      ipv4_labeled_unicast = __builtin__.property(
          _get_ipv4_labeled_unicast, _set_ipv4_labeled_unicast
      )
      ipv6_labeled_unicast = __builtin__.property(
          _get_ipv6_labeled_unicast, _set_ipv6_labeled_unicast
      )
      l3vpn_ipv4_unicast = __builtin__.property(
          _get_l3vpn_ipv4_unicast, _set_l3vpn_ipv4_unicast
      )
      l3vpn_ipv6_unicast = __builtin__.property(
          _get_l3vpn_ipv6_unicast, _set_l3vpn_ipv6_unicast
      )
      l3vpn_ipv4_multicast = __builtin__.property(
          _get_l3vpn_ipv4_multicast, _set_l3vpn_ipv4_multicast
      )
      l3vpn_ipv6_multicast = __builtin__.property(
          _get_l3vpn_ipv6_multicast, _set_l3vpn_ipv6_multicast
      )
      l2vpn_vpls = __builtin__.property(_get_l2vpn_vpls, _set_l2vpn_vpls)
      l2vpn_evpn = __builtin__.property(_get_l2vpn_evpn, _set_l2vpn_evpn)
      use_multiple_paths = __builtin__.property(
          _get_use_multiple_paths, _set_use_multiple_paths
      )
  
      _pyangbind_elements = OrderedDict(
          [
              ("afi_safi_name", afi_safi_name),
              ("config", config),
              ("state", state),
              ("graceful_restart", graceful_restart),
              ("apply_policy", apply_policy),
              ("ipv4_unicast", ipv4_unicast),
              ("ipv6_unicast", ipv6_unicast),
              ("ipv4_labeled_unicast", ipv4_labeled_unicast),
              ("ipv6_labeled_unicast", ipv6_labeled_unicast),
              ("l3vpn_ipv4_unicast", l3vpn_ipv4_unicast),
              ("l3vpn_ipv6_unicast", l3vpn_ipv6_unicast),
              ("l3vpn_ipv4_multicast", l3vpn_ipv4_multicast),
              ("l3vpn_ipv6_multicast", l3vpn_ipv6_multicast),
              ("l2vpn_vpls", l2vpn_vpls),
              ("l2vpn_evpn", l2vpn_evpn),
              ("use_multiple_paths", use_multiple_paths),
          ]
      )
  