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

from ...core.unchecked_base_model import UncheckedBaseModel
import pydantic
from .aws_provider_credential import AwsProviderCredential
from .aws_region import AwsRegion
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import typing


class SinkAwsS3(UncheckedBaseModel):
    """
    Configuration for Amazon S3 as a Sink provider. Events are written directly to an AWS S3 bucket in compressed JSON format.
    """

    bucket: str = pydantic.Field()
    """
    Name of the Amazon S3 bucket
    """

    credential: AwsProviderCredential = pydantic.Field()
    """
    AWS credentials with write access to the configured S3 bucket.
    """

    path: str = pydantic.Field()
    """
    Files will be written under this path.
    """

    region: AwsRegion = pydantic.Field()
    """
    AWS Region where the S3 bucket is located.
    """

    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
