# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.04.01
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class ListSessionsResponse(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 = {
        'sessions': 'list[Session]',
        'limit': 'int',
        'previous_created_time': 'datetime',
        'next_created_time': 'datetime',
        'previous_user_id': 'str',
        'next_user_id': 'str'
    }

    attribute_map = {
        'sessions': 'sessions',
        'limit': 'limit',
        'previous_created_time': 'previous_created_time',
        'next_created_time': 'next_created_time',
        'previous_user_id': 'previous_user_id',
        'next_user_id': 'next_user_id'
    }

    def __init__(self, sessions=None, limit=None, previous_created_time=None, next_created_time=None, previous_user_id=None, next_user_id=None, local_vars_configuration=None):  # noqa: E501
        """ListSessionsResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._sessions = None
        self._limit = None
        self._previous_created_time = None
        self._next_created_time = None
        self._previous_user_id = None
        self._next_user_id = None
        self.discriminator = None

        self.sessions = sessions
        self.limit = limit
        if previous_created_time is not None:
            self.previous_created_time = previous_created_time
        if next_created_time is not None:
            self.next_created_time = next_created_time
        if previous_user_id is not None:
            self.previous_user_id = previous_user_id
        if next_user_id is not None:
            self.next_user_id = next_user_id

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

        The matching Session objects  # noqa: E501

        :return: The sessions of this ListSessionsResponse.  # noqa: E501
        :rtype: list[Session]
        """
        return self._sessions

    @sessions.setter
    def sessions(self, sessions):
        """Sets the sessions of this ListSessionsResponse.

        The matching Session objects  # noqa: E501

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

        self._sessions = sessions

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

        Limit on the number of rows in the response  # noqa: E501

        :return: The limit of this ListSessionsResponse.  # noqa: E501
        :rtype: int
        """
        return self._limit

    @limit.setter
    def limit(self, limit):
        """Sets the limit of this ListSessionsResponse.

        Limit on the number of rows in the response  # noqa: E501

        :param limit: The limit of this ListSessionsResponse.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and limit is None:  # noqa: E501
            raise ValueError("Invalid value for `limit`, must not be `None`")  # noqa: E501

        self._limit = limit

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

        The earliest created time on the current page. A value of \"\" is the start of the first page. This is typically combined with other pagination parameters to sub-paginate data that has too many results for the primary pagination key.   # noqa: E501

        :return: The previous_created_time of this ListSessionsResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._previous_created_time

    @previous_created_time.setter
    def previous_created_time(self, previous_created_time):
        """Sets the previous_created_time of this ListSessionsResponse.

        The earliest created time on the current page. A value of \"\" is the start of the first page. This is typically combined with other pagination parameters to sub-paginate data that has too many results for the primary pagination key.   # noqa: E501

        :param previous_created_time: The previous_created_time of this ListSessionsResponse.  # noqa: E501
        :type: datetime
        """

        self._previous_created_time = previous_created_time

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

        The earliest created time on the next page.  This is typically combined with other pagination parameters to sub-paginate data that has too many results for the primary pagination key.   # noqa: E501

        :return: The next_created_time of this ListSessionsResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._next_created_time

    @next_created_time.setter
    def next_created_time(self, next_created_time):
        """Sets the next_created_time of this ListSessionsResponse.

        The earliest created time on the next page.  This is typically combined with other pagination parameters to sub-paginate data that has too many results for the primary pagination key.   # noqa: E501

        :param next_created_time: The next_created_time of this ListSessionsResponse.  # noqa: E501
        :type: datetime
        """

        self._next_created_time = next_created_time

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

        The first user_id on the current page. A value of \"\" is the start of the first page.  # noqa: E501

        :return: The previous_user_id of this ListSessionsResponse.  # noqa: E501
        :rtype: str
        """
        return self._previous_user_id

    @previous_user_id.setter
    def previous_user_id(self, previous_user_id):
        """Sets the previous_user_id of this ListSessionsResponse.

        The first user_id on the current page. A value of \"\" is the start of the first page.  # noqa: E501

        :param previous_user_id: The previous_user_id of this ListSessionsResponse.  # noqa: E501
        :type: str
        """

        self._previous_user_id = previous_user_id

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

        The first user_id on the next page.  # noqa: E501

        :return: The next_user_id of this ListSessionsResponse.  # noqa: E501
        :rtype: str
        """
        return self._next_user_id

    @next_user_id.setter
    def next_user_id(self, next_user_id):
        """Sets the next_user_id of this ListSessionsResponse.

        The first user_id on the next page.  # noqa: E501

        :param next_user_id: The next_user_id of this ListSessionsResponse.  # noqa: E501
        :type: str
        """

        self._next_user_id = next_user_id

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

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = 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, ListSessionsResponse):
            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, ListSessionsResponse):
            return True

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