# coding: utf-8

"""
    Vantage

    Vantage API  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: support@vantage.sh
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from vantage.configuration import Configuration


class Price(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 = {
        'id': 'str',
        'unit': 'str',
        'region': 'str',
        'rate_type': 'str',
        'currency': 'str',
        'amount': 'float',
        'details': 'object'
    }

    attribute_map = {
        'id': 'id',
        'unit': 'unit',
        'region': 'region',
        'rate_type': 'rate_type',
        'currency': 'currency',
        'amount': 'amount',
        'details': 'details'
    }

    def __init__(self, id=None, unit=None, region=None, rate_type=None, currency=None, amount=None, details=None, _configuration=None):  # noqa: E501
        """Price - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._unit = None
        self._region = None
        self._rate_type = None
        self._currency = None
        self._amount = None
        self._details = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if unit is not None:
            self.unit = unit
        if region is not None:
            self.region = region
        if rate_type is not None:
            self.rate_type = rate_type
        if currency is not None:
            self.currency = currency
        if amount is not None:
            self.amount = amount
        if details is not None:
            self.details = details

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


        :return: The id of this Price.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this Price.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The unit in which the amount is billed.  # noqa: E501

        :return: The unit of this Price.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this Price.

        The unit in which the amount is billed.  # noqa: E501

        :param unit: The unit of this Price.  # noqa: E501
        :type: str
        """

        self._unit = unit

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

        The region the price is specific to.  # noqa: E501

        :return: The region of this Price.  # noqa: E501
        :rtype: str
        """
        return self._region

    @region.setter
    def region(self, region):
        """Sets the region of this Price.

        The region the price is specific to.  # noqa: E501

        :param region: The region of this Price.  # noqa: E501
        :type: str
        """

        self._region = region

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

        The part of the product the price applies to. (compute, transfer, etc..)  # noqa: E501

        :return: The rate_type of this Price.  # noqa: E501
        :rtype: str
        """
        return self._rate_type

    @rate_type.setter
    def rate_type(self, rate_type):
        """Sets the rate_type of this Price.

        The part of the product the price applies to. (compute, transfer, etc..)  # noqa: E501

        :param rate_type: The rate_type of this Price.  # noqa: E501
        :type: str
        """

        self._rate_type = rate_type

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

        The currency of the amount.  # noqa: E501

        :return: The currency of this Price.  # noqa: E501
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this Price.

        The currency of the amount.  # noqa: E501

        :param currency: The currency of this Price.  # noqa: E501
        :type: str
        """

        self._currency = currency

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

        The amount of money this specific product price costs.  # noqa: E501

        :return: The amount of this Price.  # noqa: E501
        :rtype: float
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this Price.

        The amount of money this specific product price costs.  # noqa: E501

        :param amount: The amount of this Price.  # noqa: E501
        :type: float
        """

        self._amount = amount

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

        Service specific metadata.  # noqa: E501

        :return: The details of this Price.  # noqa: E501
        :rtype: object
        """
        return self._details

    @details.setter
    def details(self, details):
        """Sets the details of this Price.

        Service specific metadata.  # noqa: E501

        :param details: The details of this Price.  # noqa: E501
        :type: object
        """

        self._details = details

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

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