# coding: utf-8

"""
    Zarban API

    API for Zarban services.  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Contact: info@zarban.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from zarban.service.openapi_client.configuration import Configuration


class StakePlan(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 = {
        'plan_name': 'str',
        'contract_address': 'str',
        'apy': 'str',
        'stake_token': 'Token',
        'reward_token': 'Token',
        'finish_at': 'Timestamp'
    }

    attribute_map = {
        'plan_name': 'planName',
        'contract_address': 'contractAddress',
        'apy': 'apy',
        'stake_token': 'stakeToken',
        'reward_token': 'rewardToken',
        'finish_at': 'finishAt'
    }

    def __init__(self, plan_name=None, contract_address=None, apy=None, stake_token=None, reward_token=None, finish_at=None, local_vars_configuration=None):  # noqa: E501
        """StakePlan - 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._plan_name = None
        self._contract_address = None
        self._apy = None
        self._stake_token = None
        self._reward_token = None
        self._finish_at = None
        self.discriminator = None

        self.plan_name = plan_name
        self.contract_address = contract_address
        self.apy = apy
        self.stake_token = stake_token
        self.reward_token = reward_token
        self.finish_at = finish_at

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

        Name of staking plan  # noqa: E501

        :return: The plan_name of this StakePlan.  # noqa: E501
        :rtype: str
        """
        return self._plan_name

    @plan_name.setter
    def plan_name(self, plan_name):
        """Sets the plan_name of this StakePlan.

        Name of staking plan  # noqa: E501

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

        self._plan_name = plan_name

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

        Ethereum address of the staking contract  # noqa: E501

        :return: The contract_address of this StakePlan.  # noqa: E501
        :rtype: str
        """
        return self._contract_address

    @contract_address.setter
    def contract_address(self, contract_address):
        """Sets the contract_address of this StakePlan.

        Ethereum address of the staking contract  # noqa: E501

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

        self._contract_address = contract_address

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

        Annual percentage yield of the staking plan  # noqa: E501

        :return: The apy of this StakePlan.  # noqa: E501
        :rtype: str
        """
        return self._apy

    @apy.setter
    def apy(self, apy):
        """Sets the apy of this StakePlan.

        Annual percentage yield of the staking plan  # noqa: E501

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

        self._apy = apy

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


        :return: The stake_token of this StakePlan.  # noqa: E501
        :rtype: Token
        """
        return self._stake_token

    @stake_token.setter
    def stake_token(self, stake_token):
        """Sets the stake_token of this StakePlan.


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

        self._stake_token = stake_token

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


        :return: The reward_token of this StakePlan.  # noqa: E501
        :rtype: Token
        """
        return self._reward_token

    @reward_token.setter
    def reward_token(self, reward_token):
        """Sets the reward_token of this StakePlan.


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

        self._reward_token = reward_token

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


        :return: The finish_at of this StakePlan.  # noqa: E501
        :rtype: Timestamp
        """
        return self._finish_at

    @finish_at.setter
    def finish_at(self, finish_at):
        """Sets the finish_at of this StakePlan.


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

        self._finish_at = finish_at

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

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