# generated by datamodel-codegen:
#   filename:  core/requirements/audio_asset_requirements.json
#   timestamp: 2026-02-23T01:56:40+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field, RootModel


class Channel(Enum):
    mono = 'mono'
    stereo = 'stereo'


class Format(Enum):
    mp3 = 'mp3'
    aac = 'aac'
    wav = 'wav'
    ogg = 'ogg'
    flac = 'flac'


class SampleRate(RootModel[int]):
    root: Annotated[int, Field(ge=1)]


class AudioAssetRequirements(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    channels: Annotated[
        list[Channel] | None, Field(description='Accepted audio channel configurations')
    ] = None
    formats: Annotated[list[Format] | None, Field(description='Accepted audio file formats')] = None
    max_bitrate_kbps: Annotated[
        int | None, Field(description='Maximum audio bitrate in kilobits per second', ge=1)
    ] = None
    max_duration_ms: Annotated[
        int | None, Field(description='Maximum duration in milliseconds', ge=1)
    ] = None
    max_file_size_kb: Annotated[
        int | None, Field(description='Maximum file size in kilobytes', ge=1)
    ] = None
    min_bitrate_kbps: Annotated[
        int | None, Field(description='Minimum audio bitrate in kilobits per second', ge=1)
    ] = None
    min_duration_ms: Annotated[
        int | None, Field(description='Minimum duration in milliseconds', ge=1)
    ] = None
    sample_rates: Annotated[
        list[SampleRate] | None,
        Field(description='Accepted sample rates in Hz (e.g., [44100, 48000])'),
    ] = None
