# 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 finnhub.configuration import Configuration


class UpgradeDowngrade(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 = {
        'symbol': 'str',
        'grade_time': 'int',
        'from_grade': 'str',
        'to_grade': 'str',
        'company': 'str',
        'action': 'str'
    }

    attribute_map = {
        'symbol': 'symbol',
        'grade_time': 'gradeTime',
        'from_grade': 'fromGrade',
        'to_grade': 'toGrade',
        'company': 'Company',
        'action': 'action'
    }

    def __init__(self, symbol=None, grade_time=None, from_grade=None, to_grade=None, company=None, action=None, local_vars_configuration=None):  # noqa: E501
        """UpgradeDowngrade - 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._symbol = None
        self._grade_time = None
        self._from_grade = None
        self._to_grade = None
        self._company = None
        self._action = None
        self.discriminator = None

        if symbol is not None:
            self.symbol = symbol
        if grade_time is not None:
            self.grade_time = grade_time
        if from_grade is not None:
            self.from_grade = from_grade
        if to_grade is not None:
            self.to_grade = to_grade
        if company is not None:
            self.company = company
        if action is not None:
            self.action = action

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

        Company symbol.  # noqa: E501

        :return: The symbol of this UpgradeDowngrade.  # noqa: E501
        :rtype: str
        """
        return self._symbol

    @symbol.setter
    def symbol(self, symbol):
        """Sets the symbol of this UpgradeDowngrade.

        Company symbol.  # noqa: E501

        :param symbol: The symbol of this UpgradeDowngrade.  # noqa: E501
        :type: str
        """

        self._symbol = symbol

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

        Upgrade/downgrade time in UNIX timestamp.  # noqa: E501

        :return: The grade_time of this UpgradeDowngrade.  # noqa: E501
        :rtype: int
        """
        return self._grade_time

    @grade_time.setter
    def grade_time(self, grade_time):
        """Sets the grade_time of this UpgradeDowngrade.

        Upgrade/downgrade time in UNIX timestamp.  # noqa: E501

        :param grade_time: The grade_time of this UpgradeDowngrade.  # noqa: E501
        :type: int
        """

        self._grade_time = grade_time

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

        From grade.  # noqa: E501

        :return: The from_grade of this UpgradeDowngrade.  # noqa: E501
        :rtype: str
        """
        return self._from_grade

    @from_grade.setter
    def from_grade(self, from_grade):
        """Sets the from_grade of this UpgradeDowngrade.

        From grade.  # noqa: E501

        :param from_grade: The from_grade of this UpgradeDowngrade.  # noqa: E501
        :type: str
        """

        self._from_grade = from_grade

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

        To grade.  # noqa: E501

        :return: The to_grade of this UpgradeDowngrade.  # noqa: E501
        :rtype: str
        """
        return self._to_grade

    @to_grade.setter
    def to_grade(self, to_grade):
        """Sets the to_grade of this UpgradeDowngrade.

        To grade.  # noqa: E501

        :param to_grade: The to_grade of this UpgradeDowngrade.  # noqa: E501
        :type: str
        """

        self._to_grade = to_grade

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

        Company/analyst who did the upgrade/downgrade.  # noqa: E501

        :return: The company of this UpgradeDowngrade.  # noqa: E501
        :rtype: str
        """
        return self._company

    @company.setter
    def company(self, company):
        """Sets the company of this UpgradeDowngrade.

        Company/analyst who did the upgrade/downgrade.  # noqa: E501

        :param company: The company of this UpgradeDowngrade.  # noqa: E501
        :type: str
        """

        self._company = company

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

        Action can take any of the following values: <code>up(upgrade), down(downgrade), main(maintains), init(initiate), reit(reiterate)</code>.  # noqa: E501

        :return: The action of this UpgradeDowngrade.  # noqa: E501
        :rtype: str
        """
        return self._action

    @action.setter
    def action(self, action):
        """Sets the action of this UpgradeDowngrade.

        Action can take any of the following values: <code>up(upgrade), down(downgrade), main(maintains), init(initiate), reit(reiterate)</code>.  # noqa: E501

        :param action: The action of this UpgradeDowngrade.  # noqa: E501
        :type: str
        """

        self._action = action

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

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