"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
import requests as requests_http
from ...models.components import experimentresultresponse as components_experimentresultresponse
from enum import Enum
from typing import Optional


class AggregateFunction(str, Enum):
    AVERAGE = 'average'
    MIN = 'min'
    MAX = 'max'
    MEDIAN = 'median'
    P95 = 'p95'
    P99 = 'p99'
    P90 = 'p90'
    SUM = 'sum'
    COUNT = 'count'


@dataclasses.dataclass
class GetExperimentResultRequest:
    run_id: str = dataclasses.field(metadata={'path_param': { 'field_name': 'run_id', 'style': 'simple', 'explode': False }})
    project_id: str = dataclasses.field(metadata={'query_param': { 'field_name': 'project_id', 'style': 'form', 'explode': True }})
    aggregate_function: Optional[AggregateFunction] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'aggregate_function', 'style': 'form', 'explode': True }})
    



@dataclasses.dataclass
class GetExperimentResultResponse:
    content_type: str = dataclasses.field()
    r"""HTTP response content type for this operation"""
    status_code: int = dataclasses.field()
    r"""HTTP response status code for this operation"""
    raw_response: requests_http.Response = dataclasses.field()
    r"""Raw HTTP response; suitable for custom response parsing"""
    experiment_result_response: Optional[components_experimentresultresponse.ExperimentResultResponse] = dataclasses.field(default=None)
    r"""Experiment result retrieved successfully"""
    

