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

from __future__ import annotations
from que_media.types import BaseModel
from typing import Optional
from typing_extensions import NotRequired, TypedDict


class LimitsDtoTypedDict(TypedDict):
    r"""Optional limits for processing operations to prevent resource exhaustion. These limits apply to the streaming and processing phases of asset handling."""

    max_asset_size_bytes: NotRequired[int]
    r"""Maximum allowed size for the asset file in bytes. This limit is enforced during the streaming download phase to prevent memory exhaustion."""
    max_output_size_bytes: NotRequired[int]
    r"""Maximum allowed size for the output (signed asset) in bytes. This prevents excessive storage usage for signed assets."""
    max_stream_copy_bytes: NotRequired[int]
    r"""Maximum allowed bytes for stream copying operations during processing. This limits the amount of data that can be buffered in memory during the signing/verification process."""
    stream_timeout_ms: NotRequired[int]
    r"""Timeout for streaming operations in milliseconds. This prevents hanging operations when downloading from slow sources."""


class LimitsDto(BaseModel):
    r"""Optional limits for processing operations to prevent resource exhaustion. These limits apply to the streaming and processing phases of asset handling."""

    max_asset_size_bytes: Optional[int] = None
    r"""Maximum allowed size for the asset file in bytes. This limit is enforced during the streaming download phase to prevent memory exhaustion."""

    max_output_size_bytes: Optional[int] = None
    r"""Maximum allowed size for the output (signed asset) in bytes. This prevents excessive storage usage for signed assets."""

    max_stream_copy_bytes: Optional[int] = None
    r"""Maximum allowed bytes for stream copying operations during processing. This limits the amount of data that can be buffered in memory during the signing/verification process."""

    stream_timeout_ms: Optional[int] = None
    r"""Timeout for streaming operations in milliseconds. This prevents hanging operations when downloading from slow sources."""
