#
# 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 PredictedPercentages(APIObject):
    """
    Attributes
    ----------
    other_class_name:str
         the name of the class
    percentage:float
         the percentage of the times this class was actual when `classMetrics.className` is predicted
    """
    _converter = t.Dict(
        {
            t.Key("other_class_name"):  t.String(),
            t.Key("percentage"):  t.Float(),
        }
    ).ignore_extra("*")

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

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