# coding: utf-8

"""
    paddlehelix_dev

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


class TaskPriceInfos(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 = {
        'prices': 'list[TaskPriceInfo]',
        'total_amount': 'float',
        'discounted_total_prices': 'float'
    }

    attribute_map = {
        'prices': 'prices',
        'total_amount': 'total_amount',
        'discounted_total_prices': 'discounted_total_prices'
    }

    def __init__(self, prices=None, total_amount=None, discounted_total_prices=None, local_vars_configuration=None):  # noqa: E501
        """TaskPriceInfos - 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._prices = None
        self._total_amount = None
        self._discounted_total_prices = None
        self.discriminator = None

        self.prices = prices
        self.total_amount = total_amount
        if discounted_total_prices is not None:
            self.discounted_total_prices = discounted_total_prices

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


        :return: The prices of this TaskPriceInfos.  # noqa: E501
        :rtype: list[TaskPriceInfo]
        """
        return self._prices

    @prices.setter
    def prices(self, prices):
        """Sets the prices of this TaskPriceInfos.


        :param prices: The prices of this TaskPriceInfos.  # noqa: E501
        :type: list[TaskPriceInfo]
        """
        if self.local_vars_configuration.client_side_validation and prices is None:  # noqa: E501
            raise ValueError("Invalid value for `prices`, must not be `None`")  # noqa: E501

        self._prices = prices

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


        :return: The total_amount of this TaskPriceInfos.  # noqa: E501
        :rtype: float
        """
        return self._total_amount

    @total_amount.setter
    def total_amount(self, total_amount):
        """Sets the total_amount of this TaskPriceInfos.


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

        self._total_amount = total_amount

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


        :return: The discounted_total_prices of this TaskPriceInfos.  # noqa: E501
        :rtype: float
        """
        return self._discounted_total_prices

    @discounted_total_prices.setter
    def discounted_total_prices(self, discounted_total_prices):
        """Sets the discounted_total_prices of this TaskPriceInfos.


        :param discounted_total_prices: The discounted_total_prices of this TaskPriceInfos.  # noqa: E501
        :type: float
        """

        self._discounted_total_prices = discounted_total_prices

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

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