"""
Type annotations for botocore.configprovider module.

Copyright 2025 Vlad Emelianov
"""

from collections.abc import Mapping, Sequence
from logging import Logger
from typing import Any, Callable, TypeVar

from botocore.session import Session
from botocore.utils import IMDSRegionProvider

BOTOCORE_DEFAUT_SESSION_VARIABLES: dict[str, tuple[Any, ...]]
DEFAULT_S3_CONFIG_VARS: dict[str, tuple[Any, ...]]
DEFAULT_PROXIES_CONFIG_VARS: dict[str, tuple[Any, ...]]

logger: Logger = ...

_R = TypeVar("_R")

def create_botocore_default_config_mapping(session: Any) -> Any: ...

class DefaultConfigResolver:
    def __init__(self, default_config_data: Mapping[str, Any]) -> None: ...
    def get_default_modes(self) -> list[str]: ...
    def get_default_config_values(self, mode: str) -> Any: ...

class ConfigChainFactory:
    def __init__(self, session: Any, environ: Any | None = ...) -> None: ...
    def create_config_chain(
        self,
        instance_name: str | None = ...,
        env_var_names: str | list[str] | None = ...,
        config_property_names: str | Sequence[str] | None = ...,
        default: Any | None = ...,
        conversion_func: Callable[..., Any] | None = ...,
    ) -> ChainProvider: ...

class ConfigValueStore:
    def __init__(self, mapping: Mapping[str, Any] | None = ...) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def __copy__(self: _R) -> _R: ...
    def get_config_variable(self, logical_name: str) -> Any: ...
    def get_config_provider(self, logical_name: str) -> BaseProvider: ...
    def set_config_variable(self, logical_name: str, value: Any) -> None: ...
    def clear_config_variable(self, logical_name: str) -> None: ...
    def set_config_provider(self, logical_name: str, provider: Any) -> None: ...

class SmartDefaultsConfigStoreFactory:
    def __init__(
        self,
        default_config_resolver: DefaultConfigResolver,
        imds_region_provider: IMDSRegionProvider,
    ) -> None: ...
    def merge_smart_defaults(
        self, config_store: ConfigValueStore, mode: str, region_name: str
    ) -> None: ...
    def resolve_auto_mode(self, region_name: str) -> str: ...

class BaseProvider:
    def provide(self) -> Any: ...

class ChainProvider(BaseProvider):
    def __init__(
        self,
        providers: Sequence[BaseProvider] | None = ...,
        conversion_func: Callable[..., Any] | None = ...,
    ) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def provide(self) -> Any: ...
    def set_default_provider(self, default_provider: BaseProvider) -> None: ...

class InstanceVarProvider(BaseProvider):
    def __init__(self, instance_var: str, session: Session) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def provide(self) -> Any: ...

class ScopedConfigProvider(BaseProvider):
    def __init__(self, config_var_name: str, session: Session) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def provide(self) -> Any: ...

class EnvironmentProvider(BaseProvider):
    def __init__(self, name: str, env: Mapping[str, str]) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def provide(self) -> Any: ...

class SectionConfigProvider(BaseProvider):
    def __init__(
        self,
        section_name: str,
        session: Session,
        override_providers: dict[str, BaseProvider] | None = ...,
    ) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def provide(self) -> Any: ...
    def set_default_provider(self, key: str, default_provider: BaseProvider) -> None: ...

class ConstantProvider(BaseProvider):
    def __init__(self, value: Any) -> None: ...
    def __deepcopy__(self: _R, memo: dict[str, Any]) -> _R: ...
    def provide(self) -> Any: ...

class ConfiguredEndpointProvider(BaseProvider):
    def __init__(
        self,
        full_config: Mapping[str, Any],
        scoped_config: Mapping[str, Any],
        client_name: str,
        environ: Mapping[str, str] | None = ...,
    ) -> None: ...
    def provide(self) -> Any: ...
