# -*- 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__


class config(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/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to paths
  """
    __slots__ = (
        "_path_helper",
        "_extmethods",
        "__name",
        "__path_computation_method",
        "__use_cspf",
        "__cspf_tiebreaker",
        "__path_computation_server",
        "__explicit_path_name",
        "__preference",
        "__setup_priority",
        "__hold_priority",
        "__retry_timer",
    )

    _yang_name = "config"

    _pybind_generated_by = "container"

    def __init__(self, *args, **kwargs):

        self._path_helper = False

        self._extmethods = False
        self.__name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="string",
            is_config=True,
        )
        self.__path_computation_method = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={
                    "LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                },
            ),
            default=six.text_type("oc-mplst:LOCALLY_COMPUTED"),
            is_leaf=True,
            yang_name="path-computation-method",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="identityref",
            is_config=True,
        )
        self.__use_cspf = YANGDynClass(
            base=YANGBool,
            is_leaf=True,
            yang_name="use-cspf",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="boolean",
            is_config=True,
        )
        self.__cspf_tiebreaker = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"RANDOM": {}, "LEAST_FILL": {}, "MOST_FILL": {}},
            ),
            default=six.text_type("RANDOM"),
            is_leaf=True,
            yang_name="cspf-tiebreaker",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="cspf-tie-breaking",
            is_config=True,
        )
        self.__path_computation_server = YANGDynClass(
            base=[
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
                    },
                ),
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
                    },
                ),
            ],
            is_leaf=True,
            yang_name="path-computation-server",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="inet:ip-address",
            is_config=True,
        )
        self.__explicit_path_name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="explicit-path-name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="leafref",
            is_config=True,
        )
        self.__preference = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["1..255"]},
            ),
            is_leaf=True,
            yang_name="preference",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )
        self.__setup_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                7
            ),
            is_leaf=True,
            yang_name="setup-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )
        self.__hold_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                0
            ),
            is_leaf=True,
            yang_name="hold-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )
        self.__retry_timer = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16
                ),
                restriction_dict={"range": ["1..600"]},
            ),
            is_leaf=True,
            yang_name="retry-timer",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint16",
            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",
                "mpls",
                "lsps",
                "constrained-path",
                "tunnels",
                "tunnel",
                "p2p-tunnel-attributes",
                "p2p-primary-path",
                "p2p-primary-path",
                "config",
            ]

    def _get_name(self):
        """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/name (string)

    YANG Description: Path name
    """
        return self.__name

    def _set_name(self, v, load=False):
        """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Path name
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=six.text_type,
                is_leaf=True,
                yang_name="name",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="string",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """name must be of a type compatible with string""",
                    "defined-type": "string",
                    "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
                }
            )

        self.__name = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_name(self):
        self.__name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="string",
            is_config=True,
        )

    def _get_path_computation_method(self):
        """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
        return self.__path_computation_method

    def _set_path_computation_method(self, v, load=False):
        """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=six.text_type,
                    restriction_type="dict_key",
                    restriction_arg={
                        "LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-types:LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mplst:LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-t:LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-types:EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mplst:EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-t:EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-types:EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mplst:EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-t:EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                    },
                ),
                default=six.text_type("oc-mplst:LOCALLY_COMPUTED"),
                is_leaf=True,
                yang_name="path-computation-method",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="identityref",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """path_computation_method must be of a type compatible with identityref""",
                    "defined-type": "openconfig-network-instance:identityref",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-types:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-t:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-types:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-t:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-types:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-t:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
                }
            )

        self.__path_computation_method = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_path_computation_method(self):
        self.__path_computation_method = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={
                    "LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                },
            ),
            default=six.text_type("oc-mplst:LOCALLY_COMPUTED"),
            is_leaf=True,
            yang_name="path-computation-method",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="identityref",
            is_config=True,
        )

    def _get_use_cspf(self):
        """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
        return self.__use_cspf

    def _set_use_cspf(self, v, load=False):
        """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=YANGBool,
                is_leaf=True,
                yang_name="use-cspf",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="boolean",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """use_cspf must be of a type compatible with boolean""",
                    "defined-type": "boolean",
                    "generated-type": """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
                }
            )

        self.__use_cspf = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_use_cspf(self):
        self.__use_cspf = YANGDynClass(
            base=YANGBool,
            is_leaf=True,
            yang_name="use-cspf",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="boolean",
            is_config=True,
        )

    def _get_cspf_tiebreaker(self):
        """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
        return self.__cspf_tiebreaker

    def _set_cspf_tiebreaker(self, v, load=False):
        """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=six.text_type,
                    restriction_type="dict_key",
                    restriction_arg={"RANDOM": {}, "LEAST_FILL": {}, "MOST_FILL": {}},
                ),
                default=six.text_type("RANDOM"),
                is_leaf=True,
                yang_name="cspf-tiebreaker",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="cspf-tie-breaking",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
                    "defined-type": "openconfig-network-instance:cspf-tie-breaking",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)""",
                }
            )

        self.__cspf_tiebreaker = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_cspf_tiebreaker(self):
        self.__cspf_tiebreaker = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"RANDOM": {}, "LEAST_FILL": {}, "MOST_FILL": {}},
            ),
            default=six.text_type("RANDOM"),
            is_leaf=True,
            yang_name="cspf-tiebreaker",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="cspf-tie-breaking",
            is_config=True,
        )

    def _get_path_computation_server(self):
        """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (inet:ip-address)

    YANG Description: Address of the external path computation
server
    """
        return self.__path_computation_server

    def _set_path_computation_server(self, v, load=False):
        """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Address of the external path computation
server
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=[
                    RestrictedClassType(
                        base_type=six.text_type,
                        restriction_dict={
                            "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
                        },
                    ),
                    RestrictedClassType(
                        base_type=six.text_type,
                        restriction_dict={
                            "pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
                        },
                    ),
                ],
                is_leaf=True,
                yang_name="path-computation-server",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="inet:ip-address",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """path_computation_server must be of a type compatible with inet:ip-address""",
                    "defined-type": "inet:ip-address",
                    "generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
                }
            )

        self.__path_computation_server = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_path_computation_server(self):
        self.__path_computation_server = YANGDynClass(
            base=[
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
                    },
                ),
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
                    },
                ),
            ],
            is_leaf=True,
            yang_name="path-computation-server",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="inet:ip-address",
            is_config=True,
        )

    def _get_explicit_path_name(self):
        """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
        return self.__explicit_path_name

    def _set_explicit_path_name(self, v, load=False):
        """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=six.text_type,
                is_leaf=True,
                yang_name="explicit-path-name",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=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": """explicit_path_name must be of a type compatible with leafref""",
                    "defined-type": "leafref",
                    "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
                }
            )

        self.__explicit_path_name = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_explicit_path_name(self):
        self.__explicit_path_name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="explicit-path-name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="leafref",
            is_config=True,
        )

    def _get_preference(self):
        """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
        return self.__preference

    def _set_preference(self, v, load=False):
        """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["1..255"]},
                ),
                is_leaf=True,
                yang_name="preference",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint8",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """preference must be of a type compatible with uint8""",
                    "defined-type": "uint8",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
                }
            )

        self.__preference = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_preference(self):
        self.__preference = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["1..255"]},
            ),
            is_leaf=True,
            yang_name="preference",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )

    def _get_setup_priority(self):
        """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
        return self.__setup_priority

    def _set_setup_priority(self, v, load=False):
        """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..7"]},
                ),
                default=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                )(
                    7
                ),
                is_leaf=True,
                yang_name="setup-priority",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint8",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """setup_priority must be of a type compatible with uint8""",
                    "defined-type": "uint8",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
                }
            )

        self.__setup_priority = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_setup_priority(self):
        self.__setup_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                7
            ),
            is_leaf=True,
            yang_name="setup-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )

    def _get_hold_priority(self):
        """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
        return self.__hold_priority

    def _set_hold_priority(self, v, load=False):
        """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..7"]},
                ),
                default=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                )(
                    0
                ),
                is_leaf=True,
                yang_name="hold-priority",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint8",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """hold_priority must be of a type compatible with uint8""",
                    "defined-type": "uint8",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
                }
            )

        self.__hold_priority = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_hold_priority(self):
        self.__hold_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                0
            ),
            is_leaf=True,
            yang_name="hold-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )

    def _get_retry_timer(self):
        """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
        return self.__retry_timer

    def _set_retry_timer(self, v, load=False):
        """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..65535"]},
                        int_size=16,
                    ),
                    restriction_dict={"range": ["1..600"]},
                ),
                is_leaf=True,
                yang_name="retry-timer",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint16",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """retry_timer must be of a type compatible with uint16""",
                    "defined-type": "uint16",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
                }
            )

        self.__retry_timer = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_retry_timer(self):
        self.__retry_timer = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16
                ),
                restriction_dict={"range": ["1..600"]},
            ),
            is_leaf=True,
            yang_name="retry-timer",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint16",
            is_config=True,
        )

    name = __builtin__.property(_get_name, _set_name)
    path_computation_method = __builtin__.property(
        _get_path_computation_method, _set_path_computation_method
    )
    use_cspf = __builtin__.property(_get_use_cspf, _set_use_cspf)
    cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker, _set_cspf_tiebreaker)
    path_computation_server = __builtin__.property(
        _get_path_computation_server, _set_path_computation_server
    )
    explicit_path_name = __builtin__.property(
        _get_explicit_path_name, _set_explicit_path_name
    )
    preference = __builtin__.property(_get_preference, _set_preference)
    setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
    hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)
    retry_timer = __builtin__.property(_get_retry_timer, _set_retry_timer)

    _pyangbind_elements = OrderedDict(
        [
            ("name", name),
            ("path_computation_method", path_computation_method),
            ("use_cspf", use_cspf),
            ("cspf_tiebreaker", cspf_tiebreaker),
            ("path_computation_server", path_computation_server),
            ("explicit_path_name", explicit_path_name),
            ("preference", preference),
            ("setup_priority", setup_priority),
            ("hold_priority", hold_priority),
            ("retry_timer", retry_timer),
        ]
    )


class config(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/mpls/lsps/constrained-path/tunnels/tunnel/p2p-tunnel-attributes/p2p-primary-path/p2p-primary-path/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters related to paths
  """
    __slots__ = (
        "_path_helper",
        "_extmethods",
        "__name",
        "__path_computation_method",
        "__use_cspf",
        "__cspf_tiebreaker",
        "__path_computation_server",
        "__explicit_path_name",
        "__preference",
        "__setup_priority",
        "__hold_priority",
        "__retry_timer",
    )

    _yang_name = "config"

    _pybind_generated_by = "container"

    def __init__(self, *args, **kwargs):

        self._path_helper = False

        self._extmethods = False
        self.__name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="string",
            is_config=True,
        )
        self.__path_computation_method = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={
                    "LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                },
            ),
            default=six.text_type("oc-mplst:LOCALLY_COMPUTED"),
            is_leaf=True,
            yang_name="path-computation-method",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="identityref",
            is_config=True,
        )
        self.__use_cspf = YANGDynClass(
            base=YANGBool,
            is_leaf=True,
            yang_name="use-cspf",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="boolean",
            is_config=True,
        )
        self.__cspf_tiebreaker = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"RANDOM": {}, "LEAST_FILL": {}, "MOST_FILL": {}},
            ),
            default=six.text_type("RANDOM"),
            is_leaf=True,
            yang_name="cspf-tiebreaker",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="cspf-tie-breaking",
            is_config=True,
        )
        self.__path_computation_server = YANGDynClass(
            base=[
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
                    },
                ),
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
                    },
                ),
            ],
            is_leaf=True,
            yang_name="path-computation-server",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="inet:ip-address",
            is_config=True,
        )
        self.__explicit_path_name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="explicit-path-name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="leafref",
            is_config=True,
        )
        self.__preference = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["1..255"]},
            ),
            is_leaf=True,
            yang_name="preference",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )
        self.__setup_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                7
            ),
            is_leaf=True,
            yang_name="setup-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )
        self.__hold_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                0
            ),
            is_leaf=True,
            yang_name="hold-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )
        self.__retry_timer = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16
                ),
                restriction_dict={"range": ["1..600"]},
            ),
            is_leaf=True,
            yang_name="retry-timer",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint16",
            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",
                "mpls",
                "lsps",
                "constrained-path",
                "tunnels",
                "tunnel",
                "p2p-tunnel-attributes",
                "p2p-primary-path",
                "p2p-primary-path",
                "config",
            ]

    def _get_name(self):
        """
    Getter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/name (string)

    YANG Description: Path name
    """
        return self.__name

    def _set_name(self, v, load=False):
        """
    Setter method for name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/name (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_name() directly.

    YANG Description: Path name
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=six.text_type,
                is_leaf=True,
                yang_name="name",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="string",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """name must be of a type compatible with string""",
                    "defined-type": "string",
                    "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='string', is_config=True)""",
                }
            )

        self.__name = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_name(self):
        self.__name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="string",
            is_config=True,
        )

    def _get_path_computation_method(self):
        """
    Getter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
        return self.__path_computation_method

    def _set_path_computation_method(self, v, load=False):
        """
    Setter method for path_computation_method, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_method (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_method is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_method() directly.

    YANG Description: The method used for computing the path, either
locally computed, queried from a server or not
computed at all (explicitly configured).
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=six.text_type,
                    restriction_type="dict_key",
                    restriction_arg={
                        "LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-types:LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mplst:LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-t:LOCALLY_COMPUTED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-types:EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mplst:EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-t:EXTERNALLY_QUERIED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-types:EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mplst:EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                        "oc-mpls-t:EXPLICITLY_DEFINED": {
                            "@module": "openconfig-mpls-types",
                            "@namespace": "http://openconfig.net/yang/mpls-types",
                        },
                    },
                ),
                default=six.text_type("oc-mplst:LOCALLY_COMPUTED"),
                is_leaf=True,
                yang_name="path-computation-method",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="identityref",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """path_computation_method must be of a type compatible with identityref""",
                    "defined-type": "openconfig-network-instance:identityref",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type, restriction_type="dict_key", restriction_arg={'LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-types:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-t:LOCALLY_COMPUTED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-types:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-t:EXTERNALLY_QUERIED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-types:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mplst:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}, 'oc-mpls-t:EXPLICITLY_DEFINED': {'@module': 'openconfig-mpls-types', '@namespace': 'http://openconfig.net/yang/mpls-types'}},), default=six.text_type("oc-mplst:LOCALLY_COMPUTED"), is_leaf=True, yang_name="path-computation-method", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='identityref', is_config=True)""",
                }
            )

        self.__path_computation_method = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_path_computation_method(self):
        self.__path_computation_method = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={
                    "LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:LOCALLY_COMPUTED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXTERNALLY_QUERIED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-types:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mplst:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                    "oc-mpls-t:EXPLICITLY_DEFINED": {
                        "@module": "openconfig-mpls-types",
                        "@namespace": "http://openconfig.net/yang/mpls-types",
                    },
                },
            ),
            default=six.text_type("oc-mplst:LOCALLY_COMPUTED"),
            is_leaf=True,
            yang_name="path-computation-method",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="identityref",
            is_config=True,
        )

    def _get_use_cspf(self):
        """
    Getter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
        return self.__use_cspf

    def _set_use_cspf(self, v, load=False):
        """
    Setter method for use_cspf, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/use_cspf (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_use_cspf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_use_cspf() directly.

    YANG Description: Flag to enable CSPF for locally computed LSPs
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=YANGBool,
                is_leaf=True,
                yang_name="use-cspf",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="boolean",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """use_cspf must be of a type compatible with boolean""",
                    "defined-type": "boolean",
                    "generated-type": """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="use-cspf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='boolean', is_config=True)""",
                }
            )

        self.__use_cspf = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_use_cspf(self):
        self.__use_cspf = YANGDynClass(
            base=YANGBool,
            is_leaf=True,
            yang_name="use-cspf",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="boolean",
            is_config=True,
        )

    def _get_cspf_tiebreaker(self):
        """
    Getter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
        return self.__cspf_tiebreaker

    def _set_cspf_tiebreaker(self, v, load=False):
        """
    Setter method for cspf_tiebreaker, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/cspf_tiebreaker (cspf-tie-breaking)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_cspf_tiebreaker is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_cspf_tiebreaker() directly.

    YANG Description: Determine the tie-breaking method to choose between
equally desirable paths during CSFP computation
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=six.text_type,
                    restriction_type="dict_key",
                    restriction_arg={"RANDOM": {}, "LEAST_FILL": {}, "MOST_FILL": {}},
                ),
                default=six.text_type("RANDOM"),
                is_leaf=True,
                yang_name="cspf-tiebreaker",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="cspf-tie-breaking",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """cspf_tiebreaker must be of a type compatible with cspf-tie-breaking""",
                    "defined-type": "openconfig-network-instance:cspf-tie-breaking",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'RANDOM': {}, 'LEAST_FILL': {}, 'MOST_FILL': {}},), default=six.text_type("RANDOM"), is_leaf=True, yang_name="cspf-tiebreaker", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='cspf-tie-breaking', is_config=True)""",
                }
            )

        self.__cspf_tiebreaker = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_cspf_tiebreaker(self):
        self.__cspf_tiebreaker = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"RANDOM": {}, "LEAST_FILL": {}, "MOST_FILL": {}},
            ),
            default=six.text_type("RANDOM"),
            is_leaf=True,
            yang_name="cspf-tiebreaker",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="cspf-tie-breaking",
            is_config=True,
        )

    def _get_path_computation_server(self):
        """
    Getter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (inet:ip-address)

    YANG Description: Address of the external path computation
server
    """
        return self.__path_computation_server

    def _set_path_computation_server(self, v, load=False):
        """
    Setter method for path_computation_server, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/path_computation_server (inet:ip-address)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_path_computation_server is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_path_computation_server() directly.

    YANG Description: Address of the external path computation
server
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=[
                    RestrictedClassType(
                        base_type=six.text_type,
                        restriction_dict={
                            "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
                        },
                    ),
                    RestrictedClassType(
                        base_type=six.text_type,
                        restriction_dict={
                            "pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
                        },
                    ),
                ],
                is_leaf=True,
                yang_name="path-computation-server",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="inet:ip-address",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """path_computation_server must be of a type compatible with inet:ip-address""",
                    "defined-type": "inet:ip-address",
                    "generated-type": """YANGDynClass(base=[RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?'}),RestrictedClassType(base_type=six.text_type, restriction_dict={'pattern': '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?'}),], is_leaf=True, yang_name="path-computation-server", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='inet:ip-address', is_config=True)""",
                }
            )

        self.__path_computation_server = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_path_computation_server(self):
        self.__path_computation_server = YANGDynClass(
            base=[
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\\p{N}\\p{L}]+)?"
                    },
                ),
                RestrictedClassType(
                    base_type=six.text_type,
                    restriction_dict={
                        "pattern": "((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(%[\\p{N}\\p{L}]+)?"
                    },
                ),
            ],
            is_leaf=True,
            yang_name="path-computation-server",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="inet:ip-address",
            is_config=True,
        )

    def _get_explicit_path_name(self):
        """
    Getter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)

    YANG Description: reference to a defined path
    """
        return self.__explicit_path_name

    def _set_explicit_path_name(self, v, load=False):
        """
    Setter method for explicit_path_name, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/explicit_path_name (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_explicit_path_name is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_explicit_path_name() directly.

    YANG Description: reference to a defined path
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=six.text_type,
                is_leaf=True,
                yang_name="explicit-path-name",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=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": """explicit_path_name must be of a type compatible with leafref""",
                    "defined-type": "leafref",
                    "generated-type": """YANGDynClass(base=six.text_type, is_leaf=True, yang_name="explicit-path-name", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='leafref', is_config=True)""",
                }
            )

        self.__explicit_path_name = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_explicit_path_name(self):
        self.__explicit_path_name = YANGDynClass(
            base=six.text_type,
            is_leaf=True,
            yang_name="explicit-path-name",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="leafref",
            is_config=True,
        )

    def _get_preference(self):
        """
    Getter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
        return self.__preference

    def _set_preference(self, v, load=False):
        """
    Setter method for preference, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/preference (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_preference is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_preference() directly.

    YANG Description: Specifies a preference for this path. The lower the
number higher the preference
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["1..255"]},
                ),
                is_leaf=True,
                yang_name="preference",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint8",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """preference must be of a type compatible with uint8""",
                    "defined-type": "uint8",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['1..255']}), is_leaf=True, yang_name="preference", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
                }
            )

        self.__preference = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_preference(self):
        self.__preference = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["1..255"]},
            ),
            is_leaf=True,
            yang_name="preference",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )

    def _get_setup_priority(self):
        """
    Getter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
        return self.__setup_priority

    def _set_setup_priority(self, v, load=False):
        """
    Setter method for setup_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/setup_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_setup_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_setup_priority() directly.

    YANG Description: RSVP-TE preemption priority during LSP setup, lower is
higher priority; default 7 indicates that LSP will not
preempt established LSPs during setup
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..7"]},
                ),
                default=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                )(
                    7
                ),
                is_leaf=True,
                yang_name="setup-priority",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint8",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """setup_priority must be of a type compatible with uint8""",
                    "defined-type": "uint8",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(7), is_leaf=True, yang_name="setup-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
                }
            )

        self.__setup_priority = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_setup_priority(self):
        self.__setup_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                7
            ),
            is_leaf=True,
            yang_name="setup-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )

    def _get_hold_priority(self):
        """
    Getter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
        return self.__hold_priority

    def _set_hold_priority(self, v, load=False):
        """
    Setter method for hold_priority, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/hold_priority (uint8)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_hold_priority is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_hold_priority() directly.

    YANG Description: preemption priority once the LSP is established,
lower is higher priority; default 0 indicates other LSPs
will not preempt the LSPs once established
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..7"]},
                ),
                default=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                )(
                    0
                ),
                is_leaf=True,
                yang_name="hold-priority",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint8",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """hold_priority must be of a type compatible with uint8""",
                    "defined-type": "uint8",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..7']}), default=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8)(0), is_leaf=True, yang_name="hold-priority", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint8', is_config=True)""",
                }
            )

        self.__hold_priority = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_hold_priority(self):
        self.__hold_priority = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..7"]},
            ),
            default=RestrictedClassType(
                base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
            )(
                0
            ),
            is_leaf=True,
            yang_name="hold-priority",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint8",
            is_config=True,
        )

    def _get_retry_timer(self):
        """
    Getter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)

    YANG Description: sets the time between attempts to establish the
LSP
    """
        return self.__retry_timer

    def _set_retry_timer(self, v, load=False):
        """
    Setter method for retry_timer, mapped from YANG variable /network_instances/network_instance/mpls/lsps/constrained_path/tunnels/tunnel/p2p_tunnel_attributes/p2p_primary_path/p2p_primary_path/config/retry_timer (uint16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_retry_timer is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_retry_timer() directly.

    YANG Description: sets the time between attempts to establish the
LSP
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..65535"]},
                        int_size=16,
                    ),
                    restriction_dict={"range": ["1..600"]},
                ),
                is_leaf=True,
                yang_name="retry-timer",
                parent=self,
                path_helper=self._path_helper,
                extmethods=self._extmethods,
                register_paths=True,
                namespace="http://openconfig.net/yang/network-instance",
                defining_module="openconfig-network-instance",
                yang_type="uint16",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """retry_timer must be of a type compatible with uint16""",
                    "defined-type": "uint16",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..65535']},int_size=16), restriction_dict={'range': ['1..600']}), is_leaf=True, yang_name="retry-timer", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/network-instance', defining_module='openconfig-network-instance', yang_type='uint16', is_config=True)""",
                }
            )

        self.__retry_timer = t
        if hasattr(self, "_set"):
            self._set()

    def _unset_retry_timer(self):
        self.__retry_timer = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..65535"]}, int_size=16
                ),
                restriction_dict={"range": ["1..600"]},
            ),
            is_leaf=True,
            yang_name="retry-timer",
            parent=self,
            path_helper=self._path_helper,
            extmethods=self._extmethods,
            register_paths=True,
            namespace="http://openconfig.net/yang/network-instance",
            defining_module="openconfig-network-instance",
            yang_type="uint16",
            is_config=True,
        )

    name = __builtin__.property(_get_name, _set_name)
    path_computation_method = __builtin__.property(
        _get_path_computation_method, _set_path_computation_method
    )
    use_cspf = __builtin__.property(_get_use_cspf, _set_use_cspf)
    cspf_tiebreaker = __builtin__.property(_get_cspf_tiebreaker, _set_cspf_tiebreaker)
    path_computation_server = __builtin__.property(
        _get_path_computation_server, _set_path_computation_server
    )
    explicit_path_name = __builtin__.property(
        _get_explicit_path_name, _set_explicit_path_name
    )
    preference = __builtin__.property(_get_preference, _set_preference)
    setup_priority = __builtin__.property(_get_setup_priority, _set_setup_priority)
    hold_priority = __builtin__.property(_get_hold_priority, _set_hold_priority)
    retry_timer = __builtin__.property(_get_retry_timer, _set_retry_timer)

    _pyangbind_elements = OrderedDict(
        [
            ("name", name),
            ("path_computation_method", path_computation_method),
            ("use_cspf", use_cspf),
            ("cspf_tiebreaker", cspf_tiebreaker),
            ("path_computation_server", path_computation_server),
            ("explicit_path_name", explicit_path_name),
            ("preference", preference),
            ("setup_priority", setup_priority),
            ("hold_priority", hold_priority),
            ("retry_timer", retry_timer),
        ]
    )
