Setter method for gw_type, mapped from YANG variable /overlay_gateway/gw_type (overlay-gw-type)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_gw_type is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_gw_type() directly.

    YANG Description: Defines type of function provided by this gateway.

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

    YANG Description: Defines type of function provided by this gateway.
    """
    if hasattr(v, "_utype"):
      v = v._utype(v)
    try:
      t = YANGDynClass(v,base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'layer2-extension': {'value': 2}},), is_leaf=True, yang_name="gw-type", rest_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure the type of Overlay Gateway.', u'alt-name': u'type', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-tunnels', defining_module='brocade-tunnels', yang_type='overlay-gw-type', is_config=True)
    except (TypeError, ValueError):
      raise ValueError({
          'error-string': """gw_type must be of a type compatible with overlay-gw-type""",
          'defined-type': "brocade-tunnels:overlay-gw-type",
          'generated-type': """YANGDynClass(base=RestrictedClassType(base_type=unicode,                                     restriction_type="dict_key",                                     restriction_arg={u'layer2-extension': {'value': 2}},), is_leaf=True, yang_name="gw-type", rest_name="type", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, extensions={u'tailf-common': {u'info': u'Configure the type of Overlay Gateway.', u'alt-name': u'type', u'cli-suppress-no': None}}, namespace='urn:brocade.com:mgmt:brocade-tunnels', defining_module='brocade-tunnels', yang_type='overlay-gw-type', is_config=True)""",
        })

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