# coding: utf-8

"""
    Mantium API

    Mantium API Documentation  # noqa: E501

    The version of the OpenAPI document: 1.0.1079
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from mantium_spec.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'items': 'list[ApplicationResponse]',
        'previous_page': 'str',
        'next_page': 'str'
    }

    attribute_map = {
        'items': 'items',
        'previous_page': 'previous_page',
        'next_page': 'next_page'
    }

    def __init__(self, items=None, previous_page=None, next_page=None, local_vars_configuration=None):  # noqa: E501
        """CursorDatamodelPageApplicationResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._items = None
        self._previous_page = None
        self._next_page = None
        self.discriminator = None

        self.items = items
        if previous_page is not None:
            self.previous_page = previous_page
        if next_page is not None:
            self.next_page = next_page

    @property
    def items(self):
        """Gets the items of this CursorDatamodelPageApplicationResponse.  # noqa: E501


        :return: The items of this CursorDatamodelPageApplicationResponse.  # noqa: E501
        :rtype: list[ApplicationResponse]
        """
        return self._items

    @items.setter
    def items(self, items):
        """Sets the items of this CursorDatamodelPageApplicationResponse.


        :param items: The items of this CursorDatamodelPageApplicationResponse.  # noqa: E501
        :type items: list[ApplicationResponse]
        """
        if self.local_vars_configuration.client_side_validation and items is None:  # noqa: E501
            raise ValueError("Invalid value for `items`, must not be `None`")  # noqa: E501

        self._items = items

    @property
    def previous_page(self):
        """Gets the previous_page of this CursorDatamodelPageApplicationResponse.  # noqa: E501

        Cursor for the previous page  # noqa: E501

        :return: The previous_page of this CursorDatamodelPageApplicationResponse.  # noqa: E501
        :rtype: str
        """
        return self._previous_page

    @previous_page.setter
    def previous_page(self, previous_page):
        """Sets the previous_page of this CursorDatamodelPageApplicationResponse.

        Cursor for the previous page  # noqa: E501

        :param previous_page: The previous_page of this CursorDatamodelPageApplicationResponse.  # noqa: E501
        :type previous_page: str
        """

        self._previous_page = previous_page

    @property
    def next_page(self):
        """Gets the next_page of this CursorDatamodelPageApplicationResponse.  # noqa: E501

        Cursor for the next page  # noqa: E501

        :return: The next_page of this CursorDatamodelPageApplicationResponse.  # noqa: E501
        :rtype: str
        """
        return self._next_page

    @next_page.setter
    def next_page(self, next_page):
        """Sets the next_page of this CursorDatamodelPageApplicationResponse.

        Cursor for the next page  # noqa: E501

        :param next_page: The next_page of this CursorDatamodelPageApplicationResponse.  # noqa: E501
        :type next_page: str
        """

        self._next_page = next_page

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(value)

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, CursorDatamodelPageApplicationResponse):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, CursorDatamodelPageApplicationResponse):
            return True

        return self.to_dict() != other.to_dict()
