# coding: utf-8

"""
    Selling Partner API for Services

    With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.

    The version of the OpenAPI document: v1
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class JobListing(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    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 = {
        'total_result_size': 'int',
        'next_page_token': 'str',
        'previous_page_token': 'str',
        'jobs': 'List[ServiceJob]',
    }

    attribute_map = {
        'total_result_size': 'totalResultSize',
        'next_page_token': 'nextPageToken',
        'previous_page_token': 'previousPageToken',
        'jobs': 'jobs',
    }

    def __init__(self, total_result_size=None, next_page_token=None, previous_page_token=None, jobs=None, _configuration=None):  # noqa: E501
        """JobListing - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._total_result_size = None
        self._next_page_token = None
        self._previous_page_token = None
        self._jobs = None
        self.discriminator = None

        if total_result_size is not None:
            self.total_result_size = total_result_size
        if next_page_token is not None:
            self.next_page_token = next_page_token
        if previous_page_token is not None:
            self.previous_page_token = previous_page_token
        if jobs is not None:
            self.jobs = jobs

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

        Total result size of the query result.  # noqa: E501

        :return: The total_result_size of this JobListing.  # noqa: E501
        :rtype: int
        """
        return self._total_result_size

    @total_result_size.setter
    def total_result_size(self, total_result_size):
        """Sets the total_result_size of this JobListing.

        Total result size of the query result.  # noqa: E501

        :param total_result_size: The total_result_size of this JobListing.  # noqa: E501
        :type: int
        """

        self._total_result_size = total_result_size

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

        A generated string used to pass information to your next request. If `nextPageToken` is returned, pass the value of `nextPageToken` to the `pageToken` to get next results.  # noqa: E501

        :return: The next_page_token of this JobListing.  # noqa: E501
        :rtype: str
        """
        return self._next_page_token

    @next_page_token.setter
    def next_page_token(self, next_page_token):
        """Sets the next_page_token of this JobListing.

        A generated string used to pass information to your next request. If `nextPageToken` is returned, pass the value of `nextPageToken` to the `pageToken` to get next results.  # noqa: E501

        :param next_page_token: The next_page_token of this JobListing.  # noqa: E501
        :type: str
        """

        self._next_page_token = next_page_token

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

        A generated string used to pass information to your next request. If `previousPageToken` is returned, pass the value of `previousPageToken` to the `pageToken` to get previous page results.  # noqa: E501

        :return: The previous_page_token of this JobListing.  # noqa: E501
        :rtype: str
        """
        return self._previous_page_token

    @previous_page_token.setter
    def previous_page_token(self, previous_page_token):
        """Sets the previous_page_token of this JobListing.

        A generated string used to pass information to your next request. If `previousPageToken` is returned, pass the value of `previousPageToken` to the `pageToken` to get previous page results.  # noqa: E501

        :param previous_page_token: The previous_page_token of this JobListing.  # noqa: E501
        :type: str
        """

        self._previous_page_token = previous_page_token

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

        List of job details for the given input.  # noqa: E501

        :return: The jobs of this JobListing.  # noqa: E501
        :rtype: List[ServiceJob]
        """
        return self._jobs

    @jobs.setter
    def jobs(self, jobs):
        """Sets the jobs of this JobListing.

        List of job details for the given input.  # noqa: E501

        :param jobs: The jobs of this JobListing.  # noqa: E501
        :type: List[ServiceJob]
        """

        self._jobs = jobs

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

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