# 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 Model(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 = {
        'allow_all_applications': 'bool',
        'allowed_application_ids': 'list[str]',
        'application_id': 'str',
        'creation_time': 'datetime',
        'description': 'str',
        'documentation': 'str',
        'id': 'str',
        'input_types': 'list[ModelInputTypes]',
        'md5sum': 'str',
        'model_clazz': 'str',
        'model_module': 'str',
        'model_type': 'ModelTypes',
        'name': 'str',
        'output_format': 'object',
        'short_name': 'str',
        'size': 'float',
        'speed': 'Speed',
        'tags': 'list[str]',
        'ttl': 'float'
    }

    attribute_map = {
        'allow_all_applications': 'allow_all_applications',
        'allowed_application_ids': 'allowed_application_ids',
        'application_id': 'application_id',
        'creation_time': 'creation_time',
        'description': 'description',
        'documentation': 'documentation',
        'id': 'id',
        'input_types': 'input_types',
        'md5sum': 'md5sum',
        'model_clazz': 'model_clazz',
        'model_module': 'model_module',
        'model_type': 'model_type',
        'name': 'name',
        'output_format': 'output_format',
        'short_name': 'short_name',
        'size': 'size',
        'speed': 'speed',
        'tags': 'tags',
        'ttl': 'ttl'
    }

    def __init__(self, allow_all_applications=None, allowed_application_ids=None, application_id=None, creation_time=None, description=None, documentation=None, id=None, input_types=None, md5sum=None, model_clazz=None, model_module=None, model_type=None, name=None, output_format=None, short_name=None, size=None, speed=None, tags=None, ttl=None):  # noqa: E501
        """Model - a model defined in Swagger"""  # noqa: E501
        self._allow_all_applications = None
        self._allowed_application_ids = None
        self._application_id = None
        self._creation_time = None
        self._description = None
        self._documentation = None
        self._id = None
        self._input_types = None
        self._md5sum = None
        self._model_clazz = None
        self._model_module = None
        self._model_type = None
        self._name = None
        self._output_format = None
        self._short_name = None
        self._size = None
        self._speed = None
        self._tags = None
        self._ttl = None
        self.discriminator = None
        if allow_all_applications is not None:
            self.allow_all_applications = allow_all_applications
        if allowed_application_ids is not None:
            self.allowed_application_ids = allowed_application_ids
        if application_id is not None:
            self.application_id = application_id
        self.creation_time = creation_time
        if description is not None:
            self.description = description
        if documentation is not None:
            self.documentation = documentation
        self.id = id
        self.input_types = input_types
        if md5sum is not None:
            self.md5sum = md5sum
        self.model_clazz = model_clazz
        self.model_module = model_module
        self.model_type = model_type
        self.name = name
        if output_format is not None:
            self.output_format = output_format
        if short_name is not None:
            self.short_name = short_name
        self.size = size
        if speed is not None:
            self.speed = speed
        if tags is not None:
            self.tags = tags
        if ttl is not None:
            self.ttl = ttl

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


        :return: The allow_all_applications of this Model.  # noqa: E501
        :rtype: bool
        """
        return self._allow_all_applications

    @allow_all_applications.setter
    def allow_all_applications(self, allow_all_applications):
        """Sets the allow_all_applications of this Model.


        :param allow_all_applications: The allow_all_applications of this Model.  # noqa: E501
        :type: bool
        """

        self._allow_all_applications = allow_all_applications

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


        :return: The allowed_application_ids of this Model.  # noqa: E501
        :rtype: list[str]
        """
        return self._allowed_application_ids

    @allowed_application_ids.setter
    def allowed_application_ids(self, allowed_application_ids):
        """Sets the allowed_application_ids of this Model.


        :param allowed_application_ids: The allowed_application_ids of this Model.  # noqa: E501
        :type: list[str]
        """

        self._allowed_application_ids = allowed_application_ids

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


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

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


        :param application_id: The application_id of this Model.  # noqa: E501
        :type: str
        """

        self._application_id = application_id

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


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

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


        :param creation_time: The creation_time of this Model.  # 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 description(self):
        """Gets the description of this Model.  # noqa: E501


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

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


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

        self._description = description

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


        :return: The documentation of this Model.  # noqa: E501
        :rtype: str
        """
        return self._documentation

    @documentation.setter
    def documentation(self, documentation):
        """Sets the documentation of this Model.


        :param documentation: The documentation of this Model.  # noqa: E501
        :type: str
        """

        self._documentation = documentation

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


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

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


        :param id: The id of this Model.  # 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 input_types(self):
        """Gets the input_types of this Model.  # noqa: E501


        :return: The input_types of this Model.  # noqa: E501
        :rtype: list[ModelInputTypes]
        """
        return self._input_types

    @input_types.setter
    def input_types(self, input_types):
        """Sets the input_types of this Model.


        :param input_types: The input_types of this Model.  # noqa: E501
        :type: list[ModelInputTypes]
        """
        if input_types is None:
            raise ValueError("Invalid value for `input_types`, must not be `None`")  # noqa: E501

        self._input_types = input_types

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

        The MD5 sum of the model  # noqa: E501

        :return: The md5sum of this Model.  # noqa: E501
        :rtype: str
        """
        return self._md5sum

    @md5sum.setter
    def md5sum(self, md5sum):
        """Sets the md5sum of this Model.

        The MD5 sum of the model  # noqa: E501

        :param md5sum: The md5sum of this Model.  # noqa: E501
        :type: str
        """

        self._md5sum = md5sum

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

        The Python class name of the model  # noqa: E501

        :return: The model_clazz of this Model.  # noqa: E501
        :rtype: str
        """
        return self._model_clazz

    @model_clazz.setter
    def model_clazz(self, model_clazz):
        """Sets the model_clazz of this Model.

        The Python class name of the model  # noqa: E501

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

        self._model_clazz = model_clazz

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

        The Python module ghosting the code for the model  # noqa: E501

        :return: The model_module of this Model.  # noqa: E501
        :rtype: str
        """
        return self._model_module

    @model_module.setter
    def model_module(self, model_module):
        """Sets the model_module of this Model.

        The Python module ghosting the code for the model  # noqa: E501

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

        self._model_module = model_module

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


        :return: The model_type of this Model.  # noqa: E501
        :rtype: ModelTypes
        """
        return self._model_type

    @model_type.setter
    def model_type(self, model_type):
        """Sets the model_type of this Model.


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

        self._model_type = model_type

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


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

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


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

        self._name = name

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


        :return: The output_format of this Model.  # noqa: E501
        :rtype: object
        """
        return self._output_format

    @output_format.setter
    def output_format(self, output_format):
        """Sets the output_format of this Model.


        :param output_format: The output_format of this Model.  # noqa: E501
        :type: object
        """

        self._output_format = output_format

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


        :return: The short_name of this Model.  # noqa: E501
        :rtype: str
        """
        return self._short_name

    @short_name.setter
    def short_name(self, short_name):
        """Sets the short_name of this Model.


        :param short_name: The short_name of this Model.  # noqa: E501
        :type: str
        """

        self._short_name = short_name

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


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

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


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

        self._size = size

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


        :return: The speed of this Model.  # noqa: E501
        :rtype: Speed
        """
        return self._speed

    @speed.setter
    def speed(self, speed):
        """Sets the speed of this Model.


        :param speed: The speed of this Model.  # noqa: E501
        :type: Speed
        """

        self._speed = speed

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


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

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


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

        self._tags = tags

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

        The TTL of the workers hosting this model  # noqa: E501

        :return: The ttl of this Model.  # noqa: E501
        :rtype: float
        """
        return self._ttl

    @ttl.setter
    def ttl(self, ttl):
        """Sets the ttl of this Model.

        The TTL of the workers hosting this model  # noqa: E501

        :param ttl: The ttl of this Model.  # noqa: E501
        :type: float
        """

        self._ttl = ttl

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

        return self.__dict__ == other.__dict__

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