
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from decimal import Decimal
from bitarray import bitarray
import __builtin__
class state(PybindBase):
  """
  This class was auto-generated by the PythonClass plugin for PYANG
  from YANG module openconfig-platform - based on the path /components/component/transceiver/state. Each member element of
  the container is represented as a class variable - with a specific
  YANG type.

  YANG Description: Operational state data for client port transceivers
  """
  __slots__ = ('_pybind_generated_by', '_path_helper', '_yang_name', '_extmethods', '__enabled','__form_factor_preconf','__ethernet_pmd_preconf','__present','__form_factor','__connector_type','__internal_temp','__vendor','__vendor_part','__vendor_rev','__ethernet_pmd','__sonet_sdh_compliance_code','__otn_compliance_code','__serial_no','__date_code','__fault_condition',)

  _yang_name = 'state'

  _pybind_generated_by = 'container'

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

    self._path_helper = False

    self._extmethods = False
    self.__serial_no = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="serial-no", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    self.__ethernet_pmd = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__vendor = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    self.__fault_condition = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="fault-condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)
    self.__otn_compliance_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="otn-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__ethernet_pmd_preconf = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)
    self.__internal_temp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int,restriction_dict={'range': ['-32768..32767']}, int_size=16), restriction_dict={'range': [u'-40..125']}), is_leaf=True, yang_name="internal-temp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='int16', is_config=False)
    self.__date_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="date-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='yang:date-and-time', is_config=False)
    self.__connector_type = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="connector-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__sonet_sdh_compliance_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="sonet-sdh-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__vendor_rev = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..2']}), is_leaf=True, yang_name="vendor-rev", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    self.__form_factor = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__vendor_part = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor-part", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    self.__form_factor_preconf = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    self.__present = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NOT_PRESENT': {}, u'PRESENT': {}},), is_leaf=True, yang_name="present", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='enumeration', is_config=False)

    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 [u'components', u'component', u'transceiver', u'state']

  def _get_enabled(self):
    """
    Getter method for enabled, mapped from YANG variable /components/component/transceiver/state/enabled (boolean)

    YANG Description: Turns power on / off to the transceiver -- provides a means
to power on/off the transceiver (in the case of SFP, SFP+,
QSFP,...) or enable high-power mode (in the case of CFP,
CFP2, CFP4) and is optionally supported (device can choose to
always enable).  True = power on / high power, False =
powered off
    """
    return self.__enabled
      
  def _set_enabled(self, v, load=False):
    """
    Setter method for enabled, mapped from YANG variable /components/component/transceiver/state/enabled (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_enabled is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_enabled() directly.

    YANG Description: Turns power on / off to the transceiver -- provides a means
to power on/off the transceiver (in the case of SFP, SFP+,
QSFP,...) or enable high-power mode (in the case of CFP,
CFP2, CFP4) and is optionally supported (device can choose to
always enable).  True = power on / high power, False =
powered off
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """enabled must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_enabled(self):
    self.__enabled = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="enabled", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)


  def _get_form_factor_preconf(self):
    """
    Getter method for form_factor_preconf, mapped from YANG variable /components/component/transceiver/state/form_factor_preconf (identityref)

    YANG Description: Indicates the type of optical transceiver used on this
port.  If the client port is built into the device and not
pluggable, then non-pluggable is the corresponding state. If
a device port supports multiple form factors (e.g. QSFP28
and QSFP+, then the value of the transceiver installed shall
be reported. If no transceiver is present, then the value of
the highest rate form factor shall be reported
(QSFP28, for example).

The form factor is included in configuration data to allow
pre-configuring a device with the expected type of
transceiver ahead of deployment.  The corresponding state
leaf should reflect the actual transceiver type plugged into
the system.
    """
    return self.__form_factor_preconf
      
  def _set_form_factor_preconf(self, v, load=False):
    """
    Setter method for form_factor_preconf, mapped from YANG variable /components/component/transceiver/state/form_factor_preconf (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_form_factor_preconf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_form_factor_preconf() directly.

    YANG Description: Indicates the type of optical transceiver used on this
port.  If the client port is built into the device and not
pluggable, then non-pluggable is the corresponding state. If
a device port supports multiple form factors (e.g. QSFP28
and QSFP+, then the value of the transceiver installed shall
be reported. If no transceiver is present, then the value of
the highest rate form factor shall be reported
(QSFP28, for example).

The form factor is included in configuration data to allow
pre-configuring a device with the expected type of
transceiver ahead of deployment.  The corresponding state
leaf should reflect the actual transceiver type plugged into
the system.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """form_factor_preconf must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_form_factor_preconf(self):
    self.__form_factor_preconf = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_ethernet_pmd_preconf(self):
    """
    Getter method for ethernet_pmd_preconf, mapped from YANG variable /components/component/transceiver/state/ethernet_pmd_preconf (identityref)

    YANG Description: The Ethernet PMD is a property of the optical transceiver
used on the port, indicating the type of physical connection.
It is included in configuration data to allow pre-configuring
a port/transceiver with the expected PMD.  The actual PMD is
indicated by the ethernet-pmd state leaf.
    """
    return self.__ethernet_pmd_preconf
      
  def _set_ethernet_pmd_preconf(self, v, load=False):
    """
    Setter method for ethernet_pmd_preconf, mapped from YANG variable /components/component/transceiver/state/ethernet_pmd_preconf (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_pmd_preconf is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_pmd_preconf() directly.

    YANG Description: The Ethernet PMD is a property of the optical transceiver
used on the port, indicating the type of physical connection.
It is included in configuration data to allow pre-configuring
a port/transceiver with the expected PMD.  The actual PMD is
indicated by the ethernet-pmd state leaf.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_pmd_preconf must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_ethernet_pmd_preconf(self):
    self.__ethernet_pmd_preconf = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd-preconf", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_present(self):
    """
    Getter method for present, mapped from YANG variable /components/component/transceiver/state/present (enumeration)

    YANG Description: Indicates whether a transceiver is present in
the specified client port.
    """
    return self.__present
      
  def _set_present(self, v, load=False):
    """
    Setter method for present, mapped from YANG variable /components/component/transceiver/state/present (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_present is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_present() directly.

    YANG Description: Indicates whether a transceiver is present in
the specified client port.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NOT_PRESENT': {}, u'PRESENT': {}},), is_leaf=True, yang_name="present", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='enumeration', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """present must be of a type compatible with enumeration""",
          'defined-type': "openconfig-platform-transceiver:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NOT_PRESENT': {}, u'PRESENT': {}},), is_leaf=True, yang_name="present", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='enumeration', is_config=False)""",
        })

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

  def _unset_present(self):
    self.__present = YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'NOT_PRESENT': {}, u'PRESENT': {}},), is_leaf=True, yang_name="present", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='enumeration', is_config=False)


  def _get_form_factor(self):
    """
    Getter method for form_factor, mapped from YANG variable /components/component/transceiver/state/form_factor (identityref)

    YANG Description: Indicates the type of optical transceiver used on this
port.  If the client port is built into the device and not
pluggable, then non-pluggable is the corresponding state. If
a device port supports multiple form factors (e.g. QSFP28
and QSFP+, then the value of the transceiver installed shall
be reported. If no transceiver is present, then the value of
the highest rate form factor shall be reported
(QSFP28, for example).
    """
    return self.__form_factor
      
  def _set_form_factor(self, v, load=False):
    """
    Setter method for form_factor, mapped from YANG variable /components/component/transceiver/state/form_factor (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_form_factor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_form_factor() directly.

    YANG Description: Indicates the type of optical transceiver used on this
port.  If the client port is built into the device and not
pluggable, then non-pluggable is the corresponding state. If
a device port supports multiple form factors (e.g. QSFP28
and QSFP+, then the value of the transceiver installed shall
be reported. If no transceiver is present, then the value of
the highest rate form factor shall be reported
(QSFP28, for example).
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """form_factor must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_form_factor(self):
    self.__form_factor = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP28': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CPAK': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'NON_PLUGGABLE': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'XFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:X2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP2_ACO': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTHER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'QSFP_PLUS': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'CFP': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="form-factor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_connector_type(self):
    """
    Getter method for connector_type, mapped from YANG variable /components/component/transceiver/state/connector_type (identityref)

    YANG Description: Connector type used on this port
    """
    return self.__connector_type
      
  def _set_connector_type(self, v, load=False):
    """
    Setter method for connector_type, mapped from YANG variable /components/component/transceiver/state/connector_type (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_connector_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_connector_type() directly.

    YANG Description: Connector type used on this port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="connector-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """connector_type must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="connector-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_connector_type(self):
    self.__connector_type = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'MPO_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'LC_CONNECTOR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="connector-type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_internal_temp(self):
    """
    Getter method for internal_temp, mapped from YANG variable /components/component/transceiver/state/internal_temp (int16)

    YANG Description: Internally measured temperature in degrees Celsius. MSA
valid range is between -40 and +125C. Accuracy shall be
better than +/- 3 degC over the whole temperature range.
    """
    return self.__internal_temp
      
  def _set_internal_temp(self, v, load=False):
    """
    Setter method for internal_temp, mapped from YANG variable /components/component/transceiver/state/internal_temp (int16)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_internal_temp is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_internal_temp() directly.

    YANG Description: Internally measured temperature in degrees Celsius. MSA
valid range is between -40 and +125C. Accuracy shall be
better than +/- 3 degC over the whole temperature range.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int,restriction_dict={'range': ['-32768..32767']}, int_size=16), restriction_dict={'range': [u'-40..125']}), is_leaf=True, yang_name="internal-temp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='int16', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """internal_temp must be of a type compatible with int16""",
          'defined-type': "int16",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int,restriction_dict={'range': ['-32768..32767']}, int_size=16), restriction_dict={'range': [u'-40..125']}), is_leaf=True, yang_name="internal-temp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='int16', is_config=False)""",
        })

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

  def _unset_internal_temp(self):
    self.__internal_temp = YANGDynClass(base=RestrictedClassType(base_type=RestrictedClassType(base_type=int,restriction_dict={'range': ['-32768..32767']}, int_size=16), restriction_dict={'range': [u'-40..125']}), is_leaf=True, yang_name="internal-temp", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='int16', is_config=False)


  def _get_vendor(self):
    """
    Getter method for vendor, mapped from YANG variable /components/component/transceiver/state/vendor (string)

    YANG Description: Full name of transceiver vendor. 16-octet field that
contains ASCII characters, left-aligned and padded on the
right with ASCII spaces (20h)
    """
    return self.__vendor
      
  def _set_vendor(self, v, load=False):
    """
    Setter method for vendor, mapped from YANG variable /components/component/transceiver/state/vendor (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vendor is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vendor() directly.

    YANG Description: Full name of transceiver vendor. 16-octet field that
contains ASCII characters, left-aligned and padded on the
right with ASCII spaces (20h)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vendor must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)""",
        })

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

  def _unset_vendor(self):
    self.__vendor = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)


  def _get_vendor_part(self):
    """
    Getter method for vendor_part, mapped from YANG variable /components/component/transceiver/state/vendor_part (string)

    YANG Description: Transceiver vendor's part number. 16-octet field that
contains ASCII characters, left-aligned and padded on the
right with ASCII spaces (20h). If part number is undefined,
all 16 octets = 0h
    """
    return self.__vendor_part
      
  def _set_vendor_part(self, v, load=False):
    """
    Setter method for vendor_part, mapped from YANG variable /components/component/transceiver/state/vendor_part (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vendor_part is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vendor_part() directly.

    YANG Description: Transceiver vendor's part number. 16-octet field that
contains ASCII characters, left-aligned and padded on the
right with ASCII spaces (20h). If part number is undefined,
all 16 octets = 0h
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor-part", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vendor_part must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor-part", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)""",
        })

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

  def _unset_vendor_part(self):
    self.__vendor_part = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="vendor-part", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)


  def _get_vendor_rev(self):
    """
    Getter method for vendor_rev, mapped from YANG variable /components/component/transceiver/state/vendor_rev (string)

    YANG Description: Transceiver vendor's revision number. 2-octet field that
contains ASCII characters, left-aligned and padded on the
right with ASCII spaces (20h)
    """
    return self.__vendor_rev
      
  def _set_vendor_rev(self, v, load=False):
    """
    Setter method for vendor_rev, mapped from YANG variable /components/component/transceiver/state/vendor_rev (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_vendor_rev is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_vendor_rev() directly.

    YANG Description: Transceiver vendor's revision number. 2-octet field that
contains ASCII characters, left-aligned and padded on the
right with ASCII spaces (20h)
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..2']}), is_leaf=True, yang_name="vendor-rev", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """vendor_rev must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..2']}), is_leaf=True, yang_name="vendor-rev", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)""",
        })

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

  def _unset_vendor_rev(self):
    self.__vendor_rev = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..2']}), is_leaf=True, yang_name="vendor-rev", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)


  def _get_ethernet_pmd(self):
    """
    Getter method for ethernet_pmd, mapped from YANG variable /components/component/transceiver/state/ethernet_pmd (identityref)

    YANG Description: Ethernet PMD (physical medium dependent sublayer) that the
transceiver supports. The SFF/QSFP MSAs have registers for
this and CFP MSA has similar.
    """
    return self.__ethernet_pmd
      
  def _set_ethernet_pmd(self, v, load=False):
    """
    Setter method for ethernet_pmd, mapped from YANG variable /components/component/transceiver/state/ethernet_pmd (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_ethernet_pmd is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_ethernet_pmd() directly.

    YANG Description: Ethernet PMD (physical medium dependent sublayer) that the
transceiver supports. The SFF/QSFP MSAs have registers for
this and CFP MSA has similar.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """ethernet_pmd must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_ethernet_pmd(self):
    self.__ethernet_pmd = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_AOC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100G_ACC': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ZR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_SR10': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_SR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_ER': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_SR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_10GBASE_LRM': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_40GBASE_LR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_CWDM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_100GBASE_PSM4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'ETH_40GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_4X10GBASE_LR': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_ER4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CLR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:ETH_100GBASE_CR4': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="ethernet-pmd", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_sonet_sdh_compliance_code(self):
    """
    Getter method for sonet_sdh_compliance_code, mapped from YANG variable /components/component/transceiver/state/sonet_sdh_compliance_code (identityref)

    YANG Description: SONET/SDH application code supported by the port
    """
    return self.__sonet_sdh_compliance_code
      
  def _set_sonet_sdh_compliance_code(self, v, load=False):
    """
    Setter method for sonet_sdh_compliance_code, mapped from YANG variable /components/component/transceiver/state/sonet_sdh_compliance_code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_sonet_sdh_compliance_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_sonet_sdh_compliance_code() directly.

    YANG Description: SONET/SDH application code supported by the port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="sonet-sdh-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """sonet_sdh_compliance_code must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="sonet-sdh-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_sonet_sdh_compliance_code(self):
    self.__sonet_sdh_compliance_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:SONET_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R3': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:VSR2000_3R5': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="sonet-sdh-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_otn_compliance_code(self):
    """
    Getter method for otn_compliance_code, mapped from YANG variable /components/component/transceiver/state/otn_compliance_code (identityref)

    YANG Description: OTN application code supported by the port
    """
    return self.__otn_compliance_code
      
  def _set_otn_compliance_code(self, v, load=False):
    """
    Setter method for otn_compliance_code, mapped from YANG variable /components/component/transceiver/state/otn_compliance_code (identityref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_otn_compliance_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_otn_compliance_code() directly.

    YANG Description: OTN application code supported by the port
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="otn-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """otn_compliance_code must be of a type compatible with identityref""",
          'defined-type': "openconfig-platform-transceiver:identityref",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="otn-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)""",
        })

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

  def _unset_otn_compliance_code(self):
    self.__otn_compliance_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_type="dict_key", restriction_arg={u'oc-opt-types:P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1L1_2D1': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'oc-opt-types:OTN_UNDEFINED': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}, u'P1S1_2D2': {'@namespace': u'http://openconfig.net/yang/transport-types', '@module': u'openconfig-transport-types'}},), is_leaf=True, yang_name="otn-compliance-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='identityref', is_config=False)


  def _get_serial_no(self):
    """
    Getter method for serial_no, mapped from YANG variable /components/component/transceiver/state/serial_no (string)

    YANG Description: Transceiver serial number. 16-octet field that contains
ASCII characters, left-aligned and padded on the right with
ASCII spaces (20h). If part serial number is undefined, all
16 octets = 0h
    """
    return self.__serial_no
      
  def _set_serial_no(self, v, load=False):
    """
    Setter method for serial_no, mapped from YANG variable /components/component/transceiver/state/serial_no (string)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_serial_no is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_serial_no() directly.

    YANG Description: Transceiver serial number. 16-octet field that contains
ASCII characters, left-aligned and padded on the right with
ASCII spaces (20h). If part serial number is undefined, all
16 octets = 0h
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="serial-no", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """serial_no must be of a type compatible with string""",
          'defined-type': "string",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="serial-no", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)""",
        })

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

  def _unset_serial_no(self):
    self.__serial_no = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'length': [u'1..16']}), is_leaf=True, yang_name="serial-no", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='string', is_config=False)


  def _get_date_code(self):
    """
    Getter method for date_code, mapped from YANG variable /components/component/transceiver/state/date_code (yang:date-and-time)

    YANG Description: Representation of the transceiver date code, typically
stored as YYMMDD.  The time portion of the value is
undefined and not intended to be read.
    """
    return self.__date_code
      
  def _set_date_code(self, v, load=False):
    """
    Setter method for date_code, mapped from YANG variable /components/component/transceiver/state/date_code (yang:date-and-time)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_date_code is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_date_code() directly.

    YANG Description: Representation of the transceiver date code, typically
stored as YYMMDD.  The time portion of the value is
undefined and not intended to be read.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="date-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='yang:date-and-time', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """date_code must be of a type compatible with yang:date-and-time""",
          'defined-type': "yang:date-and-time",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="date-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='yang:date-and-time', is_config=False)""",
        })

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

  def _unset_date_code(self):
    self.__date_code = YANGDynClass(base=RestrictedClassType(base_type=unicode, restriction_dict={'pattern': u'\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[\\+\\-]\\d{2}:\\d{2})'}), is_leaf=True, yang_name="date-code", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='yang:date-and-time', is_config=False)


  def _get_fault_condition(self):
    """
    Getter method for fault_condition, mapped from YANG variable /components/component/transceiver/state/fault_condition (boolean)

    YANG Description: Indicates if a fault condition exists in the transceiver
    """
    return self.__fault_condition
      
  def _set_fault_condition(self, v, load=False):
    """
    Setter method for fault_condition, mapped from YANG variable /components/component/transceiver/state/fault_condition (boolean)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_fault_condition is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_fault_condition() directly.

    YANG Description: Indicates if a fault condition exists in the transceiver
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name="fault-condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """fault_condition must be of a type compatible with boolean""",
          'defined-type': "boolean",
          'generated-type': """YANGDynClass(base=YANGBool, is_leaf=True, yang_name="fault-condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)""",
        })

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

  def _unset_fault_condition(self):
    self.__fault_condition = YANGDynClass(base=YANGBool, is_leaf=True, yang_name="fault-condition", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/platform/transceiver', defining_module='openconfig-platform-transceiver', yang_type='boolean', is_config=False)

  enabled = __builtin__.property(_get_enabled)
  form_factor_preconf = __builtin__.property(_get_form_factor_preconf)
  ethernet_pmd_preconf = __builtin__.property(_get_ethernet_pmd_preconf)
  present = __builtin__.property(_get_present)
  form_factor = __builtin__.property(_get_form_factor)
  connector_type = __builtin__.property(_get_connector_type)
  internal_temp = __builtin__.property(_get_internal_temp)
  vendor = __builtin__.property(_get_vendor)
  vendor_part = __builtin__.property(_get_vendor_part)
  vendor_rev = __builtin__.property(_get_vendor_rev)
  ethernet_pmd = __builtin__.property(_get_ethernet_pmd)
  sonet_sdh_compliance_code = __builtin__.property(_get_sonet_sdh_compliance_code)
  otn_compliance_code = __builtin__.property(_get_otn_compliance_code)
  serial_no = __builtin__.property(_get_serial_no)
  date_code = __builtin__.property(_get_date_code)
  fault_condition = __builtin__.property(_get_fault_condition)


  _pyangbind_elements = {'enabled': enabled, 'form_factor_preconf': form_factor_preconf, 'ethernet_pmd_preconf': ethernet_pmd_preconf, 'present': present, 'form_factor': form_factor, 'connector_type': connector_type, 'internal_temp': internal_temp, 'vendor': vendor, 'vendor_part': vendor_part, 'vendor_rev': vendor_rev, 'ethernet_pmd': ethernet_pmd, 'sonet_sdh_compliance_code': sonet_sdh_compliance_code, 'otn_compliance_code': otn_compliance_code, 'serial_no': serial_no, 'date_code': date_code, 'fault_condition': fault_condition, }


