# coding: utf-8

"""
    servicehub-public-api

    Public APIs for managing user data.  # noqa: E501

    OpenAPI spec version: 1.0.0
    
    Generated by: phenom
"""

import pprint
import re  # noqa: F401

import six

class SearchResponse(object):
    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'data': 'list[SearchResponseData]',
        'status': 'bool',
        'error_code': 'str',
        'error_desc': 'str',
        'warning_desc': 'str',
        '_from': 'float',
        'size': 'float',
        'total': 'float'
    }

    attribute_map = {
        'data': 'data',
        'status': 'status',
        'error_code': 'errorCode',
        'error_desc': 'errorDesc',
        'warning_desc': 'warningDesc',
        '_from': 'from',
        'size': 'size',
        'total': 'total'
    }

    def __init__(self, data=None, status=None, error_code=None, error_desc=None, warning_desc=None, _from=None, size=None, total=None):  # noqa: E501
        """SearchResponse - a model defined in Swagger"""  # noqa: E501
        self._data = None
        self._status = None
        self._error_code = None
        self._error_desc = None
        self._warning_desc = None
        self.__from = None
        self._size = None
        self._total = None
        self.discriminator = None
        if data is not None:
            self.data = data
        if status is not None:
            self.status = status
        if error_code is not None:
            self.error_code = error_code
        if error_desc is not None:
            self.error_desc = error_desc
        if warning_desc is not None:
            self.warning_desc = warning_desc
        if _from is not None:
            self._from = _from
        if size is not None:
            self.size = size
        if total is not None:
            self.total = total

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

        List of user data.  # noqa: E501

        :return: The data of this SearchResponse.  # noqa: E501
        :rtype: list[SearchResponseData]
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this SearchResponse.

        List of user data.  # noqa: E501

        :param data: The data of this SearchResponse.  # noqa: E501
        :type: list[SearchResponseData]
        """

        self._data = data

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

        Status of the search operation.  # noqa: E501

        :return: The status of this SearchResponse.  # noqa: E501
        :rtype: bool
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this SearchResponse.

        Status of the search operation.  # noqa: E501

        :param status: The status of this SearchResponse.  # noqa: E501
        :type: bool
        """

        self._status = status

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

        The HTTP status code.  # noqa: E501

        :return: The error_code of this SearchResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_code

    @error_code.setter
    def error_code(self, error_code):
        """Sets the error_code of this SearchResponse.

        The HTTP status code.  # noqa: E501

        :param error_code: The error_code of this SearchResponse.  # noqa: E501
        :type: str
        """

        self._error_code = error_code

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

        Description of the error.  # noqa: E501

        :return: The error_desc of this SearchResponse.  # noqa: E501
        :rtype: str
        """
        return self._error_desc

    @error_desc.setter
    def error_desc(self, error_desc):
        """Sets the error_desc of this SearchResponse.

        Description of the error.  # noqa: E501

        :param error_desc: The error_desc of this SearchResponse.  # noqa: E501
        :type: str
        """

        self._error_desc = error_desc

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

        Description of any warnings.  # noqa: E501

        :return: The warning_desc of this SearchResponse.  # noqa: E501
        :rtype: str
        """
        return self._warning_desc

    @warning_desc.setter
    def warning_desc(self, warning_desc):
        """Sets the warning_desc of this SearchResponse.

        Description of any warnings.  # noqa: E501

        :param warning_desc: The warning_desc of this SearchResponse.  # noqa: E501
        :type: str
        """

        self._warning_desc = warning_desc

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

        Starting index of the returned results.  # noqa: E501

        :return: The _from of this SearchResponse.  # noqa: E501
        :rtype: float
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this SearchResponse.

        Starting index of the returned results.  # noqa: E501

        :param _from: The _from of this SearchResponse.  # noqa: E501
        :type: float
        """

        self.__from = _from

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

        Number of results returned in the response.  # noqa: E501

        :return: The size of this SearchResponse.  # noqa: E501
        :rtype: float
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this SearchResponse.

        Number of results returned in the response.  # noqa: E501

        :param size: The size of this SearchResponse.  # noqa: E501
        :type: float
        """

        self._size = size

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

        Total number of results matching the search criteria.  # noqa: E501

        :return: The total of this SearchResponse.  # noqa: E501
        :rtype: float
        """
        return self._total

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

        Total number of results matching the search criteria.  # noqa: E501

        :param total: The total of this SearchResponse.  # noqa: E501
        :type: float
        """

        self._total = total

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(SearchResponse, dict):
            for key, value in self.items():
                result[key] = 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, SearchResponse):
            return False

        return self.__dict__ == other.__dict__

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