from _typeshed import Incomplete

from kafka.record.abc import ABCRecords

class MemoryRecords(ABCRecords):
    LENGTH_OFFSET: Incomplete
    LOG_OVERHEAD: Incomplete
    MAGIC_OFFSET: Incomplete
    MIN_SLICE: Incomplete
    def __init__(self, bytes_data) -> None: ...
    def size_in_bytes(self): ...
    def valid_bytes(self): ...
    def has_next(self): ...
    def next_batch(self, _min_slice=26, _magic_offset=16): ...
    def __iter__(self): ...
    def __next__(self): ...
    next = __next__

class MemoryRecordsBuilder:
    def __init__(
        self,
        magic,
        compression_type,
        batch_size,
        offset: int = 0,
        transactional: bool = False,
        producer_id: int = -1,
        producer_epoch: int = -1,
        base_sequence: int = -1,
    ) -> None: ...
    def skip(self, offsets_to_skip) -> None: ...
    def append(self, timestamp, key, value, headers=[]): ...
    def set_producer_state(self, producer_id, producer_epoch, base_sequence, is_transactional) -> None: ...
    @property
    def producer_id(self): ...
    @property
    def producer_epoch(self): ...
    def records(self): ...
    def close(self) -> None: ...
    def size_in_bytes(self): ...
    def compression_rate(self): ...
    def is_full(self): ...
    def next_offset(self): ...
    def buffer(self): ...
