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

import typing

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


class AwsBedrockThinkProviderCredentials(UniversalBaseModel):
    """
    AWS credentials type (STS short-lived or IAM long-lived)
    """

    type: typing.Optional[AwsBedrockThinkProviderCredentialsType] = pydantic.Field(default=None)
    """
    AWS credentials type (STS short-lived or IAM long-lived)
    """

    region: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS region
    """

    access_key_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS access key
    """

    secret_access_key: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS secret access key
    """

    session_token: typing.Optional[str] = pydantic.Field(default=None)
    """
    AWS session token (required for STS only)
    """

    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
