# -*- 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/te-interface-attributes/interface/igp-flooding-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for TED
update threshold 
  """
    __slots__ = (
        "_path_helper",
        "_extmethods",
        "__threshold_type",
        "__delta_percentage",
        "__threshold_specification",
        "__up_thresholds",
        "__down_thresholds",
        "__up_down_thresholds",
    )

    _yang_name = "config"

    _pybind_generated_by = "container"

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

        self._path_helper = False

        self._extmethods = False
        self.__threshold_type = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"DELTA": {}, "THRESHOLD_CROSSED": {}},
            ),
            is_leaf=True,
            yang_name="threshold-type",
            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="enumeration",
            is_config=True,
        )
        self.__delta_percentage = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..100"]},
            ),
            is_leaf=True,
            yang_name="delta-percentage",
            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="oc-types:percentage",
            is_config=True,
        )
        self.__threshold_specification = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"MIRRORED_UP_DOWN": {}, "SEPARATE_UP_DOWN": {}},
            ),
            is_leaf=True,
            yang_name="threshold-specification",
            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="enumeration",
            is_config=True,
        )
        self.__up_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )
        self.__down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="down-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )
        self.__up_down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-down-thresholds",
            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="oc-types:percentage",
            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",
                "te-interface-attributes",
                "interface",
                "igp-flooding-bandwidth",
                "config",
            ]

    def _get_threshold_type(self):
        """
    Getter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
        return self.__threshold_type

    def _set_threshold_type(self, v, load=False):
        """
    Setter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_type() directly.

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
        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={"DELTA": {}, "THRESHOLD_CROSSED": {}},
                ),
                is_leaf=True,
                yang_name="threshold-type",
                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="enumeration",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """threshold_type must be of a type compatible with enumeration""",
                    "defined-type": "openconfig-network-instance:enumeration",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", 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='enumeration', is_config=True)""",
                }
            )

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

    def _unset_threshold_type(self):
        self.__threshold_type = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"DELTA": {}, "THRESHOLD_CROSSED": {}},
            ),
            is_leaf=True,
            yang_name="threshold-type",
            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="enumeration",
            is_config=True,
        )

    def _get_delta_percentage(self):
        """
    Getter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
        return self.__delta_percentage

    def _set_delta_percentage(self, v, load=False):
        """
    Setter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delta_percentage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delta_percentage() directly.

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
        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..100"]},
                ),
                is_leaf=True,
                yang_name="delta-percentage",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """delta_percentage must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="delta-percentage", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_delta_percentage(self):
        self.__delta_percentage = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..100"]},
            ),
            is_leaf=True,
            yang_name="delta-percentage",
            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="oc-types:percentage",
            is_config=True,
        )

    def _get_threshold_specification(self):
        """
    Getter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
        return self.__threshold_specification

    def _set_threshold_specification(self, v, load=False):
        """
    Setter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_specification is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_specification() directly.

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
        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={"MIRRORED_UP_DOWN": {}, "SEPARATE_UP_DOWN": {}},
                ),
                is_leaf=True,
                yang_name="threshold-specification",
                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="enumeration",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """threshold_specification must be of a type compatible with enumeration""",
                    "defined-type": "openconfig-network-instance:enumeration",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", 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='enumeration', is_config=True)""",
                }
            )

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

    def _unset_threshold_specification(self):
        self.__threshold_specification = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"MIRRORED_UP_DOWN": {}, "SEPARATE_UP_DOWN": {}},
            ),
            is_leaf=True,
            yang_name="threshold-specification",
            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="enumeration",
            is_config=True,
        )

    def _get_up_thresholds(self):
        """
    Getter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
        return self.__up_thresholds

    def _set_up_thresholds(self, v, load=False):
        """
    Setter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=TypedListType(
                    allowed_type=RestrictedClassType(
                        base_type=RestrictedClassType(
                            base_type=int,
                            restriction_dict={"range": ["0..255"]},
                            int_size=8,
                        ),
                        restriction_dict={"range": ["0..100"]},
                    )
                ),
                is_leaf=False,
                yang_name="up-thresholds",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """up_thresholds must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']})), is_leaf=False, yang_name="up-thresholds", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_up_thresholds(self):
        self.__up_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )

    def _get_down_thresholds(self):
        """
    Getter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
        return self.__down_thresholds

    def _set_down_thresholds(self, v, load=False):
        """
    Setter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=TypedListType(
                    allowed_type=RestrictedClassType(
                        base_type=RestrictedClassType(
                            base_type=int,
                            restriction_dict={"range": ["0..255"]},
                            int_size=8,
                        ),
                        restriction_dict={"range": ["0..100"]},
                    )
                ),
                is_leaf=False,
                yang_name="down-thresholds",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """down_thresholds must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']})), is_leaf=False, yang_name="down-thresholds", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_down_thresholds(self):
        self.__down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="down-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )

    def _get_up_down_thresholds(self):
        """
    Getter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
        return self.__up_down_thresholds

    def _set_up_down_thresholds(self, v, load=False):
        """
    Setter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=TypedListType(
                    allowed_type=RestrictedClassType(
                        base_type=RestrictedClassType(
                            base_type=int,
                            restriction_dict={"range": ["0..255"]},
                            int_size=8,
                        ),
                        restriction_dict={"range": ["0..100"]},
                    )
                ),
                is_leaf=False,
                yang_name="up-down-thresholds",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """up_down_thresholds must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']})), is_leaf=False, yang_name="up-down-thresholds", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_up_down_thresholds(self):
        self.__up_down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-down-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )

    threshold_type = __builtin__.property(_get_threshold_type, _set_threshold_type)
    delta_percentage = __builtin__.property(
        _get_delta_percentage, _set_delta_percentage
    )
    threshold_specification = __builtin__.property(
        _get_threshold_specification, _set_threshold_specification
    )
    up_thresholds = __builtin__.property(_get_up_thresholds, _set_up_thresholds)
    down_thresholds = __builtin__.property(_get_down_thresholds, _set_down_thresholds)
    up_down_thresholds = __builtin__.property(
        _get_up_down_thresholds, _set_up_down_thresholds
    )

    _pyangbind_elements = OrderedDict(
        [
            ("threshold_type", threshold_type),
            ("delta_percentage", delta_percentage),
            ("threshold_specification", threshold_specification),
            ("up_thresholds", up_thresholds),
            ("down_thresholds", down_thresholds),
            ("up_down_thresholds", up_down_thresholds),
        ]
    )


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/te-interface-attributes/interface/igp-flooding-bandwidth/config. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Configuration parameters for TED
update threshold 
  """
    __slots__ = (
        "_path_helper",
        "_extmethods",
        "__threshold_type",
        "__delta_percentage",
        "__threshold_specification",
        "__up_thresholds",
        "__down_thresholds",
        "__up_down_thresholds",
    )

    _yang_name = "config"

    _pybind_generated_by = "container"

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

        self._path_helper = False

        self._extmethods = False
        self.__threshold_type = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"DELTA": {}, "THRESHOLD_CROSSED": {}},
            ),
            is_leaf=True,
            yang_name="threshold-type",
            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="enumeration",
            is_config=True,
        )
        self.__delta_percentage = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..100"]},
            ),
            is_leaf=True,
            yang_name="delta-percentage",
            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="oc-types:percentage",
            is_config=True,
        )
        self.__threshold_specification = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"MIRRORED_UP_DOWN": {}, "SEPARATE_UP_DOWN": {}},
            ),
            is_leaf=True,
            yang_name="threshold-specification",
            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="enumeration",
            is_config=True,
        )
        self.__up_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )
        self.__down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="down-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )
        self.__up_down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-down-thresholds",
            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="oc-types:percentage",
            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",
                "te-interface-attributes",
                "interface",
                "igp-flooding-bandwidth",
                "config",
            ]

    def _get_threshold_type(self):
        """
    Getter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
        return self.__threshold_type

    def _set_threshold_type(self, v, load=False):
        """
    Setter method for threshold_type, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_type (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_type() directly.

    YANG Description: The type of threshold that should be used to specify the
values at which bandwidth is flooded. DELTA indicates that
the local system should flood IGP updates when a change in
reserved bandwidth >= the specified delta occurs on the
interface. Where THRESHOLD_CROSSED is specified, the local
system should trigger an update (and hence flood) the
reserved bandwidth when the reserved bandwidth changes such
that it crosses, or becomes equal to one of the threshold
values
    """
        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={"DELTA": {}, "THRESHOLD_CROSSED": {}},
                ),
                is_leaf=True,
                yang_name="threshold-type",
                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="enumeration",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """threshold_type must be of a type compatible with enumeration""",
                    "defined-type": "openconfig-network-instance:enumeration",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'DELTA': {}, 'THRESHOLD_CROSSED': {}},), is_leaf=True, yang_name="threshold-type", 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='enumeration', is_config=True)""",
                }
            )

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

    def _unset_threshold_type(self):
        self.__threshold_type = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"DELTA": {}, "THRESHOLD_CROSSED": {}},
            ),
            is_leaf=True,
            yang_name="threshold-type",
            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="enumeration",
            is_config=True,
        )

    def _get_delta_percentage(self):
        """
    Getter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
        return self.__delta_percentage

    def _set_delta_percentage(self, v, load=False):
        """
    Setter method for delta_percentage, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/delta_percentage (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_delta_percentage is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_delta_percentage() directly.

    YANG Description: The percentage of the maximum-reservable-bandwidth
considered as the delta that results in an IGP update
being flooded
    """
        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..100"]},
                ),
                is_leaf=True,
                yang_name="delta-percentage",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """delta_percentage must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']}), is_leaf=True, yang_name="delta-percentage", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_delta_percentage(self):
        self.__delta_percentage = YANGDynClass(
            base=RestrictedClassType(
                base_type=RestrictedClassType(
                    base_type=int, restriction_dict={"range": ["0..255"]}, int_size=8
                ),
                restriction_dict={"range": ["0..100"]},
            ),
            is_leaf=True,
            yang_name="delta-percentage",
            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="oc-types:percentage",
            is_config=True,
        )

    def _get_threshold_specification(self):
        """
    Getter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
        return self.__threshold_specification

    def _set_threshold_specification(self, v, load=False):
        """
    Setter method for threshold_specification, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/threshold_specification (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_threshold_specification is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_threshold_specification() directly.

    YANG Description: This value specifies whether a single set of threshold
values should be used for both increasing and decreasing
bandwidth when determining whether to trigger updated
bandwidth values to be flooded in the IGP TE extensions.
MIRRORED-UP-DOWN indicates that a single value (or set of
values) should be used for both increasing and decreasing
values, where SEPARATE-UP-DOWN specifies that the increasing
and decreasing values will be separately specified
    """
        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={"MIRRORED_UP_DOWN": {}, "SEPARATE_UP_DOWN": {}},
                ),
                is_leaf=True,
                yang_name="threshold-specification",
                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="enumeration",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """threshold_specification must be of a type compatible with enumeration""",
                    "defined-type": "openconfig-network-instance:enumeration",
                    "generated-type": """YANGDynClass(base=RestrictedClassType(base_type=six.text_type,                                     restriction_type="dict_key",                                     restriction_arg={'MIRRORED_UP_DOWN': {}, 'SEPARATE_UP_DOWN': {}},), is_leaf=True, yang_name="threshold-specification", 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='enumeration', is_config=True)""",
                }
            )

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

    def _unset_threshold_specification(self):
        self.__threshold_specification = YANGDynClass(
            base=RestrictedClassType(
                base_type=six.text_type,
                restriction_type="dict_key",
                restriction_arg={"MIRRORED_UP_DOWN": {}, "SEPARATE_UP_DOWN": {}},
            ),
            is_leaf=True,
            yang_name="threshold-specification",
            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="enumeration",
            is_config=True,
        )

    def _get_up_thresholds(self):
        """
    Getter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
        return self.__up_thresholds

    def _set_up_thresholds(self, v, load=False):
        """
    Setter method for up_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is increasing.
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=TypedListType(
                    allowed_type=RestrictedClassType(
                        base_type=RestrictedClassType(
                            base_type=int,
                            restriction_dict={"range": ["0..255"]},
                            int_size=8,
                        ),
                        restriction_dict={"range": ["0..100"]},
                    )
                ),
                is_leaf=False,
                yang_name="up-thresholds",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """up_thresholds must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']})), is_leaf=False, yang_name="up-thresholds", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_up_thresholds(self):
        self.__up_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )

    def _get_down_thresholds(self):
        """
    Getter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
        return self.__down_thresholds

    def _set_down_thresholds(self, v, load=False):
        """
    Setter method for down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth) at which bandwidth updates are to be
triggered when the bandwidth is decreasing.
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=TypedListType(
                    allowed_type=RestrictedClassType(
                        base_type=RestrictedClassType(
                            base_type=int,
                            restriction_dict={"range": ["0..255"]},
                            int_size=8,
                        ),
                        restriction_dict={"range": ["0..100"]},
                    )
                ),
                is_leaf=False,
                yang_name="down-thresholds",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """down_thresholds must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']})), is_leaf=False, yang_name="down-thresholds", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_down_thresholds(self):
        self.__down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="down-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )

    def _get_up_down_thresholds(self):
        """
    Getter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
        return self.__up_down_thresholds

    def _set_up_down_thresholds(self, v, load=False):
        """
    Setter method for up_down_thresholds, mapped from YANG variable /network_instances/network_instance/mpls/te_interface_attributes/interface/igp_flooding_bandwidth/config/up_down_thresholds (oc-types:percentage)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_up_down_thresholds is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_up_down_thresholds() directly.

    YANG Description: The thresholds (expressed as a percentage of the maximum
reservable bandwidth of the interface) at which bandwidth
updates are flooded - used both when the bandwidth is
increasing and decreasing
    """
        if hasattr(v, "_utype"):
            v = v._utype(v)
        try:
            t = YANGDynClass(
                v,
                base=TypedListType(
                    allowed_type=RestrictedClassType(
                        base_type=RestrictedClassType(
                            base_type=int,
                            restriction_dict={"range": ["0..255"]},
                            int_size=8,
                        ),
                        restriction_dict={"range": ["0..100"]},
                    )
                ),
                is_leaf=False,
                yang_name="up-down-thresholds",
                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="oc-types:percentage",
                is_config=True,
            )
        except (TypeError, ValueError):
            raise ValueError(
                {
                    "error-string": """up_down_thresholds must be of a type compatible with oc-types:percentage""",
                    "defined-type": "oc-types:percentage",
                    "generated-type": """YANGDynClass(base=TypedListType(allowed_type=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0..255']}, int_size=8), restriction_dict={'range': ['0..100']})), is_leaf=False, yang_name="up-down-thresholds", 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='oc-types:percentage', is_config=True)""",
                }
            )

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

    def _unset_up_down_thresholds(self):
        self.__up_down_thresholds = YANGDynClass(
            base=TypedListType(
                allowed_type=RestrictedClassType(
                    base_type=RestrictedClassType(
                        base_type=int,
                        restriction_dict={"range": ["0..255"]},
                        int_size=8,
                    ),
                    restriction_dict={"range": ["0..100"]},
                )
            ),
            is_leaf=False,
            yang_name="up-down-thresholds",
            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="oc-types:percentage",
            is_config=True,
        )

    threshold_type = __builtin__.property(_get_threshold_type, _set_threshold_type)
    delta_percentage = __builtin__.property(
        _get_delta_percentage, _set_delta_percentage
    )
    threshold_specification = __builtin__.property(
        _get_threshold_specification, _set_threshold_specification
    )
    up_thresholds = __builtin__.property(_get_up_thresholds, _set_up_thresholds)
    down_thresholds = __builtin__.property(_get_down_thresholds, _set_down_thresholds)
    up_down_thresholds = __builtin__.property(
        _get_up_down_thresholds, _set_up_down_thresholds
    )

    _pyangbind_elements = OrderedDict(
        [
            ("threshold_type", threshold_type),
            ("delta_percentage", delta_percentage),
            ("threshold_specification", threshold_specification),
            ("up_thresholds", up_thresholds),
            ("down_thresholds", down_thresholds),
            ("up_down_thresholds", up_down_thresholds),
        ]
    )
