def _set_subinterface(self, v, load=False):
    '\n    Setter method for subinterface, mapped from YANG variable /interfaces/interface/subinterfaces/subinterface/ipv4/unnumbered/interface_ref/config/subinterface (leafref)\n    If this variable is read-only (config: false) in the\n    source YANG file, then _set_subinterface is considered as a private\n    method. Backends looking to populate this variable should\n    do so via calling thisObj._set_subinterface() directly.\n\n    YANG Description: Reference to a subinterface -- this requires the base\ninterface to be specified using the interface leaf in\nthis container.  If only a reference to a base interface\nis requuired, this leaf should not be set.\n    '
    if hasattr(v, '_utype'):
        v = v._utype(v)
    try:
        t = YANGDynClass(v, 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)
    except (TypeError, ValueError):
        raise ValueError({'error-string': 'subinterface must be of a type compatible with leafref', 'defined-type': 'leafref', 'generated-type': '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)'})
    self.__subinterface = t
    if hasattr(self, '_set'):
        self._set()
Setter method for subinterface, mapped from YANG variable /interfaces/interface/subinterfaces/subinterface/ipv4/unnumbered/interface_ref/config/subinterface (leafref)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_subinterface is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_subinterface() directly.

    YANG Description: Reference to a subinterface -- this requires the base
interface to be specified using the interface leaf in
this container.  If only a reference to a base interface
is requuired, this leaf should not be set.
def _set_subinterface(self, v, load=False):
    '\n    Setter method for subinterface, mapped from YANG variable /interfaces/interface/subinterfaces/subinterface/ipv4/unnumbered/interface_ref/config/subinterface (leafref)\n    If this variable is read-only (config: false) in the\n    source YANG file, then _set_subinterface is considered as a private\n    method. Backends looking to populate this variable should\n    do so via calling thisObj._set_subinterface() directly.\n\n    YANG Description: Reference to a subinterface -- this requires the base\ninterface to be specified using the interface leaf in\nthis container.  If only a reference to a base interface\nis requuired, this leaf should not be set.\n    '
    if hasattr(v, '_utype'):
        v = v._utype(v)
    try:
        t = YANGDynClass(v, 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)
    except (TypeError, ValueError):
        raise ValueError({'error-string': 'subinterface must be of a type compatible with leafref', 'defined-type': 'leafref', 'generated-type': '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)'})
    self.__subinterface = t
    if hasattr(self, '_set'):
        self._set()