# This file was generated by liblab | https://liblab.com/

from .utils.validator import Validator
from .utils.base_service import BaseService
from ..net.transport.serializer import Serializer
from ..models.utils.cast_models import cast_models
from ..models.betting_status_response import BettingStatusResponse


class BettingStatusService(BaseService):

    @cast_models
    def bets_get_betting_status(self) -> BettingStatusResponse:
        """Returns current betting status. During maintenance windows betting could be disabled, you can call this operation to check the current betting status.

        ...
        :raises RequestError: Raised when a request fails, with optional HTTP status code and details.
        ...
        :return: OK
        :rtype: BettingStatusResponse
        """

        serialized_request = (
            Serializer(
                f"{self.base_url}/v4/bets/betting-status", self.get_default_headers()
            )
            .serialize()
            .set_method("GET")
        )

        response = self.send_request(serialized_request)

        return BettingStatusResponse._unmap(response)
