def __init__(self, *args, **kwargs):
    self._path_helper = False
    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name='interface', parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name='subinterface', parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    load = kwargs.pop('load', None)
    if args:
        if (len(args) > 1):
            raise TypeError('cannot create a YANG container with >1 argument')
        all_attr = True
        for e in self._pyangbind_elements:
            if (not hasattr(args[0], e)):
                all_attr = False
                break
        if (not all_attr):
            raise ValueError('Supplied object did not have the correct attributes')
        for e in self._pyangbind_elements:
            nobj = getattr(args[0], e)
            if (nobj._changed() is False):
                continue
            setmethod = getattr(self, ('_set_%s' % e))
            if (load is None):
                setmethod(getattr(args[0], e))
            else:
                setmethod(getattr(args[0], e), load=load)
def __init__(self, *args, **kwargs):
    self._path_helper = False
    self._extmethods = False
    self.__interface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name='interface', parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    self.__subinterface = YANGDynClass(base=six.text_type, is_leaf=True, yang_name='subinterface', parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/interfaces/ip', defining_module='openconfig-if-ip', yang_type='leafref', is_config=True)
    load = kwargs.pop('load', None)
    if args:
        if (len(args) > 1):
            raise TypeError('cannot create a YANG container with >1 argument')
        all_attr = True
        for e in self._pyangbind_elements:
            if (not hasattr(args[0], e)):
                all_attr = False
                break
        if (not all_attr):
            raise ValueError('Supplied object did not have the correct attributes')
        for e in self._pyangbind_elements:
            nobj = getattr(args[0], e)
            if (nobj._changed() is False):
                continue
            setmethod = getattr(self, ('_set_%s' % e))
            if (load is None):
                setmethod(getattr(args[0], e))
            else:
                setmethod(getattr(args[0], e), load=load)