# coding: utf-8

"""
    

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

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


from pprint import pformat

from six import iteritems


class ModelMetrics(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 = {
        'pk': 'ModelMetricsPK',
        'metrics': 'dict(str, object)',
        'other_metrics_as_json': 'str',
        'hyper_params_as_json': 'str'
    }

    attribute_map = {
        'pk': 'pk',
        'metrics': 'metrics',
        'other_metrics_as_json': 'otherMetricsAsJson',
        'hyper_params_as_json': 'hyperParamsAsJson'
    }

    def __init__(self, pk=None, metrics=None, other_metrics_as_json=None, hyper_params_as_json=None):
        """
        ModelMetrics - a model defined in Swagger
        """

        self._pk = None
        self._metrics = None
        self._other_metrics_as_json = None
        self._hyper_params_as_json = None

        self.pk = pk
        self.metrics = metrics
        if other_metrics_as_json is not None:
          self.other_metrics_as_json = other_metrics_as_json
        if hyper_params_as_json is not None:
          self.hyper_params_as_json = hyper_params_as_json

    @property
    def pk(self):
        """
        Gets the pk of this ModelMetrics.

        :return: The pk of this ModelMetrics.
        :rtype: ModelMetricsPK
        """
        return self._pk

    @pk.setter
    def pk(self, pk):
        """
        Sets the pk of this ModelMetrics.

        :param pk: The pk of this ModelMetrics.
        :type: ModelMetricsPK
        """
        if pk is None:
            raise ValueError("Invalid value for `pk`, must not be `None`")

        self._pk = pk

    @property
    def metrics(self):
        """
        Gets the metrics of this ModelMetrics.
        Metrics of the trained model as a map between metric names and their value as double

        :return: The metrics of this ModelMetrics.
        :rtype: dict(str, object)
        """
        return self._metrics

    @metrics.setter
    def metrics(self, metrics):
        """
        Sets the metrics of this ModelMetrics.
        Metrics of the trained model as a map between metric names and their value as double

        :param metrics: The metrics of this ModelMetrics.
        :type: dict(str, object)
        """
        if metrics is None:
            raise ValueError("Invalid value for `metrics`, must not be `None`")

        self._metrics = metrics

    @property
    def other_metrics_as_json(self):
        """
        Gets the other_metrics_as_json of this ModelMetrics.
        If relevant, extra non double metrics can be added as a valid JSON string

        :return: The other_metrics_as_json of this ModelMetrics.
        :rtype: str
        """
        return self._other_metrics_as_json

    @other_metrics_as_json.setter
    def other_metrics_as_json(self, other_metrics_as_json):
        """
        Sets the other_metrics_as_json of this ModelMetrics.
        If relevant, extra non double metrics can be added as a valid JSON string

        :param other_metrics_as_json: The other_metrics_as_json of this ModelMetrics.
        :type: str
        """

        self._other_metrics_as_json = other_metrics_as_json

    @property
    def hyper_params_as_json(self):
        """
        Gets the hyper_params_as_json of this ModelMetrics.

        :return: The hyper_params_as_json of this ModelMetrics.
        :rtype: str
        """
        return self._hyper_params_as_json

    @hyper_params_as_json.setter
    def hyper_params_as_json(self, hyper_params_as_json):
        """
        Sets the hyper_params_as_json of this ModelMetrics.

        :param hyper_params_as_json: The hyper_params_as_json of this ModelMetrics.
        :type: str
        """

        self._hyper_params_as_json = hyper_params_as_json

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in 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 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, ModelMetrics):
            return False

        return self.__dict__ == other.__dict__

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