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

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

__all__ = ['DescribeClusterRequest', 'DescribeClusterResponse', 'DescribeLogDirsRequest', 'DescribeLogDirsResponse', 'AlterReplicaLogDirsRequest', 'AlterReplicaLogDirsResponse', 'DescribeQuorumRequest', 'DescribeQuorumResponse', 'UpdateFeaturesRequest', 'UpdateFeaturesResponse']

class DescribeClusterRequest(ApiMessage):
    include_cluster_authorized_operations: bool
    endpoint_type: int
    include_fenced_brokers: bool
    def __init__(
        self,
        *args: Any,
        include_cluster_authorized_operations: bool = ...,
        endpoint_type: int = ...,
        include_fenced_brokers: bool = ...,
        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 DescribeClusterResponse(ApiMessage):
    class DescribeClusterBroker(DataContainer):
        broker_id: int
        host: str
        port: int
        rack: str | None
        is_fenced: bool
        def __init__(
            self,
            *args: Any,
            broker_id: int = ...,
            host: str = ...,
            port: int = ...,
            rack: str | None = ...,
            is_fenced: bool = ...,
            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
    endpoint_type: int
    cluster_id: str
    controller_id: int
    brokers: list[DescribeClusterBroker]
    authorized_operations: set[int]
    def __init__(
        self,
        *args: Any,
        throttle_time_ms: int = ...,
        error_code: int = ...,
        error_message: str | None = ...,
        endpoint_type: int = ...,
        cluster_id: str = ...,
        controller_id: int = ...,
        brokers: list[DescribeClusterBroker] = ...,
        authorized_operations: set[int] = ...,
        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 DescribeLogDirsRequest(ApiMessage):
    class DescribableLogDirTopic(DataContainer):
        topic: str
        partitions: list[int]
        def __init__(
            self,
            *args: Any,
            topic: str = ...,
            partitions: list[int] = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    topics: list[DescribableLogDirTopic] | None
    def __init__(
        self,
        *args: Any,
        topics: list[DescribableLogDirTopic] | 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: ...
    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 DescribeLogDirsResponse(ApiMessage):
    class DescribeLogDirsResult(DataContainer):
        class DescribeLogDirsTopic(DataContainer):
            class DescribeLogDirsPartition(DataContainer):
                partition_index: int
                partition_size: int
                offset_lag: int
                is_future_key: bool
                def __init__(
                    self,
                    *args: Any,
                    partition_index: int = ...,
                    partition_size: int = ...,
                    offset_lag: int = ...,
                    is_future_key: bool = ...,
                    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
            partitions: list[DescribeLogDirsPartition]
            def __init__(
                self,
                *args: Any,
                name: str = ...,
                partitions: list[DescribeLogDirsPartition] = ...,
                version: int | None = None,
                **kwargs: Any,
            ) -> None: ...
            @property
            def version(self) -> int | None: ...
            def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

        error_code: int
        log_dir: str
        topics: list[DescribeLogDirsTopic]
        total_bytes: int
        usable_bytes: int
        is_cordoned: bool
        def __init__(
            self,
            *args: Any,
            error_code: int = ...,
            log_dir: str = ...,
            topics: list[DescribeLogDirsTopic] = ...,
            total_bytes: int = ...,
            usable_bytes: int = ...,
            is_cordoned: bool = ...,
            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
    results: list[DescribeLogDirsResult]
    def __init__(
        self,
        *args: Any,
        throttle_time_ms: int = ...,
        error_code: int = ...,
        results: list[DescribeLogDirsResult] = ...,
        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 AlterReplicaLogDirsRequest(ApiMessage):
    class AlterReplicaLogDir(DataContainer):
        class AlterReplicaLogDirTopic(DataContainer):
            name: str
            partitions: list[int]
            def __init__(
                self,
                *args: Any,
                name: str = ...,
                partitions: list[int] = ...,
                version: int | None = None,
                **kwargs: Any,
            ) -> None: ...
            @property
            def version(self) -> int | None: ...
            def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

        path: str
        topics: list[AlterReplicaLogDirTopic]
        def __init__(
            self,
            *args: Any,
            path: str = ...,
            topics: list[AlterReplicaLogDirTopic] = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    dirs: list[AlterReplicaLogDir]
    def __init__(
        self,
        *args: Any,
        dirs: list[AlterReplicaLogDir] = ...,
        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 AlterReplicaLogDirsResponse(ApiMessage):
    class AlterReplicaLogDirTopicResult(DataContainer):
        class AlterReplicaLogDirPartitionResult(DataContainer):
            partition_index: int
            error_code: int
            def __init__(
                self,
                *args: Any,
                partition_index: int = ...,
                error_code: int = ...,
                version: int | None = None,
                **kwargs: Any,
            ) -> None: ...
            @property
            def version(self) -> int | None: ...
            def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

        topic_name: str
        partitions: list[AlterReplicaLogDirPartitionResult]
        def __init__(
            self,
            *args: Any,
            topic_name: str = ...,
            partitions: list[AlterReplicaLogDirPartitionResult] = ...,
            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
    results: list[AlterReplicaLogDirTopicResult]
    def __init__(
        self,
        *args: Any,
        throttle_time_ms: int = ...,
        results: list[AlterReplicaLogDirTopicResult] = ...,
        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 DescribeQuorumRequest(ApiMessage):
    class TopicData(DataContainer):
        class PartitionData(DataContainer):
            partition_index: int
            def __init__(
                self,
                *args: Any,
                partition_index: int = ...,
                version: int | None = None,
                **kwargs: Any,
            ) -> None: ...
            @property
            def version(self) -> int | None: ...
            def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

        topic_name: str
        partitions: list[PartitionData]
        def __init__(
            self,
            *args: Any,
            topic_name: str = ...,
            partitions: list[PartitionData] = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    topics: list[TopicData]
    def __init__(
        self,
        *args: Any,
        topics: list[TopicData] = ...,
        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 DescribeQuorumResponse(ApiMessage):
    class TopicData(DataContainer):
        class PartitionData(DataContainer):
            class ReplicaState(DataContainer):
                replica_id: int
                replica_directory_id: uuid.UUID
                log_end_offset: int
                last_fetch_timestamp: int
                last_caught_up_timestamp: int
                def __init__(
                    self,
                    *args: Any,
                    replica_id: int = ...,
                    replica_directory_id: uuid.UUID = ...,
                    log_end_offset: int = ...,
                    last_fetch_timestamp: int = ...,
                    last_caught_up_timestamp: int = ...,
                    version: int | None = None,
                    **kwargs: Any,
                ) -> None: ...
                @property
                def version(self) -> int | None: ...
                def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

            partition_index: int
            error_code: int
            error_message: str | None
            leader_id: int
            leader_epoch: int
            high_watermark: int
            current_voters: list[ReplicaState]
            observers: list[ReplicaState]
            def __init__(
                self,
                *args: Any,
                partition_index: int = ...,
                error_code: int = ...,
                error_message: str | None = ...,
                leader_id: int = ...,
                leader_epoch: int = ...,
                high_watermark: int = ...,
                current_voters: list[ReplicaState] = ...,
                observers: list[ReplicaState] = ...,
                version: int | None = None,
                **kwargs: Any,
            ) -> None: ...
            @property
            def version(self) -> int | None: ...
            def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

        topic_name: str
        partitions: list[PartitionData]
        def __init__(
            self,
            *args: Any,
            topic_name: str = ...,
            partitions: list[PartitionData] = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    class Node(DataContainer):
        class Listener(DataContainer):
            name: str
            host: str
            port: int
            def __init__(
                self,
                *args: Any,
                name: str = ...,
                host: str = ...,
                port: int = ...,
                version: int | None = None,
                **kwargs: Any,
            ) -> None: ...
            @property
            def version(self) -> int | None: ...
            def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

        node_id: int
        listeners: list[Listener]
        def __init__(
            self,
            *args: Any,
            node_id: int = ...,
            listeners: list[Listener] = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    error_code: int
    error_message: str | None
    topics: list[TopicData]
    nodes: list[Node]
    def __init__(
        self,
        *args: Any,
        error_code: int = ...,
        error_message: str | None = ...,
        topics: list[TopicData] = ...,
        nodes: list[Node] = ...,
        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 UpdateFeaturesRequest(ApiMessage):
    class FeatureUpdateKey(DataContainer):
        feature: str
        max_version_level: int
        allow_downgrade: bool
        upgrade_type: int
        def __init__(
            self,
            *args: Any,
            feature: str = ...,
            max_version_level: int = ...,
            allow_downgrade: bool = ...,
            upgrade_type: int = ...,
            version: int | None = None,
            **kwargs: Any,
        ) -> None: ...
        @property
        def version(self) -> int | None: ...
        def to_dict(self, meta: bool = False, json: bool = True) -> dict: ...

    timeout_ms: int
    feature_updates: list[FeatureUpdateKey]
    validate_only: bool
    def __init__(
        self,
        *args: Any,
        timeout_ms: int = ...,
        feature_updates: list[FeatureUpdateKey] = ...,
        validate_only: bool = ...,
        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 UpdateFeaturesResponse(ApiMessage):
    class UpdatableFeatureResult(DataContainer):
        feature: str
        error_code: int
        error_message: str | None
        def __init__(
            self,
            *args: Any,
            feature: str = ...,
            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
    results: list[UpdatableFeatureResult]
    def __init__(
        self,
        *args: Any,
        throttle_time_ms: int = ...,
        error_code: int = ...,
        error_message: str | None = ...,
        results: list[UpdatableFeatureResult] = ...,
        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: ...
