# coding: utf-8

"""
    Lists

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v3
    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 hubspot.crm.lists.configuration import Configuration


class ListSearchResponse(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 = {"total": "int", "offset": "int", "lists": "list[PublicObjectListSearchResult]", "has_more": "bool"}

    attribute_map = {"total": "total", "offset": "offset", "lists": "lists", "has_more": "hasMore"}

    def __init__(self, total=None, offset=None, lists=None, has_more=None, local_vars_configuration=None):  # noqa: E501
        """ListSearchResponse - 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._total = None
        self._offset = None
        self._lists = None
        self._has_more = None
        self.discriminator = None

        self.total = total
        self.offset = offset
        self.lists = lists
        self.has_more = has_more

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

        The total number of lists that match the search criteria.  # noqa: E501

        :return: The total of this ListSearchResponse.  # noqa: E501
        :rtype: int
        """
        return self._total

    @total.setter
    def total(self, total):
        """Sets the total of this ListSearchResponse.

        The total number of lists that match the search criteria.  # noqa: E501

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

        self._total = total

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

        Value to be passed in a future request to paginate through list search results.  # noqa: E501

        :return: The offset of this ListSearchResponse.  # noqa: E501
        :rtype: int
        """
        return self._offset

    @offset.setter
    def offset(self, offset):
        """Sets the offset of this ListSearchResponse.

        Value to be passed in a future request to paginate through list search results.  # noqa: E501

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

        self._offset = offset

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

        The lists that matched the search criteria.  # noqa: E501

        :return: The lists of this ListSearchResponse.  # noqa: E501
        :rtype: list[PublicObjectListSearchResult]
        """
        return self._lists

    @lists.setter
    def lists(self, lists):
        """Sets the lists of this ListSearchResponse.

        The lists that matched the search criteria.  # noqa: E501

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

        self._lists = lists

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

        Whether or not there are more results to page through.  # noqa: E501

        :return: The has_more of this ListSearchResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_more

    @has_more.setter
    def has_more(self, has_more):
        """Sets the has_more of this ListSearchResponse.

        Whether or not there are more results to page through.  # noqa: E501

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

        self._has_more = has_more

    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, ListSearchResponse):
            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, ListSearchResponse):
            return True

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