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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
from ...core.unchecked_base_model import UncheckedBaseModel


class StartAgentsRequestPropertiesRtc(UncheckedBaseModel):
    """
    RTC media encryption configuration.
    """

    encryption_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    The encryption key for RTC media content. The key has no length limit. Agora recommends using a 32-byte key. If no encryption key is set or if the key is empty, built-in encryption is not used.
    """

    encryption_salt: typing.Optional[str] = pydantic.Field(default=None)
    """
    The salt value used for encryption. This is a Base64-encoded string that is 32 bytes long after decoding. This parameter only takes effect when `encryption_mode` is set to `7` (AES_128_GCM2) or `8` (AES_256_GCM2). Ensure that the salt parameter is not empty for these encryption modes.
    """

    encryption_mode: typing.Optional[int] = pydantic.Field(default=None)
    """
    The built-in encryption mode.
    - `1`: AES_128_XTS - 128-bit AES encryption, XTS mode.
    - `2`: AES_128_ECB - 128-bit AES encryption, ECB mode.
    - `3`: AES_256_XTS - 256-bit AES encryption, XTS mode.
    - `4`: SM4_128_ECB - 128-bit SM4 encryption, ECB mode.
    - `5`: AES_128_GCM - 128-bit AES encryption, GCM mode.
    - `6`: AES_256_GCM - 256-bit AES encryption, GCM mode.
    - `7`: AES_128_GCM2 - 128-bit AES encryption, GCM mode. Requires setting `encryption_salt`.
    - `8`: AES_256_GCM2 - 256-bit AES encryption, GCM mode. Requires setting `encryption_salt`.
    """

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

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