# 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 OcrPhotoTextElement(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 = {
        'text': 'str',
        'x_left': 'int',
        'y_top': 'int',
        'width': 'int',
        'height': 'int',
        'bounding_points': 'list[Point]',
        'confidence_level': 'float'
    }

    attribute_map = {
        'text': 'Text',
        'x_left': 'XLeft',
        'y_top': 'YTop',
        'width': 'Width',
        'height': 'Height',
        'bounding_points': 'BoundingPoints',
        'confidence_level': 'ConfidenceLevel'
    }

    def __init__(self, text=None, x_left=None, y_top=None, width=None, height=None, bounding_points=None, confidence_level=None):  # noqa: E501
        """OcrPhotoTextElement - a model defined in Swagger"""  # noqa: E501

        self._text = None
        self._x_left = None
        self._y_top = None
        self._width = None
        self._height = None
        self._bounding_points = None
        self._confidence_level = None
        self.discriminator = None

        if text is not None:
            self.text = text
        if x_left is not None:
            self.x_left = x_left
        if y_top is not None:
            self.y_top = y_top
        if width is not None:
            self.width = width
        if height is not None:
            self.height = height
        if bounding_points is not None:
            self.bounding_points = bounding_points
        if confidence_level is not None:
            self.confidence_level = confidence_level

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

        Text of the word  # noqa: E501

        :return: The text of this OcrPhotoTextElement.  # noqa: E501
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text):
        """Sets the text of this OcrPhotoTextElement.

        Text of the word  # noqa: E501

        :param text: The text of this OcrPhotoTextElement.  # noqa: E501
        :type: str
        """

        self._text = text

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

        X location of the left edge of the word in pixels  # noqa: E501

        :return: The x_left of this OcrPhotoTextElement.  # noqa: E501
        :rtype: int
        """
        return self._x_left

    @x_left.setter
    def x_left(self, x_left):
        """Sets the x_left of this OcrPhotoTextElement.

        X location of the left edge of the word in pixels  # noqa: E501

        :param x_left: The x_left of this OcrPhotoTextElement.  # noqa: E501
        :type: int
        """

        self._x_left = x_left

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

        Y location of the top edge of the word in pixels  # noqa: E501

        :return: The y_top of this OcrPhotoTextElement.  # noqa: E501
        :rtype: int
        """
        return self._y_top

    @y_top.setter
    def y_top(self, y_top):
        """Sets the y_top of this OcrPhotoTextElement.

        Y location of the top edge of the word in pixels  # noqa: E501

        :param y_top: The y_top of this OcrPhotoTextElement.  # noqa: E501
        :type: int
        """

        self._y_top = y_top

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

        Width of the word in pixels  # noqa: E501

        :return: The width of this OcrPhotoTextElement.  # noqa: E501
        :rtype: int
        """
        return self._width

    @width.setter
    def width(self, width):
        """Sets the width of this OcrPhotoTextElement.

        Width of the word in pixels  # noqa: E501

        :param width: The width of this OcrPhotoTextElement.  # noqa: E501
        :type: int
        """

        self._width = width

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

        Height of the word in pixels  # noqa: E501

        :return: The height of this OcrPhotoTextElement.  # noqa: E501
        :rtype: int
        """
        return self._height

    @height.setter
    def height(self, height):
        """Sets the height of this OcrPhotoTextElement.

        Height of the word in pixels  # noqa: E501

        :param height: The height of this OcrPhotoTextElement.  # noqa: E501
        :type: int
        """

        self._height = height

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

        Points that form the bounding polygon around the text  # noqa: E501

        :return: The bounding_points of this OcrPhotoTextElement.  # noqa: E501
        :rtype: list[Point]
        """
        return self._bounding_points

    @bounding_points.setter
    def bounding_points(self, bounding_points):
        """Sets the bounding_points of this OcrPhotoTextElement.

        Points that form the bounding polygon around the text  # noqa: E501

        :param bounding_points: The bounding_points of this OcrPhotoTextElement.  # noqa: E501
        :type: list[Point]
        """

        self._bounding_points = bounding_points

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

        Confidence level of the machine learning result; possible values are 0.0 (lowest accuracy) - 1.0 (highest accuracy)  # noqa: E501

        :return: The confidence_level of this OcrPhotoTextElement.  # noqa: E501
        :rtype: float
        """
        return self._confidence_level

    @confidence_level.setter
    def confidence_level(self, confidence_level):
        """Sets the confidence_level of this OcrPhotoTextElement.

        Confidence level of the machine learning result; possible values are 0.0 (lowest accuracy) - 1.0 (highest accuracy)  # noqa: E501

        :param confidence_level: The confidence_level of this OcrPhotoTextElement.  # noqa: E501
        :type: float
        """

        self._confidence_level = confidence_level

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

        return self.__dict__ == other.__dict__

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