import connexion
import six

from src.rest.models.clock_info import ClockInfo  # noqa: E501
from src.rest.models.health_info import HealthInfo  # noqa: E501
from src.rest.models.play_log_entry import PlayLogEntry  # noqa: E501
from src.rest.models.status_entry import StatusEntry  # noqa: E501
from src.rest import util

from flask import current_app


def activate_engine(engine_number):  # noqa: E501
    """Set active engine

    Activates one engine and deactivates the other  # noqa: E501

    :param engine_number: Number of the engine
    :type engine_number: int

    :rtype: None
    """
    service = current_app.config['SERVICE']
    return 'do some magic!'


def clock_info():  # noqa: E501
    """Get all information to display the studio clock

    Retrieves the currently playing schedule, its playlist and entries plus the next schedule for being used by the studio clock.  # noqa: E501


    :rtype: ClockInfo
    """
    service = current_app.config['SERVICE']
    return 'do some magic!'


def get_active_engine():  # noqa: E501
    """Get active engine

    Retrieves the status entry of the currently active engine  # noqa: E501


    :rtype: StatusEntry
    """
    service = current_app.config['SERVICE']
    return 'do some magic!'


def get_engine_health(engine_number):  # noqa: E501
    """Get most recent health info

    Retrieves the most recent health info of the requested engine  # noqa: E501

    :param engine_number: Number of the engine
    :type engine_number: int

    :rtype: HealthInfo
    """
    service = current_app.config['SERVICE']
    return 'do some magic!'


def get_report(year_month):  # noqa: E501
    """Report for one month

    Returns a report for the given month  # noqa: E501

    :param year_month: Month to create the report for in the format \"yyyy_mm\"
    :type year_month: str

    :rtype: List[PlayLogEntry]
    """
    service = current_app.config['SERVICE']
    return 'do some magic!'


def log_engine_health(engine_number):  # noqa: E501
    """Log health info

    Logs another health entry for the given engine  # noqa: E501

    :param engine_number: Number of the engine
    :type engine_number: int

    :rtype: None
    """
    service = current_app.config['SERVICE']
    return 'do some magic!'