#
# 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 ModelResidualsHistogram(APIObject):
    """
    Attributes
    ----------
    interval_end:float
         The interval end. For all but the last interval, the end value is exclusive
    interval_start:float
         The interval start
    occurrences:int
         The number of times the predicted value fits within the interval
    """
    _converter = t.Dict(
        {
            t.Key("interval_end"):  t.Float(),
            t.Key("interval_start"):  t.Float(),
            t.Key("occurrences"):  t.Int(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        interval_end,
        interval_start,
        occurrences,
    ):
        self.interval_end = interval_end
        self.interval_start = interval_start
        self.occurrences = occurrences

    def __repr__(self):
        return (
            "ModelResidualsHistogram("
            "interval_end={0.interval_end}, "
            "interval_start={0.interval_start}, "
            "occurrences={0.occurrences}, "
        ).format(self)
