# 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 DocumentInsert(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 = {
        'vendor_id': 'str',
        'partner_id': 'int',
        'block_id': 'int',
        'bank_account_id': 'int',
        'type': 'DocumentInsertType',
        'fulfillment_date': 'date',
        'due_date': 'date',
        'payment_method': 'PaymentMethod',
        'language': 'DocumentLanguage',
        'currency': 'Currency',
        'conversion_rate': 'float',
        'electronic': 'bool',
        'paid': 'bool',
        'items': 'list[OneOfDocumentInsertItemsItems]',
        'comment': 'str',
        'settings': 'DocumentSettings',
        'advance_invoice': 'list[int]',
        'discount': 'Discount',
        'instant_payment': 'bool'
    }

    attribute_map = {
        'vendor_id': 'vendor_id',
        'partner_id': 'partner_id',
        'block_id': 'block_id',
        'bank_account_id': 'bank_account_id',
        'type': 'type',
        'fulfillment_date': 'fulfillment_date',
        'due_date': 'due_date',
        'payment_method': 'payment_method',
        'language': 'language',
        'currency': 'currency',
        'conversion_rate': 'conversion_rate',
        'electronic': 'electronic',
        'paid': 'paid',
        'items': 'items',
        'comment': 'comment',
        'settings': 'settings',
        'advance_invoice': 'advance_invoice',
        'discount': 'discount',
        'instant_payment': 'instant_payment'
    }

    def __init__(self, vendor_id=None, partner_id=None, block_id=None, bank_account_id=None, type=None, fulfillment_date=None, due_date=None, payment_method=None, language=None, currency=None, conversion_rate=None, electronic=False, paid=False, items=None, comment=None, settings=None, advance_invoice=None, discount=None, instant_payment=None):  # noqa: E501
        """DocumentInsert - a model defined in Swagger"""  # noqa: E501
        self._vendor_id = None
        self._partner_id = None
        self._block_id = None
        self._bank_account_id = None
        self._type = None
        self._fulfillment_date = None
        self._due_date = None
        self._payment_method = None
        self._language = None
        self._currency = None
        self._conversion_rate = None
        self._electronic = None
        self._paid = None
        self._items = None
        self._comment = None
        self._settings = None
        self._advance_invoice = None
        self._discount = None
        self._instant_payment = None
        self.discriminator = None
        if vendor_id is not None:
            self.vendor_id = vendor_id
        self.partner_id = partner_id
        self.block_id = block_id
        if bank_account_id is not None:
            self.bank_account_id = bank_account_id
        self.type = type
        self.fulfillment_date = fulfillment_date
        self.due_date = due_date
        self.payment_method = payment_method
        self.language = language
        self.currency = currency
        if conversion_rate is not None:
            self.conversion_rate = conversion_rate
        if electronic is not None:
            self.electronic = electronic
        if paid is not None:
            self.paid = paid
        if items is not None:
            self.items = items
        if comment is not None:
            self.comment = comment
        if settings is not None:
            self.settings = settings
        if advance_invoice is not None:
            self.advance_invoice = advance_invoice
        if discount is not None:
            self.discount = discount
        if instant_payment is not None:
            self.instant_payment = instant_payment

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


        :return: The vendor_id of this DocumentInsert.  # noqa: E501
        :rtype: str
        """
        return self._vendor_id

    @vendor_id.setter
    def vendor_id(self, vendor_id):
        """Sets the vendor_id of this DocumentInsert.


        :param vendor_id: The vendor_id of this DocumentInsert.  # noqa: E501
        :type: str
        """

        self._vendor_id = vendor_id

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


        :return: The partner_id of this DocumentInsert.  # noqa: E501
        :rtype: int
        """
        return self._partner_id

    @partner_id.setter
    def partner_id(self, partner_id):
        """Sets the partner_id of this DocumentInsert.


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

        self._partner_id = partner_id

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


        :return: The block_id of this DocumentInsert.  # noqa: E501
        :rtype: int
        """
        return self._block_id

    @block_id.setter
    def block_id(self, block_id):
        """Sets the block_id of this DocumentInsert.


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

        self._block_id = block_id

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


        :return: The bank_account_id of this DocumentInsert.  # noqa: E501
        :rtype: int
        """
        return self._bank_account_id

    @bank_account_id.setter
    def bank_account_id(self, bank_account_id):
        """Sets the bank_account_id of this DocumentInsert.


        :param bank_account_id: The bank_account_id of this DocumentInsert.  # noqa: E501
        :type: int
        """

        self._bank_account_id = bank_account_id

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


        :return: The type of this DocumentInsert.  # noqa: E501
        :rtype: DocumentInsertType
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this DocumentInsert.


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

        self._type = type

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


        :return: The fulfillment_date of this DocumentInsert.  # noqa: E501
        :rtype: date
        """
        return self._fulfillment_date

    @fulfillment_date.setter
    def fulfillment_date(self, fulfillment_date):
        """Sets the fulfillment_date of this DocumentInsert.


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

        self._fulfillment_date = fulfillment_date

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


        :return: The due_date of this DocumentInsert.  # noqa: E501
        :rtype: date
        """
        return self._due_date

    @due_date.setter
    def due_date(self, due_date):
        """Sets the due_date of this DocumentInsert.


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

        self._due_date = due_date

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


        :return: The payment_method of this DocumentInsert.  # noqa: E501
        :rtype: PaymentMethod
        """
        return self._payment_method

    @payment_method.setter
    def payment_method(self, payment_method):
        """Sets the payment_method of this DocumentInsert.


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

        self._payment_method = payment_method

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


        :return: The language of this DocumentInsert.  # noqa: E501
        :rtype: DocumentLanguage
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this DocumentInsert.


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

        self._language = language

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


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

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


        :param currency: The currency of this DocumentInsert.  # 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 conversion_rate(self):
        """Gets the conversion_rate of this DocumentInsert.  # noqa: E501


        :return: The conversion_rate of this DocumentInsert.  # noqa: E501
        :rtype: float
        """
        return self._conversion_rate

    @conversion_rate.setter
    def conversion_rate(self, conversion_rate):
        """Sets the conversion_rate of this DocumentInsert.


        :param conversion_rate: The conversion_rate of this DocumentInsert.  # noqa: E501
        :type: float
        """

        self._conversion_rate = conversion_rate

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


        :return: The electronic of this DocumentInsert.  # noqa: E501
        :rtype: bool
        """
        return self._electronic

    @electronic.setter
    def electronic(self, electronic):
        """Sets the electronic of this DocumentInsert.


        :param electronic: The electronic of this DocumentInsert.  # noqa: E501
        :type: bool
        """

        self._electronic = electronic

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


        :return: The paid of this DocumentInsert.  # noqa: E501
        :rtype: bool
        """
        return self._paid

    @paid.setter
    def paid(self, paid):
        """Sets the paid of this DocumentInsert.


        :param paid: The paid of this DocumentInsert.  # noqa: E501
        :type: bool
        """

        self._paid = paid

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


        :return: The items of this DocumentInsert.  # noqa: E501
        :rtype: list[OneOfDocumentInsertItemsItems]
        """
        return self._items

    @items.setter
    def items(self, items):
        """Sets the items of this DocumentInsert.


        :param items: The items of this DocumentInsert.  # noqa: E501
        :type: list[OneOfDocumentInsertItemsItems]
        """

        self._items = items

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


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

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


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

        self._comment = comment

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


        :return: The settings of this DocumentInsert.  # noqa: E501
        :rtype: DocumentSettings
        """
        return self._settings

    @settings.setter
    def settings(self, settings):
        """Sets the settings of this DocumentInsert.


        :param settings: The settings of this DocumentInsert.  # noqa: E501
        :type: DocumentSettings
        """

        self._settings = settings

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


        :return: The advance_invoice of this DocumentInsert.  # noqa: E501
        :rtype: list[int]
        """
        return self._advance_invoice

    @advance_invoice.setter
    def advance_invoice(self, advance_invoice):
        """Sets the advance_invoice of this DocumentInsert.


        :param advance_invoice: The advance_invoice of this DocumentInsert.  # noqa: E501
        :type: list[int]
        """

        self._advance_invoice = advance_invoice

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


        :return: The discount of this DocumentInsert.  # noqa: E501
        :rtype: Discount
        """
        return self._discount

    @discount.setter
    def discount(self, discount):
        """Sets the discount of this DocumentInsert.


        :param discount: The discount of this DocumentInsert.  # noqa: E501
        :type: Discount
        """

        self._discount = discount

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


        :return: The instant_payment of this DocumentInsert.  # noqa: E501
        :rtype: bool
        """
        return self._instant_payment

    @instant_payment.setter
    def instant_payment(self, instant_payment):
        """Sets the instant_payment of this DocumentInsert.


        :param instant_payment: The instant_payment of this DocumentInsert.  # noqa: E501
        :type: bool
        """

        self._instant_payment = instant_payment

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

        return self.__dict__ == other.__dict__

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