from typing import Any, List

def tag(key, value): ...

class WebsiteConfiguration:
    suffix: Any
    error_key: Any
    redirect_all_requests_to: Any
    routing_rules: Any
    def __init__(
        self,
        suffix: Any | None = ...,
        error_key: Any | None = ...,
        redirect_all_requests_to: Any | None = ...,
        routing_rules: Any | 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: Any | 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: Any | None = ..., protocol: Any | 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: Any | None = ..., redirect: Any | None = ...) -> None: ...
    def startElement(self, name, attrs, connection): ...
    def endElement(self, name, value, connection): ...
    def to_xml(self): ...
    @classmethod
    def when(cls, key_prefix: Any | None = ..., http_error_code: Any | None = ...): ...
    def then_redirect(
        self,
        hostname: Any | None = ...,
        protocol: Any | None = ...,
        replace_key: Any | None = ...,
        replace_key_prefix: Any | None = ...,
        http_redirect_code: Any | None = ...,
    ): ...

class Condition(_XMLKeyValue):
    TRANSLATOR: Any
    key_prefix: Any
    http_error_code: Any
    def __init__(self, key_prefix: Any | None = ..., http_error_code: Any | 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: Any | None = ...,
        protocol: Any | None = ...,
        replace_key: Any | None = ...,
        replace_key_prefix: Any | None = ...,
        http_redirect_code: Any | None = ...,
    ) -> None: ...
    def to_xml(self): ...
