# coding: utf-8

"""
    ocrapi

    The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class ReceiptRecognitionResult(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 = {
        'successful': 'bool',
        'timestamp': 'datetime',
        'business_name': 'str',
        'business_website': 'str',
        'address_string': 'str',
        'phone_number': 'str',
        'receipt_items': 'list[ReceiptLineItem]',
        'receipt_sub_total': 'float',
        'receipt_total': 'float'
    }

    attribute_map = {
        'successful': 'Successful',
        'timestamp': 'Timestamp',
        'business_name': 'BusinessName',
        'business_website': 'BusinessWebsite',
        'address_string': 'AddressString',
        'phone_number': 'PhoneNumber',
        'receipt_items': 'ReceiptItems',
        'receipt_sub_total': 'ReceiptSubTotal',
        'receipt_total': 'ReceiptTotal'
    }

    def __init__(self, successful=None, timestamp=None, business_name=None, business_website=None, address_string=None, phone_number=None, receipt_items=None, receipt_sub_total=None, receipt_total=None):  # noqa: E501
        """ReceiptRecognitionResult - a model defined in Swagger"""  # noqa: E501

        self._successful = None
        self._timestamp = None
        self._business_name = None
        self._business_website = None
        self._address_string = None
        self._phone_number = None
        self._receipt_items = None
        self._receipt_sub_total = None
        self._receipt_total = None
        self.discriminator = None

        if successful is not None:
            self.successful = successful
        if timestamp is not None:
            self.timestamp = timestamp
        if business_name is not None:
            self.business_name = business_name
        if business_website is not None:
            self.business_website = business_website
        if address_string is not None:
            self.address_string = address_string
        if phone_number is not None:
            self.phone_number = phone_number
        if receipt_items is not None:
            self.receipt_items = receipt_items
        if receipt_sub_total is not None:
            self.receipt_sub_total = receipt_sub_total
        if receipt_total is not None:
            self.receipt_total = receipt_total

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

        True if the operation was successful, false otherwise  # noqa: E501

        :return: The successful of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: bool
        """
        return self._successful

    @successful.setter
    def successful(self, successful):
        """Sets the successful of this ReceiptRecognitionResult.

        True if the operation was successful, false otherwise  # noqa: E501

        :param successful: The successful of this ReceiptRecognitionResult.  # noqa: E501
        :type: bool
        """

        self._successful = successful

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

        The date and time printed on the receipt (if included on the receipt)  # noqa: E501

        :return: The timestamp of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: datetime
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this ReceiptRecognitionResult.

        The date and time printed on the receipt (if included on the receipt)  # noqa: E501

        :param timestamp: The timestamp of this ReceiptRecognitionResult.  # noqa: E501
        :type: datetime
        """

        self._timestamp = timestamp

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

        The name of the business printed on the receipt (if included on the receipt)  # noqa: E501

        :return: The business_name of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: str
        """
        return self._business_name

    @business_name.setter
    def business_name(self, business_name):
        """Sets the business_name of this ReceiptRecognitionResult.

        The name of the business printed on the receipt (if included on the receipt)  # noqa: E501

        :param business_name: The business_name of this ReceiptRecognitionResult.  # noqa: E501
        :type: str
        """

        self._business_name = business_name

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

        The website URL of the business printed on the receipt (if included on the receipt)  # noqa: E501

        :return: The business_website of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: str
        """
        return self._business_website

    @business_website.setter
    def business_website(self, business_website):
        """Sets the business_website of this ReceiptRecognitionResult.

        The website URL of the business printed on the receipt (if included on the receipt)  # noqa: E501

        :param business_website: The business_website of this ReceiptRecognitionResult.  # noqa: E501
        :type: str
        """

        self._business_website = business_website

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

        The address of the business printed on the receipt (if included on the receipt)  # noqa: E501

        :return: The address_string of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: str
        """
        return self._address_string

    @address_string.setter
    def address_string(self, address_string):
        """Sets the address_string of this ReceiptRecognitionResult.

        The address of the business printed on the receipt (if included on the receipt)  # noqa: E501

        :param address_string: The address_string of this ReceiptRecognitionResult.  # noqa: E501
        :type: str
        """

        self._address_string = address_string

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

        The phone number printed on the receipt (if included on the receipt)  # noqa: E501

        :return: The phone_number of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: str
        """
        return self._phone_number

    @phone_number.setter
    def phone_number(self, phone_number):
        """Sets the phone_number of this ReceiptRecognitionResult.

        The phone number printed on the receipt (if included on the receipt)  # noqa: E501

        :param phone_number: The phone_number of this ReceiptRecognitionResult.  # noqa: E501
        :type: str
        """

        self._phone_number = phone_number

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

        The individual line items comprising the order; does not include total (see ReceiptTotal)  # noqa: E501

        :return: The receipt_items of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: list[ReceiptLineItem]
        """
        return self._receipt_items

    @receipt_items.setter
    def receipt_items(self, receipt_items):
        """Sets the receipt_items of this ReceiptRecognitionResult.

        The individual line items comprising the order; does not include total (see ReceiptTotal)  # noqa: E501

        :param receipt_items: The receipt_items of this ReceiptRecognitionResult.  # noqa: E501
        :type: list[ReceiptLineItem]
        """

        self._receipt_items = receipt_items

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

        Optional; if available, the monetary value of the receipt subtotal - typically not including specialized line items such as Tax. If this value is not available, it will be 0.  # noqa: E501

        :return: The receipt_sub_total of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: float
        """
        return self._receipt_sub_total

    @receipt_sub_total.setter
    def receipt_sub_total(self, receipt_sub_total):
        """Sets the receipt_sub_total of this ReceiptRecognitionResult.

        Optional; if available, the monetary value of the receipt subtotal - typically not including specialized line items such as Tax. If this value is not available, it will be 0.  # noqa: E501

        :param receipt_sub_total: The receipt_sub_total of this ReceiptRecognitionResult.  # noqa: E501
        :type: float
        """

        self._receipt_sub_total = receipt_sub_total

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

        The total monetary value of the receipt (if included on the receipt)  # noqa: E501

        :return: The receipt_total of this ReceiptRecognitionResult.  # noqa: E501
        :rtype: float
        """
        return self._receipt_total

    @receipt_total.setter
    def receipt_total(self, receipt_total):
        """Sets the receipt_total of this ReceiptRecognitionResult.

        The total monetary value of the receipt (if included on the receipt)  # noqa: E501

        :param receipt_total: The receipt_total of this ReceiptRecognitionResult.  # noqa: E501
        :type: float
        """

        self._receipt_total = receipt_total

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

        return self.__dict__ == other.__dict__

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