# coding: utf-8

"""
    Accounting API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    OpenAPI spec version: 2.1.2
    Contact: api@xero.com
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401

from xero_python.models import BaseModel


class Allocation(BaseModel):
    """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 = {"invoice": "Invoice", "amount": "float", "date": "date[ms-format]"}

    attribute_map = {"invoice": "Invoice", "amount": "Amount", "date": "Date"}

    def __init__(self, invoice=None, amount=None, date=None):  # noqa: E501
        """Allocation - a model defined in OpenAPI"""  # noqa: E501

        self._invoice = None
        self._amount = None
        self._date = None
        self.discriminator = None

        self.invoice = invoice
        self.amount = amount
        self.date = date

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


        :return: The invoice of this Allocation.  # noqa: E501
        :rtype: Invoice
        """
        return self._invoice

    @invoice.setter
    def invoice(self, invoice):
        """Sets the invoice of this Allocation.


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

        self._invoice = invoice

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

        the amount being applied to the invoice  # noqa: E501

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

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

        the amount being applied to the invoice  # noqa: E501

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

        self._amount = amount

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

        the date the allocation is applied YYYY-MM-DD.  # noqa: E501

        :return: The date of this Allocation.  # noqa: E501
        :rtype: date
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this Allocation.

        the date the allocation is applied YYYY-MM-DD.  # noqa: E501

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

        self._date = date
