from typing import Union
from typing import Optional
from typing import Dict


def Option(name: str, value: Union[str, int], default: Optional[bool] = None) -> Dict:
    """Get a dictionary serialization for an element in the enumeration of valid
    values for a select parameter.

    Parameters
    ----------
    name: string
        Option display name.
    value: string or int
        Returned value if this option is selected.
    default: bool, default=None
        Indicate if this is the default option for the selection.

    Returns
    -------
    dict
    """
    doc = {'name': name, 'value': value}
    if default is not None:
        doc['isDefault'] = default
    return doc