from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from timestep.api.ap.v1 import util
from timestep.api.ap.v1.models.base_model import Model


class Pagination(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(
        self, total_items=None, total_pages=None, current_page=None, page_size=None
    ):  # noqa: E501
        """Pagination - a model defined in OpenAPI

        :param total_items: The total_items of this Pagination.  # noqa: E501
        :type total_items: int
        :param total_pages: The total_pages of this Pagination.  # noqa: E501
        :type total_pages: int
        :param current_page: The current_page of this Pagination.  # noqa: E501
        :type current_page: int
        :param page_size: The page_size of this Pagination.  # noqa: E501
        :type page_size: int
        """
        self.openapi_types = {
            "total_items": int,
            "total_pages": int,
            "current_page": int,
            "page_size": int,
        }

        self.attribute_map = {
            "total_items": "total_items",
            "total_pages": "total_pages",
            "current_page": "current_page",
            "page_size": "page_size",
        }

        self._total_items = total_items
        self._total_pages = total_pages
        self._current_page = current_page
        self._page_size = page_size

    @classmethod
    def from_dict(cls, dikt) -> "Pagination":
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The Pagination of this Pagination.  # noqa: E501
        :rtype: Pagination
        """
        return util.deserialize_model(dikt, cls)

    @property
    def total_items(self) -> int:
        """Gets the total_items of this Pagination.

        Total number of items.  # noqa: E501

        :return: The total_items of this Pagination.
        :rtype: int
        """
        return self._total_items

    @total_items.setter
    def total_items(self, total_items: int):
        """Sets the total_items of this Pagination.

        Total number of items.  # noqa: E501

        :param total_items: The total_items of this Pagination.
        :type total_items: int
        """
        if total_items is None:
            raise ValueError(
                "Invalid value for `total_items`, must not be `None`"
            )  # noqa: E501

        self._total_items = total_items

    @property
    def total_pages(self) -> int:
        """Gets the total_pages of this Pagination.

        Total number of pages.  # noqa: E501

        :return: The total_pages of this Pagination.
        :rtype: int
        """
        return self._total_pages

    @total_pages.setter
    def total_pages(self, total_pages: int):
        """Sets the total_pages of this Pagination.

        Total number of pages.  # noqa: E501

        :param total_pages: The total_pages of this Pagination.
        :type total_pages: int
        """
        if total_pages is None:
            raise ValueError(
                "Invalid value for `total_pages`, must not be `None`"
            )  # noqa: E501

        self._total_pages = total_pages

    @property
    def current_page(self) -> int:
        """Gets the current_page of this Pagination.

        Current_page page number.  # noqa: E501

        :return: The current_page of this Pagination.
        :rtype: int
        """
        return self._current_page

    @current_page.setter
    def current_page(self, current_page: int):
        """Sets the current_page of this Pagination.

        Current_page page number.  # noqa: E501

        :param current_page: The current_page of this Pagination.
        :type current_page: int
        """
        if current_page is None:
            raise ValueError(
                "Invalid value for `current_page`, must not be `None`"
            )  # noqa: E501

        self._current_page = current_page

    @property
    def page_size(self) -> int:
        """Gets the page_size of this Pagination.

        Number of items per page.  # noqa: E501

        :return: The page_size of this Pagination.
        :rtype: int
        """
        return self._page_size

    @page_size.setter
    def page_size(self, page_size: int):
        """Sets the page_size of this Pagination.

        Number of items per page.  # noqa: E501

        :param page_size: The page_size of this Pagination.
        :type page_size: int
        """
        if page_size is None:
            raise ValueError(
                "Invalid value for `page_size`, must not be `None`"
            )  # noqa: E501

        self._page_size = page_size
