#
# 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
from datarobot.models.full_api.generated.model.service_stats_metrics import ServiceStatsMetrics
from datarobot.models.full_api.generated.model.time_range import TimeRange

class ServiceStatsRetrieveResponse(APIObject):
    """
    Attributes
    ----------
    metrics:ServiceStatsMetrics
        
    period:TimeRange
        
    model_id:str [optional]
         The id of the model for which metrics are being retrieved.. 
    segment_attribute:str, none_type [optional]
         The name of the segment on which segment analysis is being performed.. 
    segment_value:str, none_type [optional]
         The value of the `segmentAttribute` to segment on..  if omitted the server will use the default value of ""
    """
    _converter = t.Dict(
        {
            t.Key("metrics"):  t.Any(),
            t.Key("period"):  t.Any(),
            t.Key("model_id", optional=True):  t.String(),
            t.Key("segment_attribute", optional=True):  t.String(),
            t.Key("segment_value", optional=True):  t.String(),
        }
    ).ignore_extra("*")

    def __init__(
        self,
        metrics,
        period,
        model_id=None,
        segment_attribute=None,
        segment_value=None,
    ):
        self.metrics = metrics
        self.period = period
        self.model_id = model_id
        self.segment_attribute = segment_attribute
        self.segment_value = segment_value

    def __repr__(self):
        return (
            "ServiceStatsRetrieveResponse("
            "metrics={0.metrics}, "
            "period={0.period}, "
            "model_id={0.model_id}, "
            "segment_attribute={0.segment_attribute}, "
            "segment_value={0.segment_value}, "
        ).format(self)
