def in_app(alert, display_type, expiry=None, display=None, actions=None,
    interactive=None, extra=None):
    """In-App push message payload creation.

    :param alert: Required, string
    :param display_type: Required, String. List of valid display_type_
        attributes.
    :keyword expiry: Optional, String specifying an expiry value.
    :keyword display: Optional, A dictionary specifying the display_
        appearance of the in-app message.
    :keyword actions: Optional, Used to perform a defined task.
    :keyword interactive: Optional, A dictionary with two attributes –
        "type" and "button_actions", as generated by interactive().
    :keyword extra: Optional, Object.

    .. _display: https://docs.urbanairship.com/api/ua.html#display-object
    .. _display_type: https://docs.urbanairship.com/api/ua.html#in-app-message

    """
    payload = {}
    payload['alert'] = alert
    payload['display_type'] = display_type
    if expiry is not None:
        payload['expiry'] = expiry
    if display is not None:
        payload['display'] = display
    if actions is not None:
        payload['actions'] = actions
    if interactive is not None:
        payload['interactive'] = interactive
    if extra is not None:
        extra['extra'] = extra
    return payload
