from _typeshed import Incomplete
from typing import Any

def tag(key, value): ...

class WebsiteConfiguration:
    suffix: Any
    error_key: Any
    redirect_all_requests_to: Any
    routing_rules: Any
    def __init__(
        self,
        suffix: Incomplete | None = ...,
        error_key: Incomplete | None = ...,
        redirect_all_requests_to: Incomplete | None = ...,
        routing_rules: Incomplete | None = ...,
    ) -> None: ...
    def startElement(self, name, attrs, connection): ...
    def endElement(self, name, value, connection): ...
    def to_xml(self): ...

class _XMLKeyValue:
    translator: Any
    container: Any
    def __init__(self, translator, container: Incomplete | None = ...) -> None: ...
    def startElement(self, name, attrs, connection): ...
    def endElement(self, name, value, connection): ...
    def to_xml(self): ...

class RedirectLocation(_XMLKeyValue):
    TRANSLATOR: Any
    hostname: Any
    protocol: Any
    def __init__(self, hostname: Incomplete | None = ..., protocol: Incomplete | None = ...) -> None: ...
    def to_xml(self): ...

class RoutingRules(list[RoutingRule]):
    def add_rule(self, rule: RoutingRule) -> RoutingRules: ...
    def startElement(self, name, attrs, connection): ...
    def endElement(self, name, value, connection): ...
    def to_xml(self): ...

class RoutingRule:
    condition: Any
    redirect: Any
    def __init__(self, condition: Incomplete | None = ..., redirect: Incomplete | None = ...) -> None: ...
    def startElement(self, name, attrs, connection): ...
    def endElement(self, name, value, connection): ...
    def to_xml(self): ...
    @classmethod
    def when(cls, key_prefix: Incomplete | None = ..., http_error_code: Incomplete | None = ...): ...
    def then_redirect(
        self,
        hostname: Incomplete | None = ...,
        protocol: Incomplete | None = ...,
        replace_key: Incomplete | None = ...,
        replace_key_prefix: Incomplete | None = ...,
        http_redirect_code: Incomplete | None = ...,
    ): ...

class Condition(_XMLKeyValue):
    TRANSLATOR: Any
    key_prefix: Any
    http_error_code: Any
    def __init__(self, key_prefix: Incomplete | None = ..., http_error_code: Incomplete | None = ...) -> None: ...
    def to_xml(self): ...

class Redirect(_XMLKeyValue):
    TRANSLATOR: Any
    hostname: Any
    protocol: Any
    replace_key: Any
    replace_key_prefix: Any
    http_redirect_code: Any
    def __init__(
        self,
        hostname: Incomplete | None = ...,
        protocol: Incomplete | None = ...,
        replace_key: Incomplete | None = ...,
        replace_key_prefix: Incomplete | None = ...,
        http_redirect_code: Incomplete | None = ...,
    ) -> None: ...
    def to_xml(self): ...
