def _set_l4protocol(self, v, load=False):
    """
    Setter method for l4protocol, mapped from YANG variable /brocade_trilloam_rpc/l2traceroute/input/l4protocol (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l4protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l4protocol() directly.

    YANG Description: Layer 4 protocol, TCP or UDP
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'UDP': {'value': 2}, u'TCP': {'value': 1}},), is_leaf=True, yang_name="l4protocol", rest_name="l4protocol", parent=self, choice=(u'protocolType', u'IP'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-trilloam', defining_module='brocade-trilloam', yang_type='enumeration', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """l4protocol must be of a type compatible with enumeration""",
          'defined-type': "brocade-trilloam:enumeration",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'UDP': {'value': 2}, u'TCP': {'value': 1}},), is_leaf=True, yang_name="l4protocol", rest_name="l4protocol", parent=self, choice=(u'protocolType', u'IP'), path_helper=self._path_helper, extmethods=self._extmethods, register_paths=False, namespace='urn:brocade.com:mgmt:brocade-trilloam', defining_module='brocade-trilloam', yang_type='enumeration', is_config=True)""",
        })

    self.__l4protocol = t
    if hasattr(self, '_set'):
      self._set()
Setter method for l4protocol, mapped from YANG variable /brocade_trilloam_rpc/l2traceroute/input/l4protocol (enumeration)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_l4protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_l4protocol() directly.

    YANG Description: Layer 4 protocol, TCP or UDP