# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from kps_api.models.ml_model_version import MLModelVersion  # noqa: F401,E501


class MLModel(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 = {
        'description': 'str',
        'framework_type': 'str',
        'id': 'str',
        'model_versions': 'list[MLModelVersion]',
        'name': 'str',
        'project_id': 'str'
    }

    attribute_map = {
        'description': 'description',
        'framework_type': 'frameworkType',
        'id': 'id',
        'model_versions': 'modelVersions',
        'name': 'name',
        'project_id': 'projectId'
    }

    def __init__(self, description=None, framework_type=None, id=None, model_versions=None, name=None, project_id=None):  # noqa: E501
        """MLModel - a model defined in Swagger"""  # noqa: E501
        self._description = None
        self._framework_type = None
        self._id = None
        self._model_versions = None
        self._name = None
        self._project_id = None
        self.discriminator = None
        self.description = description
        self.framework_type = framework_type
        if id is not None:
            self.id = id
        if model_versions is not None:
            self.model_versions = model_versions
        self.name = name
        self.project_id = project_id

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

        Describe the machine learning model.  Maximum length is 200 characters.  # noqa: E501

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

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

        Describe the machine learning model.  Maximum length is 200 characters.  # noqa: E501

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

        self._description = description

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

        Machine learning model framework type.  # noqa: E501

        :return: The framework_type of this MLModel.  # noqa: E501
        :rtype: str
        """
        return self._framework_type

    @framework_type.setter
    def framework_type(self, framework_type):
        """Sets the framework_type of this MLModel.

        Machine learning model framework type.  # noqa: E501

        :param framework_type: The framework_type of this MLModel.  # noqa: E501
        :type: str
        """
        if framework_type is None:
            raise ValueError("Invalid value for `framework_type`, must not be `None`")  # noqa: E501
        allowed_values = ["TensorFlow 1.13.1", "OpenVINO 2019_R2", "TensorFlow 2.1.0"]  # noqa: E501
        if framework_type not in allowed_values:
            raise ValueError(
                "Invalid value for `framework_type` ({0}), must be one of {1}"  # noqa: E501
                .format(framework_type, allowed_values)
            )

        self._framework_type = framework_type

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

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

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

        ID of the entity Maximum character length is 64 for project, category, and runtime environment, 36 for other entity types.  # noqa: E501

        :param id: The id of this MLModel.  # noqa: E501
        :type: str
        """

        self._id = id

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

        Machine learning model versions.  # noqa: E501

        :return: The model_versions of this MLModel.  # noqa: E501
        :rtype: list[MLModelVersion]
        """
        return self._model_versions

    @model_versions.setter
    def model_versions(self, model_versions):
        """Sets the model_versions of this MLModel.

        Machine learning model versions.  # noqa: E501

        :param model_versions: The model_versions of this MLModel.  # noqa: E501
        :type: list[MLModelVersion]
        """

        self._model_versions = model_versions

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

        Name for the machine learning model. Maximum length is 200 characters.  # noqa: E501

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

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

        Name for the machine learning model. Maximum length is 200 characters.  # noqa: E501

        :param name: The name of this MLModel.  # 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 project_id(self):
        """Gets the project_id of this MLModel.  # noqa: E501

        Parent project ID associated with this machine learning model.  # noqa: E501

        :return: The project_id of this MLModel.  # noqa: E501
        :rtype: str
        """
        return self._project_id

    @project_id.setter
    def project_id(self, project_id):
        """Sets the project_id of this MLModel.

        Parent project ID associated with this machine learning model.  # noqa: E501

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

        self._project_id = project_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
        if issubclass(MLModel, 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, MLModel):
            return False

        return self.__dict__ == other.__dict__

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