#
# Copyright 2021 DataRobot, Inc. and its affiliates.
#
# All rights reserved.
#
# DataRobot, Inc.
#
# This is proprietary source code of DataRobot, Inc. and its
# affiliates.
#
# Released under the terms of DataRobot Tool and Utility Agreement.
"""
Autogenerated DataRobot python client file.  Please don't modify.
"""

import trafaret as t
from datarobot.models.api_object import APIObject

class ActualFrequency(APIObject):
    """
    Attributes
    ----------
    other_class_name:str
         The name of the class.
    percentage:float
         The percentage of the times this class was predicted when is was actually `classMetrics.className` (from 0 to 100).
    value:int
         The count of the times this class was predicted when is was actually `classMetrics.className`.
    """
    _converter = t.Dict(
        {
            t.Key("other_class_name"):  t.String(),
            t.Key("percentage"):  t.Float(),
            t.Key("value"):  t.Int(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        other_class_name,
        percentage,
        value,
    ):
        self.other_class_name = other_class_name
        self.percentage = percentage
        self.value = value

    def __repr__(self):
        return (
            "ActualFrequency("
            "other_class_name={0.other_class_name}, "
            "percentage={0.percentage}, "
            "value={0.value}, "
        ).format(self)
