# coding: utf-8

"""
    Selling Partner API for Shipment Invoicing

    The Selling Partner API for Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil marketplace for a selling partner’s Fulfillment by Amazon (FBA) orders.

    The version of the OpenAPI document: v0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class SubmitInvoiceRequest(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 = {
        'invoice_content': 'bytearray',
        'marketplace_id': 'str',
        'content_md5_value': 'str',
    }

    attribute_map = {
        'invoice_content': 'InvoiceContent',
        'marketplace_id': 'MarketplaceId',
        'content_md5_value': 'ContentMD5Value',
    }

    def __init__(self, invoice_content=None, marketplace_id=None, content_md5_value=None, _configuration=None):  # noqa: E501
        """SubmitInvoiceRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._invoice_content = None
        self._marketplace_id = None
        self._content_md5_value = None
        self.discriminator = None

        self.invoice_content = invoice_content
        if marketplace_id is not None:
            self.marketplace_id = marketplace_id
        self.content_md5_value = content_md5_value

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

        Shipment invoice document content.  # noqa: E501

        :return: The invoice_content of this SubmitInvoiceRequest.  # noqa: E501
        :rtype: bytearray
        """
        return self._invoice_content

    @invoice_content.setter
    def invoice_content(self, invoice_content):
        """Sets the invoice_content of this SubmitInvoiceRequest.

        Shipment invoice document content.  # noqa: E501

        :param invoice_content: The invoice_content of this SubmitInvoiceRequest.  # noqa: E501
        :type: bytearray
        """
        if self._configuration.client_side_validation and invoice_content is None:
            raise ValueError("Invalid value for `invoice_content`, must not be `None`")  # noqa: E501

        self._invoice_content = invoice_content

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

        An Amazon marketplace identifier.  # noqa: E501

        :return: The marketplace_id of this SubmitInvoiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._marketplace_id

    @marketplace_id.setter
    def marketplace_id(self, marketplace_id):
        """Sets the marketplace_id of this SubmitInvoiceRequest.

        An Amazon marketplace identifier.  # noqa: E501

        :param marketplace_id: The marketplace_id of this SubmitInvoiceRequest.  # noqa: E501
        :type: str
        """

        self._marketplace_id = marketplace_id

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

        MD5 sum for validating the invoice data. For more information about calculating this value, see [Working with Content-MD5 Checksums](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_MD5.html).  # noqa: E501

        :return: The content_md5_value of this SubmitInvoiceRequest.  # noqa: E501
        :rtype: str
        """
        return self._content_md5_value

    @content_md5_value.setter
    def content_md5_value(self, content_md5_value):
        """Sets the content_md5_value of this SubmitInvoiceRequest.

        MD5 sum for validating the invoice data. For more information about calculating this value, see [Working with Content-MD5 Checksums](https://docs.developer.amazonservices.com/en_US/dev_guide/DG_MD5.html).  # noqa: E501

        :param content_md5_value: The content_md5_value of this SubmitInvoiceRequest.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and content_md5_value is None:
            raise ValueError("Invalid value for `content_md5_value`, must not be `None`")  # noqa: E501

        self._content_md5_value = content_md5_value

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

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