# coding: utf-8

"""
    Welcome to the Atera API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: v3
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from atera_client.configuration import Configuration


class InvoiceQueryDTO(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 = {
        "is_adhoc": "bool",
        "invoice_id": "str",
        "invoice_number": "int",
        "invoice_number_as_string": "str",
        "total": "float",
        "subtotal": "float",
        "tax": "float",
        "tax_percentage": "float",
        "invoice_date": "datetime",
        "contract_name": "str",
        "period_start_date": "datetime",
        "period_end_date": "datetime",
        "currency": "str",
        "line_items": "list[InvoiceLineItemQueryDTO]",
        "_from": "ContactDetails",
        "to": "ContactDetails",
    }

    attribute_map = {
        "is_adhoc": "IsAdhoc",
        "invoice_id": "InvoiceId",
        "invoice_number": "InvoiceNumber",
        "invoice_number_as_string": "InvoiceNumberAsString",
        "total": "Total",
        "subtotal": "Subtotal",
        "tax": "Tax",
        "tax_percentage": "TaxPercentage",
        "invoice_date": "InvoiceDate",
        "contract_name": "ContractName",
        "period_start_date": "PeriodStartDate",
        "period_end_date": "PeriodEndDate",
        "currency": "Currency",
        "line_items": "LineItems",
        "_from": "From",
        "to": "To",
    }

    def __init__(
        self,
        is_adhoc=None,
        invoice_id=None,
        invoice_number=None,
        invoice_number_as_string=None,
        total=None,
        subtotal=None,
        tax=None,
        tax_percentage=None,
        invoice_date=None,
        contract_name=None,
        period_start_date=None,
        period_end_date=None,
        currency=None,
        line_items=None,
        _from=None,
        to=None,
        _configuration=None,
    ):  # noqa: E501
        """InvoiceQueryDTO - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._is_adhoc = None
        self._invoice_id = None
        self._invoice_number = None
        self._invoice_number_as_string = None
        self._total = None
        self._subtotal = None
        self._tax = None
        self._tax_percentage = None
        self._invoice_date = None
        self._contract_name = None
        self._period_start_date = None
        self._period_end_date = None
        self._currency = None
        self._line_items = None
        self.__from = None
        self._to = None
        self.discriminator = None

        if is_adhoc is not None:
            self.is_adhoc = is_adhoc
        if invoice_id is not None:
            self.invoice_id = invoice_id
        if invoice_number is not None:
            self.invoice_number = invoice_number
        if invoice_number_as_string is not None:
            self.invoice_number_as_string = invoice_number_as_string
        if total is not None:
            self.total = total
        if subtotal is not None:
            self.subtotal = subtotal
        if tax is not None:
            self.tax = tax
        if tax_percentage is not None:
            self.tax_percentage = tax_percentage
        if invoice_date is not None:
            self.invoice_date = invoice_date
        if contract_name is not None:
            self.contract_name = contract_name
        if period_start_date is not None:
            self.period_start_date = period_start_date
        if period_end_date is not None:
            self.period_end_date = period_end_date
        if currency is not None:
            self.currency = currency
        if line_items is not None:
            self.line_items = line_items
        if _from is not None:
            self._from = _from
        if to is not None:
            self.to = to

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


        :return: The is_adhoc of this InvoiceQueryDTO.  # noqa: E501
        :rtype: bool
        """
        return self._is_adhoc

    @is_adhoc.setter
    def is_adhoc(self, is_adhoc):
        """Sets the is_adhoc of this InvoiceQueryDTO.


        :param is_adhoc: The is_adhoc of this InvoiceQueryDTO.  # noqa: E501
        :type: bool
        """

        self._is_adhoc = is_adhoc

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


        :return: The invoice_id of this InvoiceQueryDTO.  # noqa: E501
        :rtype: str
        """
        return self._invoice_id

    @invoice_id.setter
    def invoice_id(self, invoice_id):
        """Sets the invoice_id of this InvoiceQueryDTO.


        :param invoice_id: The invoice_id of this InvoiceQueryDTO.  # noqa: E501
        :type: str
        """

        self._invoice_id = invoice_id

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


        :return: The invoice_number of this InvoiceQueryDTO.  # noqa: E501
        :rtype: int
        """
        return self._invoice_number

    @invoice_number.setter
    def invoice_number(self, invoice_number):
        """Sets the invoice_number of this InvoiceQueryDTO.


        :param invoice_number: The invoice_number of this InvoiceQueryDTO.  # noqa: E501
        :type: int
        """

        self._invoice_number = invoice_number

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


        :return: The invoice_number_as_string of this InvoiceQueryDTO.  # noqa: E501
        :rtype: str
        """
        return self._invoice_number_as_string

    @invoice_number_as_string.setter
    def invoice_number_as_string(self, invoice_number_as_string):
        """Sets the invoice_number_as_string of this InvoiceQueryDTO.


        :param invoice_number_as_string: The invoice_number_as_string of this InvoiceQueryDTO.  # noqa: E501
        :type: str
        """

        self._invoice_number_as_string = invoice_number_as_string

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


        :return: The total of this InvoiceQueryDTO.  # noqa: E501
        :rtype: float
        """
        return self._total

    @total.setter
    def total(self, total):
        """Sets the total of this InvoiceQueryDTO.


        :param total: The total of this InvoiceQueryDTO.  # noqa: E501
        :type: float
        """

        self._total = total

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


        :return: The subtotal of this InvoiceQueryDTO.  # noqa: E501
        :rtype: float
        """
        return self._subtotal

    @subtotal.setter
    def subtotal(self, subtotal):
        """Sets the subtotal of this InvoiceQueryDTO.


        :param subtotal: The subtotal of this InvoiceQueryDTO.  # noqa: E501
        :type: float
        """

        self._subtotal = subtotal

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


        :return: The tax of this InvoiceQueryDTO.  # noqa: E501
        :rtype: float
        """
        return self._tax

    @tax.setter
    def tax(self, tax):
        """Sets the tax of this InvoiceQueryDTO.


        :param tax: The tax of this InvoiceQueryDTO.  # noqa: E501
        :type: float
        """

        self._tax = tax

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


        :return: The tax_percentage of this InvoiceQueryDTO.  # noqa: E501
        :rtype: float
        """
        return self._tax_percentage

    @tax_percentage.setter
    def tax_percentage(self, tax_percentage):
        """Sets the tax_percentage of this InvoiceQueryDTO.


        :param tax_percentage: The tax_percentage of this InvoiceQueryDTO.  # noqa: E501
        :type: float
        """

        self._tax_percentage = tax_percentage

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


        :return: The invoice_date of this InvoiceQueryDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._invoice_date

    @invoice_date.setter
    def invoice_date(self, invoice_date):
        """Sets the invoice_date of this InvoiceQueryDTO.


        :param invoice_date: The invoice_date of this InvoiceQueryDTO.  # noqa: E501
        :type: datetime
        """

        self._invoice_date = invoice_date

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


        :return: The contract_name of this InvoiceQueryDTO.  # noqa: E501
        :rtype: str
        """
        return self._contract_name

    @contract_name.setter
    def contract_name(self, contract_name):
        """Sets the contract_name of this InvoiceQueryDTO.


        :param contract_name: The contract_name of this InvoiceQueryDTO.  # noqa: E501
        :type: str
        """

        self._contract_name = contract_name

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


        :return: The period_start_date of this InvoiceQueryDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._period_start_date

    @period_start_date.setter
    def period_start_date(self, period_start_date):
        """Sets the period_start_date of this InvoiceQueryDTO.


        :param period_start_date: The period_start_date of this InvoiceQueryDTO.  # noqa: E501
        :type: datetime
        """

        self._period_start_date = period_start_date

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


        :return: The period_end_date of this InvoiceQueryDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._period_end_date

    @period_end_date.setter
    def period_end_date(self, period_end_date):
        """Sets the period_end_date of this InvoiceQueryDTO.


        :param period_end_date: The period_end_date of this InvoiceQueryDTO.  # noqa: E501
        :type: datetime
        """

        self._period_end_date = period_end_date

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


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

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


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

        self._currency = currency

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


        :return: The line_items of this InvoiceQueryDTO.  # noqa: E501
        :rtype: list[InvoiceLineItemQueryDTO]
        """
        return self._line_items

    @line_items.setter
    def line_items(self, line_items):
        """Sets the line_items of this InvoiceQueryDTO.


        :param line_items: The line_items of this InvoiceQueryDTO.  # noqa: E501
        :type: list[InvoiceLineItemQueryDTO]
        """

        self._line_items = line_items

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


        :return: The _from of this InvoiceQueryDTO.  # noqa: E501
        :rtype: ContactDetails
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this InvoiceQueryDTO.


        :param _from: The _from of this InvoiceQueryDTO.  # noqa: E501
        :type: ContactDetails
        """

        self.__from = _from

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


        :return: The to of this InvoiceQueryDTO.  # noqa: E501
        :rtype: ContactDetails
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this InvoiceQueryDTO.


        :param to: The to of this InvoiceQueryDTO.  # noqa: E501
        :type: ContactDetails
        """

        self._to = to

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

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