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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class CanaryStep(UniversalBaseModel):
    weight_percentage: int = pydantic.Field()
    """
    Percentage of total traffic to be shifted to the canary release.
    The rest will continue to go to the existing deployment
    """

    pause_duration: typing.Optional[int] = pydantic.Field(default=None)
    """
    Duration for which to pause the release. The release process will wait for these seconds before proceeding to the next step.
    If this is not set, the step will pause indefinitely on this step
    """

    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
