
    9h6                        S r SSKrSSKrSSKJrJrJrJr  SSK	J
r
Jr  SSKJrJrJrJr  SSKJrJrJrJrJrJr  SSKJrJrJrJrJr  SS	KJrJ r J!r!J"r"J#r#J$r$  SS
K%J&r&  SSK'J(r(  SSK)J*r*J+r+  SSK,J-r-  SSK.J/r0J1r2J3r4  SSK5J6r6J7r7J8r8J9r9J:r:J;r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJ  SSKKJLrMJNrOJPrQ   \RrS " S S\85      rVg! \T a    \UrS Nf = f)zK
Kafka admin client: create, view, alter, and delete topics and resources.
    N   )ConfigSourceConfigEntryConfigResourceAlterConfigOpType)ResourceTypeResourcePatternType)AclOperationAclPermissionType
AclBindingAclBindingFilter)BrokerMetadataClusterMetadataGroupMemberGroupMetadataPartitionMetadataTopicMetadata)ConsumerGroupListingListConsumerGroupsResultConsumerGroupDescriptionMemberAssignmentMemberDescription)UserScramCredentialAlterationUserScramCredentialUpsertionUserScramCredentialDeletionScramCredentialInfoScramMechanismUserScramCredentialsDescription)TopicDescription)DescribeClusterResult)
OffsetSpecListOffsetsResultInfo)DeletedRecords   )TopicCollectionConsumerGroupTypeElectionType)KafkaException
KafkaError_AdminClientImplNewTopicNewPartitionsTopicPartitionCONFIG_SOURCE_UNKNOWN_CONFIG"CONFIG_SOURCE_DYNAMIC_TOPIC_CONFIG#CONFIG_SOURCE_DYNAMIC_BROKER_CONFIG+CONFIG_SOURCE_DYNAMIC_DEFAULT_BROKER_CONFIG"CONFIG_SOURCE_STATIC_BROKER_CONFIGCONFIG_SOURCE_DEFAULT_CONFIGCONFIG_SOURCE_GROUP_CONFIGRESOURCE_UNKNOWNRESOURCE_ANYRESOURCE_TOPICRESOURCE_GROUPRESOURCE_BROKERRESOURCE_TRANSACTIONAL_IDOFFSET_INVALID)ConsumerGroupTopicPartitionsConsumerGroupStateIsolationLevelc                     ^  \ rS rSrSrU 4S jr\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rU 4S jrU 4S jrU 4S jrU 4S jrU 4S jrU 4S jr U 4S jr!U 4S jr"U 4S  jr#U 4S! jr$U 4S" jr%U 4S# jr&U 4S$ jr'U 4S% jr(U 4S& jr)U 4S' jr*U 4S( jr+U 4S) jr,U 4S* jr-S1U 4S+ jjr.U 4S, jr/U 4S- jr0U 4S. jr1S1U 4S/ jjr2S0r3U =r4$ )2AdminClient`   a9  
AdminClient provides admin operations for Kafka brokers, topics, groups,
and other resource types supported by the broker.

The Admin API methods are asynchronous and return a dict of
concurrent.futures.Future objects keyed by the entity.
The entity is a topic name for create_topics(), delete_topics(), create_partitions(),
and a ConfigResource for alter_configs() and describe_configs().

All the futures for a single API call will currently finish/fail at
the same time (backed by the same protocol request), but this might
change in future versions of the client.

See examples/adminapi.py for example usage.

For more information see the `Java Admin API documentation
<https://docs.confluent.io/current/clients/javadocs/org/apache/kafka/clients/admin/package-frame.html>`_.

Requires broker version v0.11.0.0 or later.
c                 0   > [         [        U ]
  " U40 UD6  g)a  
        Create a new AdminClient using the provided configuration dictionary.

        The AdminClient is a standard Kafka protocol client, supporting
        the standard librdkafka configuration properties as specified at
        https://github.com/confluentinc/librdkafka/blob/master/CONFIGURATION.md

        :param dict conf: Configuration properties. At a minimum ``bootstrap.servers`` **should** be set
"
        :param Logger logger: Optional Logger instance to use as a custom log messages handler.
        N)superr@   __init__)selfconfkwargs	__class__s      cC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\confluent_kafka/admin/__init__.pyrD   AdminClient.__init__v   s     	k4)$9&9    c                     U R                  5       nUR                  5        Hd  u  p4UR                  US5      nUc  [        SR	                  X15      5      eUb  UR                  [        U5      5        MS  UR                  S5        Mf     g! [         a4  nUR                  5        H  u  p5UR                  U5        M      SnAgSnAff = f)zm
Map per-topic results to per-topic futures in futmap.
The result value of each (successful) future is None.
Nz$Topic {} not found in future-map: {})	resultitemsgetRuntimeErrorformatset_exceptionr(   
set_result	Exception)ffutmaprM   topicerrorfutes          rI   _make_topics_resultAdminClient._make_topics_result   s    	%XXZF &jj-;&'M'T'TUZ'cdd$%%nU&;< NN4( !/  	%$lln
!!!$ -	%s   BB 
C	*CC	c                     U R                  5       nUR                  5        Hx  u  p4UR                  US5      nUc  [        SR	                  X15      5      eUR
                  b&  UR                  [        UR
                  5      5        Mg  UR                  U5        Mz     g! [         a4  nUR                  5        H  u  p5UR                  U5        M      SnAgSnAff = f)z
Map per-resource results to per-resource futures in futmap.
The result value of each (successful) future is a ConfigResource.
Nz'Resource {} not found in future-map: {})
rM   rN   rO   rP   rQ   rX   rR   r(   rS   rT   )rU   rV   rM   resourceconfigsrY   rZ   s          rI   _make_resource_result!AdminClient._make_resource_result   s    	%XXZF%+\\^!jj40;&'P'W'WX`'ijj>>-%%nX^^&DE
 NN7+ &4  	%!'!!!$ "0	%s   BB 
C)*CCc                     g N )rU   rV   s     rI   !_make_list_consumer_groups_result-AdminClient._make_list_consumer_groups_result   s    rK   c                     U R                  5       n[        UR                  5       5      n[        U5      n[        U5      nXE:w  a  [	        SR                  XE5      5      e[        U5       HK  u  pgX6   n[        U[        5      (       a  UR                  [        U5      5        M:  UR                  U5        MM     g! [         a4  n	UR                  5        H  u  pUR                  U	5        M      Sn	A	gSn	A	ff = f)z7
Map per-group results to per-group futures in futmap.
8Results length {} is different from future-map length {}NrM   listvalueslenrP   rQ   	enumerate
isinstancer)   rR   r(   rS   rT   rN   rU   rV   resultsfutmap_valueslen_resultslen_futuresirM   rY   rZ   _s              rI   _make_consumer_groups_result(AdminClient._make_consumer_groups_result   s    
	%hhjG 1Mg,Km,K)"NUUVaoq q&w/	#&fj11%%nV&<=NN6* 0  	% ,,.!!!$ )	%   B8B; ;
C9*C44C9c                     U R                  5       n[        UR                  5       5      n[        U5      n[        U5      nXE:w  a  [	        SR                  XE5      5      e[        U5       HK  u  pgX6   n[        U[        5      (       a  UR                  [        U5      5        M:  UR                  U5        MM     g! [         a4  n	UR                  5        H  u  pUR                  U	5        M      Sn	A	gSn	A	ff = f)z
Map per-group results to per-group futures in futmap.
The result value of each (successful) future is ConsumerGroupTopicPartitions.
rh   Nri   ro   s              rI   #_make_consumer_group_offsets_result/AdminClient._make_consumer_group_offsets_result   s    	%hhjG 1Mg,Km,K)"NUUVaoq q&w/	#&fj11%%nV&<=NN6* 0  	% ,,.!!!$ )	%rx   c                     U R                  5       n[        UR                  5       5      n[        U5      n[        U5      nXE:w  a  [	        SR                  XE5      5      e[        U5       HK  u  pgX6   n[        U[        5      (       a  UR                  [        U5      5        M:  UR                  U5        MM     g! [         a4  n	UR                  5        H  u  pUR                  U	5        M      Sn	A	gSn	A	ff = f)z
Map create ACL binding results to corresponding futures in futmap.
For create_acls the result value of each (successful) future is None.
For delete_acls the result value of each (successful) future is the list of deleted AclBindings.
rh   Nri   )rU   rV   rp   rq   rr   rs   rt   rM   rY   rZ   r^   s              rI   _make_acls_resultAdminClient._make_acls_result   s    	%hhjG 1Mg,Km,K)"NUUVaoq q&w/	#&fj11%%nV&<=NN6* 0  	%!'!!!$ "0	%rx   c                     U R                  5       n[        UR                  5       5      n[        U5      n[        U5      nXE:w  a  [	        SR                  XE5      5      e[        U5       HK  u  pgX6   n[        U[        5      (       a  UR                  [        U5      5        M:  UR                  U5        MM     g ! [         a4  n	UR                  5        H  u  pUR                  U	5        M      S n	A	g S n	A	ff = f)Nrh   ri   ro   s              rI   _make_futmap_result_from_list)AdminClient._make_futmap_result_from_list  s    	%hhjG 1Mg,Km,K)"NUUVaoq q&w/	#&fj11%%nV&<=NN6* 0  	% ,,.!!!$ )	%rx   c                     U R                  5       n[        U5      n[        U5      n[        U5      U:w  a  [        SU SU 35      eUR                  5        Hm  u  pVUR	                  US 5      nUc  [        SU SU 35      e[        U[        5      (       a  UR                  [        U5      5        M\  UR                  U5        Mo     g ! [         a4  nUR                  5        H  u  pUR                  U5        M      S nAg S nAff = f)NzResults length z% is different from future-map length zKey z not found in future-map: )rM   rl   rP   rN   rO   rn   r)   rR   r(   rS   rT   )
rU   rV   rp   rr   rs   keyvaluerY   rZ   ru   s
             rI   _make_futmap_resultAdminClient._make_futmap_result  s    	%hhjGg,Kf+K7|{*"%k]2WXcWdeg g%mmo
jjd+;&se#=fXFH HeZ00%%nU&;<NN5) .  	% ,,.!!!$ )	%s   CC
 

D*DDc                      [         R                  R                  5       n U R                  5       (       d  [	        S5      eU $ )Nz Future was cancelled prematurely)
concurrentfuturesFutureset_running_or_notify_cancelrP   )rU   s    rI   _create_futureAdminClient._create_future1  s6    %%'--//ABBrK   c                   ^^ 0 mU  HP  nUb3  [        X15      (       d#  [        SR                  [        U5      5      5      e[        R                  5       TU'   MR     [        R                  5       nUR                  UU4S j5        UT4$ )z
Create futures and a futuremap for the keys in futmap_keys,
and create a request-level future to be bassed to the C API.

FIXME: use _make_futures_v2 with TypeError in next major release.
Expected list of {}c                    > T" U T5      $ rc   rd   rU   rV   make_result_fns    rI   <lambda>+AdminClient._make_futures.<locals>.<lambda>J      nQ&?rK   )rn   
ValueErrorrQ   reprr@   r   add_done_callbackfutmap_keysclass_checkr   r   rU   rV   s     `  @rI   _make_futuresAdminClient._make_futures8  s{     C&z#/K/K !6!=!=d;>O!PQQ%446F3K  &&(	?@&yrK   c                   ^^ 0 mU  HP  nUb3  [        X15      (       d#  [        SR                  [        U5      5      5      e[        R                  5       TU'   MR     [        R                  5       nUR                  UU4S j5        UT4$ )zz
Create futures and a futuremap for the keys in futmap_keys,
and create a request-level future to be bassed to the C API.
r   c                    > T" U T5      $ rc   rd   r   s    rI   r   .AdminClient._make_futures_v2.<locals>.<lambda>^  r   rK   )rn   	TypeErrorrQ   r   r@   r   r   r   s     `  @rI   _make_futures_v2AdminClient._make_futures_v2N  s{     C&z#/K/K 5 < <T+=N OPP%446F3K  &&(	?@&yrK   c                     ^^ S m[         R                  5       m[         R                  5       n U R                  UU4S j5        U T4$ )z
Create an pair of futures, one for internal usage and one
to use externally, the external one throws a KafkaException if
any of the values in the map returned by the first future is
a KafkaError.
c                 ,    U R                  5       nUR                  5        H6  u  p4[        U[        5      (       d  M  UR	                  [        U5      5          g    UR                  U5        g ! [         a  nUR	                  U5         S nAg S nAff = frc   )rM   rN   rn   r)   rR   r(   rS   rT   )
internal_frU   rp   ru   r   rZ   s         rI   single_future_resultBAdminClient._make_single_future_pair.<locals>.single_future_resultj  su    #$++- 'HA!%44u(=> !0 W% #""#s"   8A. A. A. .
B8BBc                    > T" U T5      $ rc   rd   r   rU   r   s    rI   r   6AdminClient._make_single_future_pair.<locals>.<lambda>w  s    8LZYZ8[rK   )r@   r   r   r   s    @@rI   _make_single_future_pair$AdminClient._make_single_future_pairb  s?    		# &&( //1
$$%[\1}rK   c                 B    [        [        U 5      5      [        U 5      :g  $ rc   )rl   set)rN   s    rI   _has_duplicatesAdminClient._has_duplicatesz  s    3u:#e*,,rK   c                    U c  [        S5      e[        U [        5      (       d  [        S5      e[        U 5      S:w  a  [	        S5      eU  GH  n[        U[
        5      (       d  [        S5      eUR                  c  [        S5      e[        UR                  [        5      (       d  [        S5      eUR                  (       d  [	        S5      eUR                  c  M  [        UR                  [        5      (       d  [        S	5      e[        UR                  5      S
:X  a  [	        S5      eUR                   H  nUc  [	        S5      e[        U[        5      (       d  [        S5      eUR                  c  [        S5      eUR                  (       d  [	        S5      eUR                  S
:  a  [	        S5      eUR                  [        :w  d  M  [	        S5      e   GM     g )Nrequest cannot be Nonerequest must be a listr   zECurrently we support listing offsets for a single consumer group only/Expected list of 'ConsumerGroupTopicPartitions''group_id' cannot be None'group_id' must be a string'group_id' cannot be emptyz)'topic_partitions' must be a list or Noner   "'topic_partitions' cannot be empty,Element of 'topic_partitions' cannot be None<Element of 'topic_partitions' must be of type TopicPartitionEElement of 'topic_partitions' must not have 'topic' attribute as NoneFElement of 'topic_partitions' must not have 'topic' attribute as EmptyzFElement of 'topic_partitions' must not have negative 'partition' valuez:Element of 'topic_partitions' must not have 'offset' value)r   rn   rj   rl   r   _ConsumerGroupTopicPartitionsgroup_idstring_typetopic_partitions_TopicPartitionrW   	partitionoffsetr;   requestreqtopic_partitions      rI   *_check_list_consumer_group_offsets_request6AdminClient._check_list_consumer_group_offsets_request~  s   ?455'4((455w<1deeCc#@AA QRR||# ;<<cllK88 =>><< !=>>##/!#"6"6==#$OPPs++,1$%IJJ'*';';O&.()WXX%oGG'(fgg&,,4'(opp*00()qrr&0014()qrr&--?()eff (<! rK   c                    U c  [        S5      e[        U [        5      (       d  [        S5      e[        U 5      S:w  a  [	        S5      eU  GH  n[        U[
        5      (       d  [        S5      eUR                  c  [        S5      e[        UR                  [        5      (       d  [        S5      eUR                  (       d  [	        S5      eUR                  c  [	        S	5      e[        UR                  [        5      (       d  [        S
5      e[        UR                  5      S:X  a  [	        S5      eUR                   H  nUc  [	        S5      e[        U[        5      (       d  [        S5      eUR                  c  [        S5      eUR                  (       d  [	        S5      eUR                  S:  a  [	        S5      eUR                  S:  d  M  [	        S5      e   GM     g )Nr   r   r   zFCurrently we support altering offsets for a single consumer group onlyr   r   r   r   z!'topic_partitions' cannot be nullz!'topic_partitions' must be a listr   r   r   r   r   r   zPElement of 'topic_partitions' must not have negative value for 'partition' fieldzMElement of 'topic_partitions' must not have negative value for 'offset' field)r   rn   rj   rl   r   r   r   r   r   r   rW   r   r   r   s      rI   +_check_alter_consumer_group_offsets_request7AdminClient._check_alter_consumer_group_offsets_request  s   ?455'4((455w<1effCc#@AA QRR||# ;<<cllK88 =>><< !=>>##+ !DEEc22D99 CDD3''(A- !EFF#&#7#7"*$%STT!/?CC#$bcc"((0#$kll&,,$%mnn",,q0$jl l"))A-$gi i $8 rK   c                     U c  g [        U [        5      (       d  [        S5      eU  HC  nUc  [        S5      e[        U[        5      (       d  [        S5      eU(       a  M:  [	        S5      e   g )Nz#Expected input to be list of String'user' cannot be NonezEach value should be a string'user' cannot be empty)rn   rj   r   r   r   )usersusers     rI   ._check_describe_user_scram_credentials_request:AdminClient._check_describe_user_scram_credentials_request  sh    =%&&ABBD| 788dK00 ?@@4 !9:: rK   c                    [        U [        5      (       d  [        S5      e[        U 5      S:X  a  [	        S5      eU  GH*  n[        U[
        5      (       d  [        S5      eUR                  c  [        S5      e[        UR                  [        5      (       d  [        S5      eUR                  (       d  [	        S5      e[        U[        5      (       GaH  UR                  c  [        S5      e[        UR                  [        5      (       d  [        S	5      eUR                  (       d  [	        S
5      eUR                  b  UR                  (       d  [	        S5      eUR                  (       a*  [        UR                  [        5      (       d  [        S5      e[        UR                  [        5      (       d  [        S5      eUR                  R                  S:  a  [	        S5      e[        UR                  R                  [         5      (       d  [        S5      eGM  [        U["        5      (       a-  [        UR                  [         5      (       d  [        S5      eGM"  [        S5      e   g )NzExpected input to be listr   z Expected at least one alterationzMExpected each element of list to be subclass of UserScramCredentialAlterationr   z'user' must be a stringr   z'password' cannot be Nonez'password' must be bytesz'password' cannot be emptyz&'salt' can be None but cannot be emptyz'salt' must be bytesz7Expected credential_info to be ScramCredentialInfo Typer   zIterations should be positivez0Expected the mechanism to be ScramMechanism TypezxExpected each element of list 'alterations' to be either a UserScramCredentialUpsertion or a UserScramCredentialDeletion)rn   rj   r   rl   r   r   r   r   r   passwordbytessaltscram_credential_infor   
iterations	mechanismr   r   )alterations
alterations     rI   +_check_alter_user_scram_credentials_request7AdminClient._check_alter_user_scram_credentials_request  s   +t,,788{q ?@@%Jj*GHH opp& 788joo{;; 9::?? !9::*&BCC&&.#$?@@!*"5"5u==#$>??!**$%ABB??.z$%MNN??:joou+M+M#$:;;!*"B"BDWXX#$]^^33>>B$%DEE!*"B"B"L"Ln]]#$VWW ^J(CDD!*"6"6GG#$VWW H   !> ? ?C &rK   c                 t   [        U [        5      (       d  [        S5      eU R                  5        H  u  p#Uc  [        S5      e[        U[        5      (       d  [        S5      eUR
                  c  [        S5      e[        UR
                  [        5      (       d  [        S5      eUR
                  (       d  [        S5      eUR                  S:  a  [        S5      eUc  [        S	5      e[        U[        5      (       a  M  [        S
5      e   SU;   a$  [        US   [        5      (       d  [        S5      eg g )NzdExpected topic_partition_offsets to be dict of [TopicPartitions,OffsetSpec] for list offsets requestzpartition cannot be Nonez"partition must be a TopicPartitionz#partition topic name cannot be Nonez#partition topic name must be stringz$partition topic name cannot be emptyr   z$partition index must be non-negativezOffsetSpec cannot be NonezValue must be a OffsetSpecisolation_levelz4isolation_level argument should be an IsolationLevel)rn   dictr   rN   r   rW   r   r   r   r!   _IsolationLevel)topic_partition_offsetsrG   r   offset_specs       rI   _check_list_offsets_request'AdminClient._check_list_offsets_request  s/   1488 \ ] ] -D,I,I,K(O& :;;o?? DEE$$, EFFo33[AA EFF"(( !GHH((1, !GHH" ;<<k:66 <==! -L$ &f%67II VWW J 'rK   c                 .   [        U [        5      (       d"  [        S[        U 5      R                   S35      eU  HX  n[        U[
        5      (       d%  [        SS[        U5      R                   S3-   5      eUR                  S:  d  MO  [        S5      e   g )Nz$Expected Request to be a list, got '' z<Element of the request list must be of type 'TopicPartition' got 'r   z'partition' cannot be negative)rn   rj   r   type__name__r   r   r   )r   r   s     rI   _check_delete_records!AdminClient._check_delete_records   s    '4((B4=CYCYBZZ\]^^Cc?33 ^"(c););(<B ?!@ A A}}q  !ABB rK   c                 |   [        U [        5      (       d  [        S5      eUb  [        U[        5      (       d%  [        SS[	        U5      R
                   S3-   5      eU HX  n[        U[        5      (       d%  [        SS[	        U5      R
                   S3-   5      eUR                  S:  d  MO  [        S5      e   g g )	Nz5Expected 'election_type' to be of type 'ElectionType'z(Expected 'partitions' to be a list, got 'zAElement of the 'partitions' list must be of type 'TopicPartition'r   r   r   zTElements of the 'partitions' list must not have negative value for 'partition' field)	rn   _ElectionTyper   rj   r   r   r   r   r   )election_type
partitionsr   s      rI   _check_elect_leaders AdminClient._check_elect_leaders+  s    -77STT!j$// J"#D$4$=$=#>a @!A B B'	!)_==#$g&,T)_-E-E,Fb$I%J K K&&*$ &> ? ? (	 "rK   c                    > [         R                  U Vs/ s H  o3R                  PM     snS[         R                  5      u  pE[        [         U ]  " X40 UD6  U$ s  snf )a@  
Create one or more new topics.

:param list(NewTopic) new_topics: A list of specifictions (NewTopic) for
          the topics that should be created.
:param float operation_timeout: The operation timeout in seconds,
          controlling how long the CreateTopics request will block
          on the broker waiting for the topic creation to propagate
          in the cluster. A value of 0 returns immediately.
          Default: `socket.timeout.ms/1000.0`
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`
:param bool validate_only: If true, the request is only validated
          without creating the topic. Default: False

:returns: A dict of futures for each topic, keyed by the topic name.
          The future result() method returns None.

:rtype: dict(<topic_name, future>)

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
N)r@   r   rW   r[   rC   create_topics)rE   
new_topicsrG   xrU   rV   rH   s         rI   r   AdminClient.create_topics;  sX    6  --
.K
1ww
.K.2.9.M.MO	 	k4.zGG /L   Ac                    > [         R                  US[         R                  5      u  p4[        [         U ]  " X40 UD6  U$ )a  
Delete one or more topics.

:param list(str) topics: A list of topics to mark for deletion.
:param float operation_timeout: The operation timeout in seconds,
          controlling how long the DeleteTopics request will block
          on the broker waiting for the topic deletion to propagate
          in the cluster. A value of 0 returns immediately.
          Default: `socket.timeout.ms/1000.0`
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each topic, keyed by the topic name.
          The future result() method returns None.

:rtype: dict(<topic_name, future>)

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
N)r@   r   r[   rC   delete_topics)rE   topicsrG   rU   rV   rH   s        rI   r   AdminClient.delete_topics^  s@    0  --fd.9.M.MO	 	k4.vCFCrK   c                 ,   > [         [        U ]
  " U0 UD6$ rc   )rC   r@   list_topicsrE   argsrG   rH   s      rI   r  AdminClient.list_topics}      [$3TDVDDrK   c                 ,   > [         [        U ]
  " U0 UD6$ rc   )rC   r@   list_groupsr  s      rI   r  AdminClient.list_groups  r  rK   c                    > [         R                  U Vs/ s H  o3R                  PM     snS[         R                  5      u  pE[        [         U ]  " X40 UD6  U$ s  snf )a4  
Create additional partitions for the given topics.

:param list(NewPartitions) new_partitions: New partitions to be created.
:param float operation_timeout: The operation timeout in seconds,
          controlling how long the CreatePartitions request will block
          on the broker waiting for the partition creation to propagate
          in the cluster. A value of 0 returns immediately.
          Default: `socket.timeout.ms/1000.0`
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`
:param bool validate_only: If true, the request is only validated
          without creating the partitions. Default: False

:returns: A dict of futures for each topic, keyed by the topic name.
          The future result() method returns None.

:rtype: dict(<topic_name, future>)

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
N)r@   r   rW   r[   rC   create_partitions)rE   new_partitionsrG   r   rU   rV   rH   s         rI   r
  AdminClient.create_partitions  sX    4  --.O1ww.O.2.9.M.MO	 	k42>OO /Pr   c                    > [         R                  U[        [         R                  5      u  p4[        [         U ]  " X40 UD6  U$ )a  
Get the configuration of the specified resources.

:warning: Multiple resources and resource types may be requested,
          but at most one resource of type RESOURCE_BROKER is allowed
          per call since these resource requests must be sent to the
          broker specified in the resource.

:param list(ConfigResource) resources: Resources to get the configuration for.
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each resource, keyed by the ConfigResource.
          The type of the value returned by the future result() method is
          dict(<configname, ConfigEntry>).

:rtype: dict(<ConfigResource, future>)

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
)r@   r   r   r`   rC   describe_configsrE   	resourcesrG   rU   rV   rH   s        rI   r  AdminClient.describe_configs  s@    2  --i.9.O.OQ	 	k41)I&IrK   c                    > [         R                  " S[        SS9  [        R	                  U[
        [        R                  5      u  p4[        [        U ]"  " X40 UD6  U$ )aF  
.. deprecated:: 2.2.0

Update configuration properties for the specified resources.
Updates are not transactional so they may succeed for a subset
of the provided resources while the others fail.
The configuration for a particular resource is updated atomically,
replacing the specified values while reverting unspecified configuration
entries to their default values.

:warning: alter_configs() will replace all existing configuration for
          the provided resources with the new configuration given,
          reverting all other configuration for the resource back
          to their default values.

:warning: Multiple resources and resource types may be specified,
          but at most one resource of type RESOURCE_BROKER is allowed
          per call since these resource requests must be sent to the
          broker specified in the resource.

:param list(ConfigResource) resources: Resources to update configuration of.
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`.
:param bool validate_only: If true, the request is validated only,
          without altering the configuration. Default: False

:returns: A dict of futures for each resource, keyed by the ConfigResource.
          The future result() method returns None or throws a KafkaException.

:rtype: dict(<ConfigResource, future>)

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid type.
:raises ValueError: Invalid value.
zIalter_configs has been deprecated. Use incremental_alter_configs instead.r$   )category
stacklevel)	warningswarnDeprecationWarningr@   r   r   r`   rC   alter_configsr  s        rI   r  AdminClient.alter_configs  sW    J 	W'A	7  --i.9.O.OQ	 	k4.yFvFrK   c                    > [         R                  U[        [         R                  5      u  p4[        [         U ]  " X40 UD6  U$ )aY  
Update configuration properties for the specified resources.
Updates are incremental, i.e only the values mentioned are changed
and rest remain as is.

:param list(ConfigResource) resources: Resources to update configuration of.
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`.
:param bool validate_only: If true, the request is validated only,
          without altering the configuration. Default: False
:param int broker: Broker id to send the request to. When
          altering broker configurations, it's ignored because
          the request needs to go to that broker only.
          Default: controller broker.

:returns: A dict of futures for each resource, keyed by the ConfigResource.
          The future result() method returns None or throws a KafkaException.

:rtype: dict(<ConfigResource, future>)

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid type.
:raises ValueError: Invalid value.
)r@   r   r   r`   rC   incremental_alter_configsr  s        rI   r  %AdminClient.incremental_alter_configs  s@    4  00N1<1R1RT	 	k4:9R6RrK   c                    > [         R                  U5      (       a  [        S5      e[         R                  U[        [         R
                  5      u  p4[        [         U ]  " X40 UD6  U$ )a  
Create one or more ACL bindings.

:param list(AclBinding) acls: A list of unique ACL binding specifications (:class:`.AclBinding`)
                 to create.
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each ACL binding, keyed by the :class:`AclBinding` object.
          The future result() method returns None on success.

:rtype: dict[AclBinding, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
z"duplicate ACL bindings not allowed)r@   r   r   r   r   r}   rC   create_acls)rE   aclsrG   rU   rV   rH   s        rI   r  AdminClient.create_acls  s]    & &&t,,ABB--dJ.9.K.KM	 	k4,T??rK   c                 Z   > [         R                  5       n[        [         U ]  " X40 UD6  U$ )a  
Match ACL bindings by filter.

:param AclBindingFilter acl_binding_filter: a filter with attributes that
          must match.
          String attributes match exact values or any string if set to None.
          Enums attributes match exact values or any value if equal to `ANY`.
          If :class:`ResourcePatternType` is set to :attr:`ResourcePatternType.MATCH`
          returns ACL bindings with:
          :attr:`ResourcePatternType.LITERAL` pattern type with resource name equal
          to the given resource name;
          :attr:`ResourcePatternType.LITERAL` pattern type with wildcard resource name
          that matches the given resource name;
          :attr:`ResourcePatternType.PREFIXED` pattern type with resource name
          that is a prefix of the given resource name
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A future returning a list(:class:`AclBinding`) as result

:rtype: future

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
)r@   r   rC   describe_acls)rE   acl_binding_filterrG   rU   rH   s       rI   r"  AdminClient.describe_acls5  s-    : &&(k4./AOOrK   c                    > [         R                  U5      (       a  [        S5      e[         R                  U[        [         R
                  5      u  p4[        [         U ]  " X40 UD6  U$ )a  
Delete ACL bindings matching one or more ACL binding filters.

:param list(AclBindingFilter) acl_binding_filters: a list of unique ACL binding filters
          to match ACLs to delete.
          String attributes match exact values or any string if set to None.
          Enums attributes match exact values or any value if equal to `ANY`.
          If :class:`ResourcePatternType` is set to :attr:`ResourcePatternType.MATCH`
          deletes ACL bindings with:
          :attr:`ResourcePatternType.LITERAL` pattern type with resource name
          equal to the given resource name;
          :attr:`ResourcePatternType.LITERAL` pattern type with wildcard resource name
          that matches the given resource name;
          :attr:`ResourcePatternType.PREFIXED` pattern type with resource name
          that is a prefix of the given resource name
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each ACL binding filter, keyed by the :class:`AclBindingFilter` object.
          The future result() method returns a list of :class:`AclBinding`.

:rtype: dict[AclBindingFilter, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
z)duplicate ACL binding filters not allowed)r@   r   r   r   r   r}   rC   delete_acls)rE   acl_binding_filtersrG   rU   rV   rH   s        rI   r&  AdminClient.delete_aclsX  sa    : &&':;;HII--.ACS.9.K.KM	 	k4,-@NvNrK   c                   > SU;   a  US   nUbh  [        U[        5      (       d  [        S5      eU H#  n[        U[        5      (       a  M  [        S5      e   U Vs/ s H  o3R                  PM     snUS'   UR                  S5        SU;   a  US   nUbh  [        U[        5      (       d  [        S5      eU H#  n[        U[        5      (       a  M  [        S5      e   U Vs/ s H  oUR                  PM     snUS	'   UR                  S5        [        R                  / S[        R                  5      u  pg[        [        U ].  " U40 UD6  U$ s  snf s  snf )
a  
List consumer groups.

:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`
:param set(ConsumerGroupState) states: only list consumer groups which are currently in
          these states.
:param set(ConsumerGroupType) types: only list consumer groups of
          these types.

:returns: a future. Result method of the future returns :class:`ListConsumerGroupsResult`.

:rtype: future

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
statesNz'states' must be a setz9All elements of states must be of type ConsumerGroupState
states_inttypesz'types' must be a setz7All elements of types must be of type ConsumerGroupType	types_int)rn   r   r   _ConsumerGroupStater   pop_ConsumerGroupTyper@   r   re   rC   list_consumer_groups)	rE   rG   r*  stater,  r   rU   ru   rH   s	           rI   r1   AdminClient.list_consumer_groups  sD   ( vH%F!!&#..#$<==#E%e-@AA'(cdd $ BH'H'H|$JJx f7OE !%--#$;<<!D%d,>??'(abb " ?D&Dedzze&D{#JJw((T;3`3`ak45aB6B# (I 'Es   E$Ec                    > [        U[        5      (       d  [        S5      e[        U5      S:X  a  [	        S5      e[
        R                  US[
        R                  5      u  p4[        [
        U ]&  " X40 UD6  U$ )a  
Describe consumer groups.

:param list(str) group_ids: List of group_ids which need to be described.
:param bool include_authorized_operations: If True, fetches group AclOperations. Default: False
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each group, keyed by the group_id.
          The future result() method returns :class:`ConsumerGroupDescription`.

:rtype: dict[str, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
z6Expected input to be list of group ids to be describedr   z+Expected at least one group to be describedN)
rn   rj   r   rl   r   r@   r   rv   rC   describe_consumer_groupsrE   	group_idsrG   rU   rV   rH   s        rI   r5  $AdminClient.describe_consumer_groups  sq    ( )T**TUUy>QJKK--i.9.V.VX	 	k49)Q&QrK   c                   > [        U[        5      (       d  [        S5      eUR                  n[        U[        5      (       d  [        S5      e[
        R                  US[
        R                  5      u  pE[        [
        U ]&  " X440 UD6  U$ )a  
Describe topics.

:param TopicCollection topics: Collection of list of topic names to describe.
:param bool include_authorized_operations: If True, fetches topic AclOperations. Default: False
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each topic, keyed by the topic.
          The future result() method returns :class:`TopicDescription`.

:rtype: dict[str, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
z0Expected input to be instance of TopicCollectionz,Expected list of topic names to be describedN)
rn   _TopicCollectionr   topic_namesrj   r@   r   r   rC   describe_topics)rE   r   rG   r;  rU   rV   rH   s         rI   r<  AdminClient.describe_topics  s~    ( &"233NOO((+t,,JKK00d1<1Z1Z\	 	k40J6JrK   c                 Z   > [         R                  5       n[        [         U ]  " U40 UD6  U$ )aa  
Describe cluster.

:param bool include_authorized_operations: If True, fetches topic AclOperations. Default: False
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A future returning description of the cluster as result

:rtype: future containing the description of the cluster in result.

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
)r@   r   rC   describe_cluster)rE   rG   rU   rH   s      rI   r?  AdminClient.describe_cluster  s,    $ &&(k41!>v>rK   c                    > [        U[        5      (       d  [        S5      e[        U5      S:X  a  [	        S5      e[
        R                  U[        [
        R                  5      u  p4[        [
        U ]*  " X40 UD6  U$ )ac  
Delete the given consumer groups.

:param list(str) group_ids: List of group_ids which need to be deleted.
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each group, keyed by the group_id.
          The future result() method returns None.

:rtype: dict[str, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
z4Expected input to be list of group ids to be deletedr   z)Expected at least one group to be deleted)rn   rj   r   rl   r   r@   r   r   rv   rC   delete_consumer_groupsr6  s        rI   rB  "AdminClient.delete_consumer_groups
  sk    $ )T**RSSy>QHII--ikFnFno	k47	OOrK   c                    > [         R                  U5        [         R                  U Vs/ s H  o3R                  PM     sn[        [         R
                  5      u  pE[        [         U ]  " X40 UD6  U$ s  snf )a  
List offset information for the consumer group and (optional) topic partition provided in the request.

:note: Currently, the API supports only a single group.

:param list(ConsumerGroupTopicPartitions) list_consumer_group_offsets_request: List of
            :class:`ConsumerGroupTopicPartitions` which consist of group name and topic
            partition information for which offset detail is expected. If only group name is
            provided, then offset information of all the topic and partition associated with
            that group is returned.
:param bool require_stable: If True, fetches stable offsets. Default: False
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each group, keyed by the group id.
          The future result() method returns :class:`ConsumerGroupTopicPartitions`.

:rtype: dict[str, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
)r@   r   r   r   r   rz   rC   list_consumer_group_offsets)rE   #list_consumer_group_offsets_requestrG   r   rU   rV   rH   s         rI   rE  'AdminClient.list_consumer_group_offsets(  sn    4 	>>?bc--Or.sOrG/?/?Or.s.9.9.].]_	 	k4<=`ngmn /t   A3c                    > [         R                  U5        [         R                  U Vs/ s H  o3R                  PM     sn[        [         R
                  5      u  pE[        [         U ]  " X40 UD6  U$ s  snf )a  
Alter offset for the consumer group and topic partition provided in the request.

:note: Currently, the API supports only a single group.

:param list(ConsumerGroupTopicPartitions) alter_consumer_group_offsets_request: List of
            :class:`ConsumerGroupTopicPartitions` which consist of group name and topic
            partition; and corresponding offset to be updated.
:param float request_timeout: The overall request timeout in seconds,
          including broker lookup, request transmission, operation time
          on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures for each group, keyed by the group id.
          The future result() method returns :class:`ConsumerGroupTopicPartitions`.

:rtype: dict[ConsumerGroupTopicPartitions, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
:raises ValueException: Invalid input.
)r@   r   r   r   r   rz   rC   alter_consumer_group_offsets)rE   $alter_consumer_group_offsets_requestrG   r   rU   rV   rH   s         rI   rJ  (AdminClient.alter_consumer_group_offsetsL  sn    . 	??@de--Os.tOsG/?/?Os.t.9.9.].]_	 	k4=>bpiop /urH  c                 ,   > [         [        U ]  X5        g)a  
Sets the SASL credentials used for this client.
These credentials will overwrite the old ones, and will be used the
next time the client needs to authenticate.
This method will not disconnect existing broker connections that
have been established with the old credentials.
This method is applicable only to SASL PLAIN and SCRAM mechanisms.

:param str username: The username to set.
:param str password: The password to set.

:rtype: None

:raises KafkaException: Operation failed locally or on broker.
:raises TypeException: Invalid input.
N)rC   r@   set_sasl_credentials)rE   usernamer   rH   s      rI   rN   AdminClient.set_sasl_credentialsm  s    " 	k45hIrK   c                    > [         R                  U5        Uc  [         R                  5       u  p4O'[         R                  US[         R                  5      u  p4[
        [         U ]  " X40 UD6  U$ )a  
Describe user SASL/SCRAM credentials.

:param list(str) users: List of user names to describe.
       Duplicate users aren't allowed. Can be None
       to describe all user's credentials.
:param float request_timeout: The overall request timeout in seconds,
       including broker lookup, request transmission, operation time
       on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: In case None is passed it returns a single future.
          The future yields a dict[str, UserScramCredentialsDescription]
          or raises a KafkaException

          In case a list of user names is passed, it returns
          a dict[str, future[UserScramCredentialsDescription]].
          The futures yield a :class:`UserScramCredentialsDescription`
          or raise a KafkaException

:rtype: Union[future[dict[str, UserScramCredentialsDescription]],
              dict[str, future[UserScramCredentialsDescription]]]

:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
N)r@   r   r   r   r   rC   describe_user_scram_credentials)rE   r   rG   r   ret_futrH   s        rI   rR  +AdminClient.describe_user_scram_credentials  sf    4 	BB5I="-"F"F"HJ"-">">ud?J?^?^#`Jk4@]V\]rK   c                    > [         R                  U5        [         R                  [        U Vs/ s H  o3R                  PM     sn5      S[         R
                  5      u  pE[        [         U ]  " X40 UD6  U$ s  snf )a  
Alter user SASL/SCRAM credentials.

:param list(UserScramCredentialAlteration) alterations: List of
       :class:`UserScramCredentialAlteration` to apply.
       The pair (user, mechanism) must be unique among alterations.
:param float request_timeout: The overall request timeout in seconds,
       including broker lookup, request transmission, operation time
       on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures keyed by user name.
          The future result() method returns None or
          raises KafkaException

:rtype: dict[str, future]

:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
N)r@   r   r   r   r   r   rC   alter_user_scram_credentials)rE   r   rG   r   rU   rV   rH   s         rI   rV  (AdminClient.alter_user_scram_credentials  so    ( 	??L00Xc5dXc*ooXc5d1egk1<1P1PR	 	k4=kWPVW	 6es   A8c                   > [         R                  X5        SU;   a  US   R                  US'   US	 UR                  5        VVs/ s HB  u  p4[	        UR
                  [        UR                  5      [        UR                  5      5      PMD     nnn[         R                  U[        [         R                  5      u  pg[        [         U ]2  " XV40 UD6  U$ s  snnf )ao  
Enables to find the beginning offset,
end offset as well as the offset matching a timestamp
or the offset with max timestamp in partitions.

:param dict([TopicPartition, OffsetSpec]) topic_partition_offsets: Dictionary of
       TopicPartition objects associated with the corresponding OffsetSpec to query for.
:param IsolationLevel isolation_level: The isolation level to use when
       querying.
:param float request_timeout: The overall request timeout in seconds,
       including broker lookup, request transmission, operation time
       on broker, and response. Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures keyed by TopicPartition.
          The future result() method returns ListOffsetsResultInfo
          raises KafkaException

:rtype: dict[TopicPartition, future]

:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
r   isolation_level_value)r@   r   r   rN   r   rW   intr   _valuer   r   rC   list_offsets)	rE   r   rG   r   r   topic_partition_offsets_listrU   rV   rH   s	           rI   r\  AdminClient.list_offsets  s    . 	//0GP&.45F.G.M.MF*+()
 1H0M0M0O(Q 1P, O1137P7P3Q 2 2350O 	% (Q
  001M1@1<1P1PR	 	k4-.JXQWX(Qs   A	Cc                    > [         R                  U5        [         R                  U[        [         R                  5      u  p4[
        [         U ]  " X40 UD6  U$ )a  
Deletes all the records before the specified offsets (not including),
in the specified topics and partitions.

:param list(TopicPartition) topic_partition_offsets: A list of
       :class:`.TopicPartition` objects having `offset` field set to the offset
       before which all the records should be deleted.
       `offset` can be set to :py:const:`OFFSET_END` (-1) to delete all records
       in the partition.
:param float request_timeout: The overall request timeout in seconds,
       including broker lookup, request transmission, operation time
       on broker, and response. Default: `socket.timeout.ms/1000.0`
:param float operation_timeout: The operation timeout in seconds,
       controlling how long the `delete_records` request will block
       on the broker waiting for the record deletion to propagate
       in the cluster. A value of 0 returns immediately.
       Default: `socket.timeout.ms/1000.0`

:returns: A dict of futures keyed by the :class:`.TopicPartition`.
          The future result() method returns :class:`.DeletedRecords`
          or raises :class:`.KafkaException`

:rtype: dict[TopicPartition, future]

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
)r@   r   r   r   r   rC   delete_records)rE   r   rG   rU   rV   rH   s        rI   r`  AdminClient.delete_records  sP    : 	))*AB00#_k6U6UW	 	k4/0GUfUrK   c                    > [         R                  X5        [         R                  5       n[        [         U ]  " UR
                  X$40 UD6  U$ )aS  
Perform Preferred or Unclean leader election for
all the specified partitions or all partitions in the cluster.

:param ElectionType election_type: The type of election to perform.
:param List[TopicPartition]|None partitions: The topic partitions to perform
       the election on. Use ``None`` to perform on all the topic partitions.
:param float request_timeout: The overall request timeout in seconds,
       including broker lookup, request transmission, operation time
       on broker, and response. Default: `socket.timeout.ms*1000.0`
:param float operation_timeout: The operation timeout in seconds,
       controlling how long the 'elect_leaders' request will block
       on the broker waiting for the election to propagate
       in the cluster. A value of 0 returns immediately.
       Default: `socket.timeout.ms/1000.0`

:returns: A future. Method result() of the future returns
          dict[TopicPartition, KafkaException|None].

:rtype: future

:raises KafkaException: Operation failed locally or on broker.
:raises TypeError: Invalid input type.
:raises ValueError: Invalid input value.
)r@   r   r   rC   elect_leadersr   )rE   r   r   rG   rU   rH   s        rI   rc  AdminClient.elect_leaders  sC    6 	((C&&(k4.}/B/BJ\U[\rK   rd   rc   )5r   
__module____qualname____firstlineno____doc__rD   staticmethodr[   r`   re   rv   rz   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r
  r  r  r  r  r"  r&  r1  r5  r<  r?  rB  rE  rJ  rN  rR  rV  r\  r`  rc  __static_attributes____classcell__)rH   s   @rI   r@   r@   `   s7   *: % %. % %0   % %0 % %2 % %2 % %* % %*    *  &  . - - #g #gJ $i $iL ; ; (? (?T X X6 C C ? ?!F>EE D@.`B:!F%N-^B!F0<"HBJ&"H8'R#J! !rK   r@   )Wrh  r  concurrent.futuresr   _configr   r   r   r   	_resourcer   r	   _aclr
   r   r   r   	_metadatar   r   r   r   r   r   _groupr   r   r   r   r   _scramr   r   r   r   r   r   _topicr   _clusterr    _listoffsetsr!   r"   _recordsr#   _modelr%   r:  r&   r0  r'   r   cimplr(   r)   r*   r+   r,   r-   r   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   confluent_kafkar<   r   r=   r.  r>   r   
basestringr   	NameErrorstrr@   rd   rK   rI   <module>r}     s     ) )-% %' '( (
6 6 ' -2 %5 5% % % % % %*& &K
O# O	  Ks   4C CC