
    Ii+                        S SK Jr  S SKrS SKJrJr  S SKJrJrJ	r	J
r
JrJrJrJr  \R                  " SSS/5      r " S S	\5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      r " S" S#\5      r " S$ S%\5      r " S& S'\5      r  " S( S)\5      r! " S* S+\5      r" " S, S-\5      r# " S. S/\5      r$ " S0 S1\5      r% " S2 S3\5      r& " S4 S5\5      r' " S6 S7\5      r(\\\\ \!\"\#\$\%\&\'\(/r)\\\\\\\\\\\\/r*g)8    )absolute_importN)RequestResponse)ArrayInt8Int16Int32Int64SchemaStringBytesAbortedTransactionproducer_idfirst_offsetc                   t    \ rS rSrSrSr\" S\" S\" S5      4S\" S\	4S\
4S	\4S
\45      45      45      rSrg)FetchResponse_v0      r   topicsutf-8
partitions	partition
error_codehighwater_offsetrecords N)__name__
__module____qualname____firstlineno__API_KEYAPI_VERSIONr   r   r   r	   r   r
   r   SCHEMA__static_attributes__r       :/venv/lib/python3.13/site-packages/kafka/protocol/fetch.pyr   r      s`    GK	5vg'5e$u%#U+E"	$ %& 	'Fr%   r   c                   z    \ rS rSrSrSr\" S\4S\" S\	" S5      4S\" S\4S\
4S	\4S
\45      45      45      rSrg)FetchResponse_v1   r   throttle_time_msr   r   r   r   r   r   r   r   Nr   r   r   r    r!   r"   r   r	   r   r   r   r
   r   r#   r$   r   r%   r&   r(   r(      sh    GK	U#	5vg'5e$u%#U+E"	$ %& 	'	Fr%   r(   c                   4    \ rS rSrSrSr\R                  rSrg)FetchResponse_v2*   r      r   N)	r   r   r   r    r!   r"   r(   r#   r$   r   r%   r&   r-   r-   *       GK$$Fr%   r-   c                   4    \ rS rSrSrSr\R                  rSrg)FetchResponse_v30   r      r   N)	r   r   r   r    r!   r"   r-   r#   r$   r   r%   r&   r2   r2   0   r0   r%   r2   c                       \ rS rSrSrSr\" S\4S\" S\	" S5      4S\" S\4S	\
4S
\4S\4S\" S\4S\45      4S\45      45      45      rSrg)FetchResponse_v46   r      r*   r   r   r   r   r   r   last_stable_offsetaborted_transactionsr   r   r   r   Nr+   r   r%   r&   r6   r6   6   s    GK	U#	5vg'5e$u%#U+%u-'"E*#U+*- . E"$ %
& 
	'Fr%   r6   c                       \ rS rSrSrSr\" S\4S\" S\	" S5      4S\" S\4S	\
4S
\4S\4S\4S\" S\4S\45      4S\45      45      45      rSrg)FetchResponse_v5J   r      r*   r   r   r   r   r   r   r9   log_start_offsetr:   r   r   r   r   Nr+   r   r%   r&   r<   r<   J   s    GK	U#	5vg'5e$u%#U+%u-#U+'"E*#U+*- . E"	$ 	%& 	'Fr%   r<   c                   8    \ rS rSrSrSrSr\R                  rSr	g)FetchResponse_v6^   z
Same as FetchResponse_v5. The version number is bumped up to indicate that the client supports KafkaStorageException.
The KafkaStorageException will be translated to NotLeaderForPartitionException in the response if version <= 5
r      r   N)
r   r   r   r    __doc__r!   r"   r<   r#   r$   r   r%   r&   rA   rA   ^   s     GK$$Fr%   rA   c                       \ rS rSrSrSrSr\" S\4S\	4S\4S\
" S\" S	5      4S
\
" S\4S\	4S\4S\4S\4S\
" S\4S\45      4S\45      45      45      rSrg)FetchResponse_v7h   z+
Add error_code and session_id to response
r      r*   r   
session_idr   r   r   r   r   r9   r?   r:   r   r   r   r   N)r   r   r   r    rD   r!   r"   r   r	   r   r   r   r
   r   r#   r$   r   r%   r&   rF   rF   h   s     GK	U#	u	u	5vg'5e$u%#U+%u-#U+'"E*#U+*- . E"	$ 	%& 	'	Fr%   rF   c                   4    \ rS rSrSrSr\R                  rSrg)FetchResponse_v8   r      r   N	r   r   r   r    r!   r"   rF   r#   r$   r   r%   r&   rK   rK      r0   r%   rK   c                   4    \ rS rSrSrSr\R                  rSrg)FetchResponse_v9   r   	   r   NrN   r   r%   r&   rP   rP      r0   r%   rP   c                   4    \ rS rSrSrSr\R                  rSrg)FetchResponse_v10   r   
   r   NrN   r   r%   r&   rT   rT      s    GK$$Fr%   rT   c                       \ rS rSrSrSr\" S\4S\4S\4S\	" S\
" S5      4S	\	" S
\4S\4S\4S\4S\4S\	" S\4S\45      4S\4S\45      45      45      rSrg)FetchResponse_v11   r      r*   r   rI   r   r   r   r   r   r9   r?   r:   r   r   preferred_read_replicar   r   N)r   r   r   r    r!   r"   r   r	   r   r   r   r
   r   r#   r$   r   r%   r&   rX   rX      s    GK	U#	u	u	5vg'5e$u%#U+%u-#U+'"E*#U+*- . *51E"
$ 
%& 	'	Fr%   rX   c                       \ rS rSrSrSr\r\" S\	4S\	4S\	4S\
" S\" S	5      4S
\
" S\	4S\4S\	45      45      45      rSrg)FetchRequest_v0   r   r   
replica_idmax_wait_time	min_bytesr   topicr   r   r   offset	max_bytesr   N)r   r   r   r    r!   r"   r   RESPONSE_TYPEr   r	   r   r   r
   r#   r$   r   r%   r&   r]   r]      su    GK$M	u	% 	e	5fWo&5e$5!e$& '( 	)	
Fr%   r]   c                   8    \ rS rSrSrSr\r\R                  r	Sr
g)FetchRequest_v1   r   r   N)r   r   r   r    r!   r"   r(   re   r]   r#   r$   r   r%   r&   rg   rg          GK$M##Fr%   rg   c                   8    \ rS rSrSrSr\r\R                  r	Sr
g)FetchRequest_v2   r   r/   r   N)r   r   r   r    r!   r"   r-   re   rg   r#   r$   r   r%   r&   rk   rk      ri   r%   rk   c                       \ rS rSrSrSr\r\" S\	4S\	4S\	4S\	4S\
" S	\" S
5      4S\
" S\	4S\4S\	45      45      45      rSrg)FetchRequest_v3   r   r4   r_   r`   ra   rd   r   rb   r   r   r   rc   r   N)r   r   r   r    r!   r"   r2   re   r   r	   r   r   r
   r#   r$   r   r%   r&   rn   rn      s}    GK$M	u	% 	e	e	5fWo&5e$5!e$& '( 	)Fr%   rn   c                       \ rS rSrSrSr\r\" S\	4S\	4S\	4S\	4S\
4S	\" S
\" S5      4S\" S\	4S\4S\	45      45      45      rSrg)FetchRequest_v4   r   r8   r_   r`   ra   rd   isolation_levelr   rb   r   r   r   rc   r   N)r   r   r   r    r!   r"   r6   re   r   r	   r   r   r   r
   r#   r$   r   r%   r&   rq   rq      s     GK$M	u	% 	e	e	D!	5fWo&5e$5!e$& '( 	)Fr%   rq   c                       \ rS rSrSrSr\r\" S\	4S\	4S\	4S\	4S\
4S	\" S
\" S5      4S\" S\	4S\4S\4S\	45      45      45      rSrg)FetchRequest_v5   r   r>   r_   r`   ra   rd   rs   r   rb   r   r   r   fetch_offsetr?   r   N)r   r   r   r    r!   r"   r<   re   r   r	   r   r   r   r
   r#   r$   r   r%   r&   ru   ru      s    GK$M	u	% 	e	e	D!	5fWo&5e$'#U+e$	& '( 	)Fr%   ru   c                   <    \ rS rSrSrSrSr\r\	R                  r
Srg)FetchRequest_v6i  a
  
The body of FETCH_REQUEST_V6 is the same as FETCH_REQUEST_V5.
The version number is bumped up to indicate that the client supports KafkaStorageException.
The KafkaStorageException will be translated to NotLeaderForPartitionException in the response if version <= 5
r   rC   r   N)r   r   r   r    rD   r!   r"   rA   re   ru   r#   r$   r   r%   r&   ry   ry     s#    
 GK$M##Fr%   ry   c                       \ rS rSrSrSrSr\r\	" S\
4S\
4S\
4S\
4S	\4S
\
4S\
4S\" S\" S5      4S\" S\
4S\4S\4S\
45      45      4S\" S\" S5      4S\" \
5      45      45	      rSrg)FetchRequest_v7i  z.
Add incremental fetch requests (see KIP-227)
r   rH   r_   r`   ra   rd   rs   rI   session_epochr   rb   r   r   r   rw   r?   forgotten_topics_datar   N)r   r   r   r    rD   r!   r"   rF   re   r   r	   r   r   r   r
   r#   r$   r   r%   r&   r{   r{     s     GK$M	u	% 	e	e	D!	u	% 	5fWo&5e$'#U+e$	& '( 	) 
!%fWo&5<(#
 	Fr%   r{   c                   <    \ rS rSrSrSrSr\r\	R                  r
Srg)FetchRequest_v8i.  z]
bump used to indicate that on quota violation brokers send out responses before throttling.
r   rM   r   N)r   r   r   r    rD   r!   r"   rK   re   r{   r#   r$   r   r%   r&   r   r   .  s#     GK$M##Fr%   r   c                       \ rS rSrSrSrSr\r\	" S\
4S\
4S\
4S\
4S	\4S
\
4S\
4S\" S\" S5      4S\" S\
4S\
4S\4S\4S\
45      45      4S\" S\" S5      4S\" \
5      45      45	      rSrg)FetchRequest_v9i8  z-
adds the current leader epoch (see KIP-320)
r   rR   r_   r`   ra   rd   rs   rI   r|   r   rb   r   r   r   current_leader_epochrw   r?   r}   r   N)r   r   r   r    rD   r!   r"   rP   re   r   r	   r   r   r   r
   r#   r$   r   r%   r&   r   r   8  s     GK$M	u	% 	e	e	D!	u	% 	5fWo&5e$'/'#U+e$& '( 	) 
!%fWo&5<(#
 	!Fr%   r   c                   <    \ rS rSrSrSrSr\r\	R                  r
Srg)FetchRequest_v10iV  z;
bumped up to indicate ZStandard capability. (see KIP-110)
r   rV   r   N)r   r   r   r    rD   r!   r"   rT   re   r   r#   r$   r   r%   r&   r   r   V  s#     GK%M##Fr%   r   c                       \ rS rSrSrSrSr\r\	" S\
4S\
4S\
4S\
4S	\4S
\
4S\
4S\" S\" S5      4S\" S\
4S\
4S\4S\4S\
45      45      4S\" S\" S5      4S\" \
5      45      4S\" S5      45
      rSrg)FetchRequest_v11i`  z8
added rack ID to support read from followers (KIP-392)
r   rZ   r_   r`   ra   rd   rs   rI   r|   r   rb   r   r   r   r   rw   r?   r}   rack_idr   N)r   r   r   r    rD   r!   r"   rX   re   r   r	   r   r   r   r
   r#   r$   r   r%   r&   r   r   `  s     GK%M	u	% 	e	e	D!	u	% 	5fWo&5e$'/'#U+e$& '( 	) 
!%fWo&5<(#
 	 
F7O$)Fr%   r   )+
__future__r   collectionskafka.protocol.apir   r   kafka.protocol.typesr   r   r   r	   r
   r   r   r   
namedtupler   r   r(   r-   r2   r6   r<   rA   rF   rK   rP   rT   rX   r]   rg   rk   rn   rq   ru   ry   r{   r   r   r   r   FetchRequestFetchResponser   r%   r&   <module>r      s   &  0 X X X !++,@N#% x x %x %%x %x (x (%x %x 2%x %%x %% % .g "$g $$g $g $g *g *	$g 	$g :$g $g <$w $w @ _o_o_o%'7	 &(8&(8&(8'):	r%   