# Generated by generate_stubs.py (Python 3.14)
import uuid
from typing import Any, Self

from enum import IntEnum
from kafka.protocol.api_message import ApiMessage
from kafka.protocol.data_container import DataContainer

__all__ = ['CoordinatorType', 'FindCoordinatorRequest', 'FindCoordinatorResponse']

class CoordinatorType(EnumHelper, IntEnum):
    GROUP: int
    TRANSACTION: int
    SHARE: int

class FindCoordinatorRequest(ApiMessage):
    key: str
    key_type: int
    coordinator_keys: list[str]
    def __init__(
        self,
        *args: Any,
        key: str = ...,
        key_type: int = ...,
        coordinator_keys: list[str] = ...,
        version: int | None = None,
        **kwargs: Any,
    ) -> None: ...
    @property
    def version(self) -> int | None: ...
    def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...
    name: str
    type: str
    API_KEY: int
    API_VERSION: int
    valid_versions: tuple[int, int]
    min_version: int
    max_version: int
    @property
    def header(self) -> Any: ...
    @classmethod
    def is_request(cls) -> bool: ...
    def expect_response(self) -> bool: ...
    def with_header(self, correlation_id: int = 0, client_id: str = "kafka-python") -> None: ...

class FindCoordinatorResponse(ApiMessage):
    class Coordinator(DataContainer):
        key: str
        node_id: int
        host: str
        port: int
        error_code: int
        error_message: str | None
        def __init__(
            self,
            *args: Any,
            key: str = ...,
            node_id: int = ...,
            host: str = ...,
            port: int = ...,
            error_code: int = ...,
            error_message: str | None = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    throttle_time_ms: int
    error_code: int
    error_message: str | None
    node_id: int
    host: str
    port: int
    coordinators: list[Coordinator]
    def __init__(
        self,
        *args: Any,
        throttle_time_ms: int = ...,
        error_code: int = ...,
        error_message: str | None = ...,
        node_id: int = ...,
        host: str = ...,
        port: int = ...,
        coordinators: list[Coordinator] = ...,
        version: int | None = None,
        **kwargs: Any,
    ) -> None: ...
    @property
    def version(self) -> int | None: ...
    def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...
    name: str
    type: str
    API_KEY: int
    API_VERSION: int
    valid_versions: tuple[int, int]
    min_version: int
    max_version: int
    @property
    def header(self) -> Any: ...
    @classmethod
    def is_request(cls) -> bool: ...
    def expect_response(self) -> bool: ...
    def with_header(self, correlation_id: int = 0, client_id: str = "kafka-python") -> None: ...
