# Path: dataclasses_json/undefined.py
# class Undefined(Enum):
#     """
#     Choose the behavior what happens when an undefined parameter is encountered
#     during class initialization.
#     """
#     INCLUDE = _CatchAllUndefinedParameters
#     RAISE = _RaiseUndefinedParameters
#     EXCLUDE = _IgnoreUndefinedParameters
# 
# class UndefinedParameterError(ValidationError):
#     """
#     Raised when something has gone wrong handling undefined parameters.
#     """
#     pass


import functools
from typing import Callable, Dict, Optional, TypeVar, Union
from marshmallow.fields import Field as MarshmallowField
from dataclasses_json.undefined import Undefined, UndefinedParameterError
    if encoder is not None:
        lib_metadata['encoder'] = encoder

    if decoder is not None:
        lib_metadata['decoder'] = decoder

    if mm_field is not None:
        lib_metadata['mm_field'] = mm_field

    if field_name is not None:
        if letter_case is not None:
            @functools.wraps(letter_case)
            def override(_, _letter_case=letter_case, _field_name=field_name):
                return _letter_case(_field_name)
        else:
            def override(_, _field_name=field_name):
                return _field_name
        letter_case = override

    if letter_case is not None:
        lib_metadata['letter_case'] = letter_case

    if undefined is not None:
        # Get the corresponding action for undefined parameters
        if isinstance(undefined, str):
            if not hasattr(Undefined, undefined.upper()):
                valid_actions = list(action.name for action in Undefined)
                raise UndefinedParameterError(
                    f"Invalid undefined parameter action, "
                    f"must be one of {valid_actions}")

# Path: dataclasses_json/undefined.py
# class Undefined(Enum):
#     """
#     Choose the behavior what happens when an undefined parameter is encountered
#     during class initialization.
#     """
#     INCLUDE = _CatchAllUndefinedParameters
#     RAISE = _RaiseUndefinedParameters
#     EXCLUDE = _IgnoreUndefinedParameters
# 
# class UndefinedParameterError(ValidationError):
#     """
#     Raised when something has gone wrong handling undefined parameters.
#     """
#     pass


# Path: dataclasses_json/cfg.py
import functools
from typing import Callable, Dict, Optional, TypeVar, Union
from marshmallow.fields import Field as MarshmallowField
from dataclasses_json.undefined import Undefined, UndefinedParameterError

    if encoder is not None:
        lib_metadata['encoder'] = encoder

    if decoder is not None:
        lib_metadata['decoder'] = decoder

    if mm_field is not None:
        lib_metadata['mm_field'] = mm_field

    if field_name is not None:
        if letter_case is not None:
            @functools.wraps(letter_case)
            def override(_, _letter_case=letter_case, _field_name=field_name):
                return _letter_case(_field_name)
        else:
            def override(_, _field_name=field_name):
                return _field_name
        letter_case = override

    if letter_case is not None:
        lib_metadata['letter_case'] = letter_case

    if undefined is not None:
        # Get the corresponding action for undefined parameters
        if isinstance(undefined, str):
            if not hasattr(Undefined, undefined.upper()):
                valid_actions = list(action.name for action in Undefined)
                raise UndefinedParameterError(
                    f"Invalid undefined parameter action, "
                    f"must be one of {valid_actions}")

            undefined = Undefined[undefined.upper()]