# coding: utf-8

"""
    LEIA RESTful API for AI

    Leia API  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: contact@leia.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Annotation(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 = {
        'annotation_type': 'AnnotationTypes',
        'application_id': 'str',
        'creation_time': 'datetime',
        'document_id': 'str',
        'id': 'str',
        'name': 'str',
        'prediction': 'object',
        'tags': 'list[str]'
    }

    attribute_map = {
        'annotation_type': 'annotation_type',
        'application_id': 'application_id',
        'creation_time': 'creation_time',
        'document_id': 'document_id',
        'id': 'id',
        'name': 'name',
        'prediction': 'prediction',
        'tags': 'tags'
    }

    def __init__(self, annotation_type=None, application_id=None, creation_time=None, document_id=None, id=None, name=None, prediction=None, tags=None):  # noqa: E501
        """Annotation - a model defined in Swagger"""  # noqa: E501
        self._annotation_type = None
        self._application_id = None
        self._creation_time = None
        self._document_id = None
        self._id = None
        self._name = None
        self._prediction = None
        self._tags = None
        self.discriminator = None
        self.annotation_type = annotation_type
        self.application_id = application_id
        self.creation_time = creation_time
        self.document_id = document_id
        self.id = id
        if name is not None:
            self.name = name
        if prediction is not None:
            self.prediction = prediction
        if tags is not None:
            self.tags = tags

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


        :return: The annotation_type of this Annotation.  # noqa: E501
        :rtype: AnnotationTypes
        """
        return self._annotation_type

    @annotation_type.setter
    def annotation_type(self, annotation_type):
        """Sets the annotation_type of this Annotation.


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

        self._annotation_type = annotation_type

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


        :return: The application_id of this Annotation.  # noqa: E501
        :rtype: str
        """
        return self._application_id

    @application_id.setter
    def application_id(self, application_id):
        """Sets the application_id of this Annotation.


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

        self._application_id = application_id

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


        :return: The creation_time of this Annotation.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """Sets the creation_time of this Annotation.


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

        self._creation_time = creation_time

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


        :return: The document_id of this Annotation.  # noqa: E501
        :rtype: str
        """
        return self._document_id

    @document_id.setter
    def document_id(self, document_id):
        """Sets the document_id of this Annotation.


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

        self._document_id = document_id

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


        :return: The id of this Annotation.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Annotation.


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

        self._id = id

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


        :return: The name of this Annotation.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Annotation.


        :param name: The name of this Annotation.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The prediction of this Annotation.  # noqa: E501
        :rtype: object
        """
        return self._prediction

    @prediction.setter
    def prediction(self, prediction):
        """Sets the prediction of this Annotation.


        :param prediction: The prediction of this Annotation.  # noqa: E501
        :type: object
        """

        self._prediction = prediction

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


        :return: The tags of this Annotation.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Annotation.


        :param tags: The tags of this Annotation.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

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

        return self.__dict__ == other.__dict__

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