# coding: utf-8

"""
    Finnhub API

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

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


import pprint
import re  # noqa: F401

import six

from docifier-test.configuration import Configuration


class News(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 = {
        'category': 'str',
        'datetime': 'int',
        'headline': 'str',
        'id': 'int',
        'image': 'str',
        'related': 'str',
        'source': 'str',
        'summary': 'str',
        'url': 'str'
    }

    attribute_map = {
        'category': 'category',
        'datetime': 'datetime',
        'headline': 'headline',
        'id': 'id',
        'image': 'image',
        'related': 'related',
        'source': 'source',
        'summary': 'summary',
        'url': 'url'
    }

    def __init__(self, category=None, datetime=None, headline=None, id=None, image=None, related=None, source=None, summary=None, url=None, local_vars_configuration=None):  # noqa: E501
        """News - 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._category = None
        self._datetime = None
        self._headline = None
        self._id = None
        self._image = None
        self._related = None
        self._source = None
        self._summary = None
        self._url = None
        self.discriminator = None

        if category is not None:
            self.category = category
        if datetime is not None:
            self.datetime = datetime
        if headline is not None:
            self.headline = headline
        if id is not None:
            self.id = id
        if image is not None:
            self.image = image
        if related is not None:
            self.related = related
        if source is not None:
            self.source = source
        if summary is not None:
            self.summary = summary
        if url is not None:
            self.url = url

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

        News category.  # noqa: E501

        :return: The category of this News.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this News.

        News category.  # noqa: E501

        :param category: The category of this News.  # noqa: E501
        :type: str
        """

        self._category = category

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

        Published time in UNIX timestamp.  # noqa: E501

        :return: The datetime of this News.  # noqa: E501
        :rtype: int
        """
        return self._datetime

    @datetime.setter
    def datetime(self, datetime):
        """Sets the datetime of this News.

        Published time in UNIX timestamp.  # noqa: E501

        :param datetime: The datetime of this News.  # noqa: E501
        :type: int
        """

        self._datetime = datetime

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

        News headline.  # noqa: E501

        :return: The headline of this News.  # noqa: E501
        :rtype: str
        """
        return self._headline

    @headline.setter
    def headline(self, headline):
        """Sets the headline of this News.

        News headline.  # noqa: E501

        :param headline: The headline of this News.  # noqa: E501
        :type: str
        """

        self._headline = headline

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

        News ID. This value can be used for <code>minId</code> params to get the latest news only.  # noqa: E501

        :return: The id of this News.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this News.

        News ID. This value can be used for <code>minId</code> params to get the latest news only.  # noqa: E501

        :param id: The id of this News.  # noqa: E501
        :type: int
        """

        self._id = id

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

        Thumbnail image URL.  # noqa: E501

        :return: The image of this News.  # noqa: E501
        :rtype: str
        """
        return self._image

    @image.setter
    def image(self, image):
        """Sets the image of this News.

        Thumbnail image URL.  # noqa: E501

        :param image: The image of this News.  # noqa: E501
        :type: str
        """

        self._image = image

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

        Related stocks and companies mentioned in the article.  # noqa: E501

        :return: The related of this News.  # noqa: E501
        :rtype: str
        """
        return self._related

    @related.setter
    def related(self, related):
        """Sets the related of this News.

        Related stocks and companies mentioned in the article.  # noqa: E501

        :param related: The related of this News.  # noqa: E501
        :type: str
        """

        self._related = related

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

        News source.  # noqa: E501

        :return: The source of this News.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this News.

        News source.  # noqa: E501

        :param source: The source of this News.  # noqa: E501
        :type: str
        """

        self._source = source

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

        News summary.  # noqa: E501

        :return: The summary of this News.  # noqa: E501
        :rtype: str
        """
        return self._summary

    @summary.setter
    def summary(self, summary):
        """Sets the summary of this News.

        News summary.  # noqa: E501

        :param summary: The summary of this News.  # noqa: E501
        :type: str
        """

        self._summary = summary

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

        URL of the original article.  # noqa: E501

        :return: The url of this News.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this News.

        URL of the original article.  # noqa: E501

        :param url: The url of this News.  # noqa: E501
        :type: str
        """

        self._url = url

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

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