# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from .async_service_autoscaling_metrics import AsyncServiceAutoscalingMetrics
from .base_autoscaling import BaseAutoscaling


class AsyncServiceAutoscaling(BaseAutoscaling):
    metrics: AsyncServiceAutoscalingMetrics = pydantic.Field()
    """
    +label=Autoscaling metrics
    +usage=Metrics to use for the autoscaler
    +sort=4
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
