# coding: utf-8

"""
    shado-python-client

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from shado_client.models.object_id import ObjectID  # noqa: F401,E501
from shado_client.models.x_any import XAny  # noqa: F401,E501


class Result(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 = {
        'created_at': 'datetime',
        'creator': 'list[XAny]',
        'description': 'str',
        'external_url': 'str',
        'filename': 'str',
        'format': 'str',
        'metadata': 'object',
        'mime': 'str',
        'preview': 'str',
        'resource_created_at': 'datetime',
        'size': 'float',
        'subject': 'list[XAny]',
        'title': 'str',
        'thumbnail': 'str',
        'type': 'str',
        'updated_at': 'datetime',
        'id': 'ObjectID',
        'owner_id': 'ObjectID'
    }

    attribute_map = {
        'created_at': 'createdAt',
        'creator': 'creator',
        'description': 'description',
        'external_url': 'external_url',
        'filename': 'filename',
        'format': 'format',
        'metadata': 'metadata',
        'mime': 'mime',
        'preview': 'preview',
        'resource_created_at': 'resourceCreatedAt',
        'size': 'size',
        'subject': 'subject',
        'title': 'title',
        'thumbnail': 'thumbnail',
        'type': 'type',
        'updated_at': 'updatedAt',
        'id': 'id',
        'owner_id': 'ownerId'
    }

    def __init__(self, created_at=None, creator=None, description='', external_url=None, filename=None, format=None, metadata=None, mime=None, preview=None, resource_created_at=None, size=0.0, subject=None, title=None, thumbnail=None, type='binary', updated_at=None, id=None, owner_id=None):  # noqa: E501
        """Result - a model defined in Swagger"""  # noqa: E501

        self._created_at = None
        self._creator = None
        self._description = None
        self._external_url = None
        self._filename = None
        self._format = None
        self._metadata = None
        self._mime = None
        self._preview = None
        self._resource_created_at = None
        self._size = None
        self._subject = None
        self._title = None
        self._thumbnail = None
        self._type = None
        self._updated_at = None
        self._id = None
        self._owner_id = None
        self.discriminator = None

        if created_at is not None:
            self.created_at = created_at
        if creator is not None:
            self.creator = creator
        if description is not None:
            self.description = description
        if external_url is not None:
            self.external_url = external_url
        if filename is not None:
            self.filename = filename
        if format is not None:
            self.format = format
        if metadata is not None:
            self.metadata = metadata
        if mime is not None:
            self.mime = mime
        if preview is not None:
            self.preview = preview
        if resource_created_at is not None:
            self.resource_created_at = resource_created_at
        if size is not None:
            self.size = size
        if subject is not None:
            self.subject = subject
        if title is not None:
            self.title = title
        if thumbnail is not None:
            self.thumbnail = thumbnail
        if type is not None:
            self.type = type
        if updated_at is not None:
            self.updated_at = updated_at
        if id is not None:
            self.id = id
        if owner_id is not None:
            self.owner_id = owner_id

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


        :return: The created_at of this Result.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Result.


        :param created_at: The created_at of this Result.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The creator of this Result.  # noqa: E501
        :rtype: list[XAny]
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this Result.


        :param creator: The creator of this Result.  # noqa: E501
        :type: list[XAny]
        """

        self._creator = creator

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


        :return: The description of this Result.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Result.


        :param description: The description of this Result.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The external_url of this Result.  # noqa: E501
        :rtype: str
        """
        return self._external_url

    @external_url.setter
    def external_url(self, external_url):
        """Sets the external_url of this Result.


        :param external_url: The external_url of this Result.  # noqa: E501
        :type: str
        """

        self._external_url = external_url

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


        :return: The filename of this Result.  # noqa: E501
        :rtype: str
        """
        return self._filename

    @filename.setter
    def filename(self, filename):
        """Sets the filename of this Result.


        :param filename: The filename of this Result.  # noqa: E501
        :type: str
        """

        self._filename = filename

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


        :return: The format of this Result.  # noqa: E501
        :rtype: str
        """
        return self._format

    @format.setter
    def format(self, format):
        """Sets the format of this Result.


        :param format: The format of this Result.  # noqa: E501
        :type: str
        """

        self._format = format

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


        :return: The metadata of this Result.  # noqa: E501
        :rtype: object
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this Result.


        :param metadata: The metadata of this Result.  # noqa: E501
        :type: object
        """

        self._metadata = metadata

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


        :return: The mime of this Result.  # noqa: E501
        :rtype: str
        """
        return self._mime

    @mime.setter
    def mime(self, mime):
        """Sets the mime of this Result.


        :param mime: The mime of this Result.  # noqa: E501
        :type: str
        """

        self._mime = mime

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


        :return: The preview of this Result.  # noqa: E501
        :rtype: str
        """
        return self._preview

    @preview.setter
    def preview(self, preview):
        """Sets the preview of this Result.


        :param preview: The preview of this Result.  # noqa: E501
        :type: str
        """

        self._preview = preview

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


        :return: The resource_created_at of this Result.  # noqa: E501
        :rtype: datetime
        """
        return self._resource_created_at

    @resource_created_at.setter
    def resource_created_at(self, resource_created_at):
        """Sets the resource_created_at of this Result.


        :param resource_created_at: The resource_created_at of this Result.  # noqa: E501
        :type: datetime
        """

        self._resource_created_at = resource_created_at

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


        :return: The size of this Result.  # noqa: E501
        :rtype: float
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this Result.


        :param size: The size of this Result.  # noqa: E501
        :type: float
        """

        self._size = size

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


        :return: The subject of this Result.  # noqa: E501
        :rtype: list[XAny]
        """
        return self._subject

    @subject.setter
    def subject(self, subject):
        """Sets the subject of this Result.


        :param subject: The subject of this Result.  # noqa: E501
        :type: list[XAny]
        """

        self._subject = subject

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


        :return: The title of this Result.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this Result.


        :param title: The title of this Result.  # noqa: E501
        :type: str
        """

        self._title = title

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


        :return: The thumbnail of this Result.  # noqa: E501
        :rtype: str
        """
        return self._thumbnail

    @thumbnail.setter
    def thumbnail(self, thumbnail):
        """Sets the thumbnail of this Result.


        :param thumbnail: The thumbnail of this Result.  # noqa: E501
        :type: str
        """

        self._thumbnail = thumbnail

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


        :return: The type of this Result.  # noqa: E501
        :rtype: str
        """
        return self._type

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


        :param type: The type of this Result.  # noqa: E501
        :type: str
        """
        allowed_values = ["audio", "image", "video", "binary"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The updated_at of this Result.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Result.


        :param updated_at: The updated_at of this Result.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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


        :return: The id of this Result.  # noqa: E501
        :rtype: ObjectID
        """
        return self._id

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


        :param id: The id of this Result.  # noqa: E501
        :type: ObjectID
        """

        self._id = id

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


        :return: The owner_id of this Result.  # noqa: E501
        :rtype: ObjectID
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this Result.


        :param owner_id: The owner_id of this Result.  # noqa: E501
        :type: ObjectID
        """

        self._owner_id = owner_id

    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

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

        return self.__dict__ == other.__dict__

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