# coding: utf-8

"""
    Billingo API v3

    This is a Billingo API v3 documentation. Our API based on REST software architectural style. API has resource-oriented URLs, accepts JSON-encoded request bodies and returns JSON-encoded responses. To use this API you have to generate a new API key on our [site](https://app.billingo.hu/api-key). After that, you can test your API key on this page.  # noqa: E501

    OpenAPI spec version: 3.0.14
    Contact: hello@billingo.hu
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Product(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': 'int',
        'name': 'str',
        'comment': 'str',
        'currency': 'Currency',
        'vat': 'Vat',
        'net_unit_price': 'float',
        'unit': 'str',
        'general_ledger_number': 'str',
        'general_ledger_taxcode': 'str',
        'entitlement': 'Entitlement'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'comment': 'comment',
        'currency': 'currency',
        'vat': 'vat',
        'net_unit_price': 'net_unit_price',
        'unit': 'unit',
        'general_ledger_number': 'general_ledger_number',
        'general_ledger_taxcode': 'general_ledger_taxcode',
        'entitlement': 'entitlement'
    }

    def __init__(self, id=None, name=None, comment=None, currency=None, vat=None, net_unit_price=None, unit=None, general_ledger_number=None, general_ledger_taxcode=None, entitlement=None):  # noqa: E501
        """Product - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._comment = None
        self._currency = None
        self._vat = None
        self._net_unit_price = None
        self._unit = None
        self._general_ledger_number = None
        self._general_ledger_taxcode = None
        self._entitlement = None
        self.discriminator = None
        if id is not None:
            self.id = id
        self.name = name
        if comment is not None:
            self.comment = comment
        self.currency = currency
        self.vat = vat
        if net_unit_price is not None:
            self.net_unit_price = net_unit_price
        self.unit = unit
        if general_ledger_number is not None:
            self.general_ledger_number = general_ledger_number
        if general_ledger_taxcode is not None:
            self.general_ledger_taxcode = general_ledger_taxcode
        if entitlement is not None:
            self.entitlement = entitlement

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


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

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


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

        self._id = id

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


        :return: The name of this Product.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Product.


        :param name: The name of this Product.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The comment of this Product.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this Product.


        :param comment: The comment of this Product.  # noqa: E501
        :type: str
        """

        self._comment = comment

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


        :return: The currency of this Product.  # noqa: E501
        :rtype: Currency
        """
        return self._currency

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


        :param currency: The currency of this Product.  # noqa: E501
        :type: Currency
        """
        if currency is None:
            raise ValueError("Invalid value for `currency`, must not be `None`")  # noqa: E501

        self._currency = currency

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


        :return: The vat of this Product.  # noqa: E501
        :rtype: Vat
        """
        return self._vat

    @vat.setter
    def vat(self, vat):
        """Sets the vat of this Product.


        :param vat: The vat of this Product.  # noqa: E501
        :type: Vat
        """
        if vat is None:
            raise ValueError("Invalid value for `vat`, must not be `None`")  # noqa: E501

        self._vat = vat

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


        :return: The net_unit_price of this Product.  # noqa: E501
        :rtype: float
        """
        return self._net_unit_price

    @net_unit_price.setter
    def net_unit_price(self, net_unit_price):
        """Sets the net_unit_price of this Product.


        :param net_unit_price: The net_unit_price of this Product.  # noqa: E501
        :type: float
        """

        self._net_unit_price = net_unit_price

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


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

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


        :param unit: The unit of this Product.  # noqa: E501
        :type: str
        """
        if unit is None:
            raise ValueError("Invalid value for `unit`, must not be `None`")  # noqa: E501

        self._unit = unit

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


        :return: The general_ledger_number of this Product.  # noqa: E501
        :rtype: str
        """
        return self._general_ledger_number

    @general_ledger_number.setter
    def general_ledger_number(self, general_ledger_number):
        """Sets the general_ledger_number of this Product.


        :param general_ledger_number: The general_ledger_number of this Product.  # noqa: E501
        :type: str
        """

        self._general_ledger_number = general_ledger_number

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


        :return: The general_ledger_taxcode of this Product.  # noqa: E501
        :rtype: str
        """
        return self._general_ledger_taxcode

    @general_ledger_taxcode.setter
    def general_ledger_taxcode(self, general_ledger_taxcode):
        """Sets the general_ledger_taxcode of this Product.


        :param general_ledger_taxcode: The general_ledger_taxcode of this Product.  # noqa: E501
        :type: str
        """

        self._general_ledger_taxcode = general_ledger_taxcode

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


        :return: The entitlement of this Product.  # noqa: E501
        :rtype: Entitlement
        """
        return self._entitlement

    @entitlement.setter
    def entitlement(self, entitlement):
        """Sets the entitlement of this Product.


        :param entitlement: The entitlement of this Product.  # noqa: E501
        :type: Entitlement
        """

        self._entitlement = entitlement

    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(Product, 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, Product):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
