def construct_parameters(**kwargs):
    """Translates data to a format suitable for Zabbix API

    Args:
        **kwargs: Arguments passed to the module.

    Returns:
        A dictionary of arguments in a format that is understandable by Zabbix API.
    """
    if kwargs['mappings'] is None:
        return dict(
            name=kwargs['name']
        )
    return dict(
        name=kwargs['name'],
        mappings=[
            dict(
                value=mapping['value'],
                newvalue=mapping['map_to']
            ) for mapping in kwargs['mappings']
        ]
    )