
    9h.                        S SK r S SKJr  S SKrS SKrS SKJrJrJrJ	r	J
r
Jr  S SKrS SKrS SKJr  S SK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rJrJrJrJ r J!r!  S SK"J#r#  S SK$J%r%J&r&J'r'J(r(J)r)J*r*J+r+  S SK,J-r-J.r.  \S\/\0\1\ Rd                  \3\4\54   r6\\3\54   r7\R                   Rp                  r9 " S S\5      r:S\/4S jr; S,S\S\!S\\   S\4S jjr< " S S\%5      r= " S S\&5      r>S\'S\7S\S\S\/S\6S\(S\\6   4S  jr?S\'S\/S!\/S\6S"\7S\S\S\(4S# jr@S$\\7   S\6S%\S\\7   4S& jrAS\7S\)4S' jrBS(\	\/   S)\	\/   S\34S* jrCS\7S\	\/   4S+ jrDg)-    N)BytesIO)UnionOptionalListSetTupleCallable)LRUCachevalidateValidationError)	Validator)validator_for)RegistryResource)Resolver)_MAGIC_BYTESchematopic_subject_name_strategyRuleKindRuleModeSchemaRegistryClient)RuleRegistry)BaseSerializerBaseDeserializerRuleContextFieldTransform	FieldTypeRuleConditionErrorParsedSchemaCache)SerializationErrorSerializationContextc                   $    \ rS rSrSrS rS rSrg)_ContextStringIO?   z9
Wrapper to allow use of StringIO via 'with' constructs.
c                     U $ N )selfs    pC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\confluent_kafka/schema_registry/json_schema.py	__enter___ContextStringIO.__enter__D   s        c                 $    U R                  5         g)NF)close)r)   argss     r*   __exit___ContextStringIO.__exit__G   s    

r-   r(   N)__name__
__module____qualname____firstlineno____doc__r+   r1   __static_attributes__r(   r-   r*   r$   r$   ?   s    r-   r$   uric                 |    [         R                  " U 5      n[        R                  " UR	                  5       [
        S9$ )Ndefault_specification)httpxgetr   from_contentsjsonDEFAULT_SPEC)r9   responses     r*   _retrieve_via_httpxrC   L   s-    yy~H!!|= =r-   schemaschema_registry_clientref_registryreturnc                    Uc  [        [        S9nU R                  b  U R                   H  nUR                  UR                  UR
                  S5      n[        UR                  X5      n[        R                  " UR                  R                  5      n[        R                  " U[        S9nUR                  UR                  U5      nM     U$ )a  
Resolves named schemas referenced by the provided schema recursively.
:param schema: Schema to resolve named schemas for.
:param schema_registry_client: SchemaRegistryClient to use for retrieval.
:param ref_registry: Registry of named schemas resolved recursively.
:return: Registry
)retrieveTr;   )r   rC   
referencesget_versionsubjectversion_resolve_named_schemarD   r@   loads
schema_strr   r?   rA   with_resourcename)rD   rE   rF   refreferenced_schemareferenced_schema_dictresources          r*   rN   rN   R   s     )<=$$$C 6 B B3;;PSP[P[]a b01B1I1IKapL%)ZZ0A0H0H0S0S%T"--&lLH'55chhIL % r-   c                     ^  \ rS rSrSr/ SQrSSSSS\SS.r     SS\\	\
S4   S	\S
\\\\/\4      S\\   S\\   S\\   S\\   4U 4S jjjrSS\S\\   S\\   4S jjrS\
S\\\   \\   4   4S jrS\
S\S\S\4S jrSrU =r$ )JSONSerializerk   ao  
Serializer that outputs JSON encoded data with Confluent Schema Registry framing.

Configuration properties:

+-----------------------------+----------+----------------------------------------------------+
| Property Name               | Type     | Description                                        |
+=============================+==========+====================================================+
|                             |          | If True, automatically register the configured     |
| ``auto.register.schemas``   | bool     | schema with Confluent Schema Registry if it has    |
|                             |          | not previously been associated with the relevant   |
|                             |          | subject (determined via subject.name.strategy).    |
|                             |          |                                                    |
|                             |          | Defaults to True.                                  |
|                             |          |                                                    |
|                             |          | Raises SchemaRegistryError if the schema was not   |
|                             |          | registered against the subject, or could not be    |
|                             |          | successfully registered.                           |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to normalize schemas, which will           |
| ``normalize.schemas``       | bool     | transform schemas to have a consistent format,     |
|                             |          | including ordering properties and references.      |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to use the given schema ID for           |
| ``use.schema.id``           | int      | serialization.                                   |
|                             |          |                                                  |
+-----------------------------+----------+--------------------------------------------------+
|                             |          | Whether to use the latest subject version for      |
| ``use.latest.version``      | bool     | serialization.                                     |
|                             |          |                                                    |
|                             |          | WARNING: There is no check that the latest         |
|                             |          | schema is backwards compatible with the object     |
|                             |          | being serialized.                                  |
|                             |          |                                                    |
|                             |          | Defaults to False.                                 |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to use the latest subject version with     |
| ``use.latest.with.metadata``| dict     | the given metadata.                                |
|                             |          |                                                    |
|                             |          | WARNING: There is no check that the latest         |
|                             |          | schema is backwards compatible with the object     |
|                             |          | being serialized.                                  |
|                             |          |                                                    |
|                             |          | Defaults to None.                                  |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Callable(SerializationContext, str) -> str         |
|                             |          |                                                    |
| ``subject.name.strategy``   | callable | Defines how Schema Registry subject names are      |
|                             |          | constructed. Standard naming strategies are        |
|                             |          | defined in the confluent_kafka.schema_registry     |
|                             |          | namespace.                                         |
|                             |          |                                                    |
|                             |          | Defaults to topic_subject_name_strategy.           |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to validate the payload against the        |
| ``validate``                | bool     | the given schema.                                  |
|                             |          |                                                    |
+-----------------------------+----------+----------------------------------------------------+

Schemas are registered against subject names in Confluent Schema Registry that
define a scope in which the schemas can be evolved. By default, the subject name
is formed by concatenating the topic name with the message field (key or value)
separated by a hyphen.

i.e. {topic name}-{message field}

Alternative naming strategies may be configured with the property
``subject.name.strategy``.

Supported subject name strategies:

+--------------------------------------+------------------------------+
| Subject Name Strategy                | Output Format                |
+======================================+==============================+
| topic_subject_name_strategy(default) | {topic name}-{message field} |
+--------------------------------------+------------------------------+
| topic_record_subject_name_strategy   | {topic name}-{record name}   |
+--------------------------------------+------------------------------+
| record_subject_name_strategy         | {record name}                |
+--------------------------------------+------------------------------+

See `Subject name strategy <https://docs.confluent.io/current/schema-registry/serializer-formatter.html#subject-name-strategy>`_ for additional details.

Notes:
    The ``title`` annotation, referred to elsewhere as a record name
    is not strictly required by the JSON Schema specification. It is
    however required by this serializer in order to register the schema
    with Confluent Schema Registry.

    Prior to serialization, all objects must first be converted to
    a dict instance. This may be handled manually prior to calling
    :py:func:`Producer.produce()` or by registering a `to_dict`
    callable with JSONSerializer.

Args:
    schema_str (str, Schema):
        `JSON Schema definition. <https://json-schema.org/understanding-json-schema/reference/generic.html>`_
        Accepts schema as either a string or a :py:class:`Schema` instance.
        Note that string definitions cannot reference other schemas. For
        referencing other schemas, use a :py:class:`Schema` instance.

    schema_registry_client (SchemaRegistryClient): Schema Registry
        client instance.

    to_dict (callable, optional): Callable(object, SerializationContext) -> dict.
        Converts object to a dict.

    conf (dict): JsonSerializer configuration.
)_known_subjects_parsed_schema_ref_registry_schema
_schema_id_schema_name_to_dict_parsed_schemas_validators	_validate_json_encodeTFN)auto.register.schemasnormalize.schemasuse.schema.iduse.latest.versionuse.latest.with.metadatasubject.name.strategyr   rP   rE   to_dictconf	rule_confrule_registryjson_encodec                 B  > [         TU ]  5         [        U[        5      (       a  [	        USS9U l        O#[        U[        5      (       a  Xl        OS U l        U=(       d    [        R                  U l        X l	        U(       a  UO[        R                  " 5       U l        S U l        [        5       U l        [!        5       U l        [%        S5      U l        Ub  [)        U5      (       d  [+        S5      eX0l        U R.                  R1                  5       nUb  UR3                  U5        UR5                  S5      U l        [        U R6                  [8        5      (       d  [+        S5      eUR5                  S5      U l        [        U R:                  [8        5      (       d  [+        S5      eUR5                  S	5      U l        U R<                  b*  [        U R<                  [>        5      (       d  [+        S
5      eUR5                  S5      U l         [        U R@                  [8        5      (       d  [+        S5      eU R@                  (       a  U R6                  (       a  [+        S5      eUR5                  S5      U l!        U RB                  b*  [        U RB                  [D        5      (       d  [+        S5      eUR5                  S5      U l#        [)        U RF                  5      (       d  [+        S5      eUR5                  S5      U l$        [        U R:                  [8        5      (       d  [+        S5      e[K        U5      S:  a7  [+        SRM                  SRO                  URQ                  5       5      5      5      eU RS                  U R
                  5      u  pU	(       a  U	RU                  SS 5      nOS nXl+        Xl,        Xl-        U R                  R]                  5        HI  nUR_                  U R                  (       a  U R                  Ra                  5       O0 U(       a  UO0 5        MK     g )NJSONschema_type  zWto_dict must be callable with the signature to_dict(object, SerializationContext)->dictre   z-auto.register.schemas must be a boolean valuerf   z)normalize.schemas must be a boolean valuerg   z"use.schema.id must be an int valuerh   *use.latest.version must be a boolean valuez?cannot enable both use.latest.version and auto.register.schemasri   -use.latest.with.metadata must be a dict valuerj   &subject.name.strategy must be callabler    validate must be a boolean valuer   Unrecognized properties: {}, title)1super__init__
isinstancestrr   r]   r@   dumpsrd   	_registryr   get_global_instance_rule_registryr^   setrZ   r    ra   r
   rb   callable
ValueErrorr`   _default_confcopyupdatepop_auto_registerbool_normalize_schemas_use_schema_idint_use_latest_version_use_latest_with_metadatadict_subject_name_funcrc   lenformatjoinkeys_get_parsed_schemar>   r_   r[   r\   get_executors	configureconfig)r)   rP   rE   rk   rl   rm   rn   ro   	conf_copyschema_dictrF   schema_namerule	__class__s                r*   r}   JSONSerializer.__init__   s5    	j#&&!*&ADL
F++%LDL'54::/*M0P0P0R 	 "u02#D>x'8'8 K L L  &&++-	T"'mm,CD$--t44LMM"+--0C"D$11488HII'mmO<+t22C88ABB#,==1E#F $22D99IJJ##(;(;^__)27Q)R&**6t==tDDLMM"+--0G"H//00EFF"z2$11488?@@y>A:$fTYYy~~/?%@AC C %)$;$;DLL$I!%//'48KK'))''557DNNdnn4>>002"(19r; 8r-   objctxrG   c           
        ^^^ Uc  gU R                  X R                  5      nU R                  U5      nUb  UR                  U l        OX0R
                  ;  a  U R                  (       a7  U R                  R                  UU R                  U R                  5      U l        OBU R                  R                  UU R                  U R                  5      nUR                  U l        U R
                  R                  U5        U R                  b  U R                  X5      nOUnUb  UR                  nU R                  UR                  5      u  mm[         R"                  " T[$        S9nTR'                  U5      mUUU4S jn	U R)                  X#[*        R,                  SUR                  USU	5      nO%U R                  nU R.                  U R0                  smmU R2                  (       a%   U R5                  UTT5      n
U
R7                  U5        [?        5        nURA                  [B        RD                  " S[F        U R                  5      5        U RI                  U5      n[K        U[L        5      (       a  URO                  S5      nURA                  U5        URQ                  5       sSSS5        $ ! [8         a  n[;        UR<                  5      eSnAff = f! , (       d  f       g= f)a  
Serializes an object to JSON, prepending it with Confluent Schema Registry
framing.

Args:
    obj (object): The object instance to serialize.

    ctx (SerializationContext): Metadata relevant to the serialization
        operation.

Raises:
    SerializerError if any error occurs serializing obj.

Returns:
    bytes: None if obj is None, else a byte array containing the JSON
    serialized data with Confluent Schema Registry framing.
Nr;   c           	      $   > [        U TTTSX!5      $ N$	transform)rule_ctxfield_transformmsgparsed_schemarF   ref_resolvers      r*   <lambda>)JSONSerializer.__call__.<locals>.<lambda>s  s    (M<sTWir-   >bIutf8))r   r_   _get_reader_schema	schema_idr^   rZ   r   r   register_schemar]   r   lookup_schemaaddr`   rD   r   r   r?   rA   resolver_with_root_execute_rulesr   WRITEr[   r\   rc   _get_validatorr   r   r!   messager$   writestructpackr   rd   r~   r   encodegetvalue)r)   r   r   rL   latest_schemaregistered_schemavaluerD   root_resourcefield_transformer	validatorvefoencoded_valuer   rF   r   s                 @@@r*   __call__JSONSerializer.__call__=  sc   & ;))#/@/@A//8$+55DO000"" #'.."@"@AEAEAXAX#Z %)NN$@$@AEAEAXAX%Z! #4"="=  $$W-==$MM#+EE$"))F*.*A*A-BVBV*W'M<$22\CM'::=IL!k''hnnd(5(<(<eT(9;E \\F*.*=*=t?Q?Q'M<>>5 //|T	""5) 2HHV[[T__EF !--e4M--- - 4 4V <HH]#;;=   # 5(445  s%   $$J) BK)
K3KK
KrD   c                     Uc  gU R                   R                  U5      nUb  U$ [        XR                  5      n[        R
                  " UR                  5      nU R                   R                  XU45        XC4$ NNNra   get_parsed_schemarN   r   r@   rO   rP   r   r)   rD   resultrF   r   s        r*   r   !JSONSerializer._get_parsed_schema  o    >%%77?M,V^^D

6#4#45  )FG**r-   r   registryc                     U R                   R                  US 5      nUb  U$ [        U5      nUR                  U5        U" X#S9nX@R                   U'   U$ N)r   rb   r>   r   check_schemar)   rD   r   r   r   clss         r*   r   JSONSerializer._get_validator  \    $$((6	 M*'9	#, r-   )r   rd   rZ   r   r[   ra   r\   r   r   r]   r^   r_   r   r`   r   r   r   rc   rb   )NNNNNr'   )r3   r4   r5   r6   r7   	__slots__r   r   r   r   r   r   r   r	   objectr"   r   r   r}   bytesr   r   
JsonSchemar   r   r   r   r8   __classcell__r   s   @r*   rX   rX   k   sK   lZPI /3*/&*+015.I!%'M MQ#$(04*.V;#vt+,V; !5V; (F,@#A4#GHI	V;
 tnV; D>V;  -V; h'V; V;pP!F P!2F)G P!S[\aSb P!d+ +E(::NPXYaPb:b4c +
V 
J 
RZ 
_h 
 
r-   rX   c                     ^  \ rS rSrSr/ SQrSS\SS.r      SS\\	\
S4   S	\\\\/\4      S
\\   S\\   S\\   S\\   S\\   4U 4S jjjrSS\S\\   S\\\S4   4S jjrS\
S\\\   \\   4   4S jrS\
S\S\S\4S jrSrU =r$ )JSONDeserializeri  a  
Deserializer for JSON encoded data with Confluent Schema Registry
framing.

Configuration properties:

+-----------------------------+----------+----------------------------------------------------+
| Property Name               | Type     | Description                                        |
+=============================+==========+====================================================+
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to use the latest subject version for      |
| ``use.latest.version``      | bool     | deserialization.                                   |
|                             |          |                                                    |
|                             |          | Defaults to False.                                 |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to use the latest subject version with     |
| ``use.latest.with.metadata``| dict     | the given metadata.                                |
|                             |          |                                                    |
|                             |          | Defaults to None.                                  |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Callable(SerializationContext, str) -> str         |
|                             |          |                                                    |
| ``subject.name.strategy``   | callable | Defines how Schema Registry subject names are      |
|                             |          | constructed. Standard naming strategies are        |
|                             |          | defined in the confluent_kafka.schema_registry     |
|                             |          | namespace.                                         |
|                             |          |                                                    |
|                             |          | Defaults to topic_subject_name_strategy.           |
+-----------------------------+----------+----------------------------------------------------+
|                             |          | Whether to validate the payload against the        |
| ``validate``                | bool     | the given schema.                                  |
|                             |          |                                                    |
+-----------------------------+----------+----------------------------------------------------+

Args:
    schema_str (str, Schema, optional):
        `JSON schema definition <https://json-schema.org/understanding-json-schema/reference/generic.html>`_
        Accepts schema as either a string or a :py:class:`Schema` instance.
        Note that string definitions cannot reference other schemas. For referencing other schemas,
        use a :py:class:`Schema` instance.  If not provided, schemas will be
        retrieved from schema_registry_client based on the schema ID in the
        wire header of each message.

    from_dict (callable, optional): Callable(dict, SerializationContext) -> object.
        Converts a dict to a Python object instance.

    schema_registry_client (SchemaRegistryClient, optional): Schema Registry client instance. Needed if ``schema_str`` is a schema referencing other schemas or is not provided.
)_reader_schemar\   
_from_dictr]   ra   rb   rc   _json_decodeFNT)rh   ri   rj   r   rP   	from_dictrE   rl   rm   rn   json_decodec                   > [         TU ]  5         [        U[        5      (       a  [	        USS9nO_[        U[        5      (       a+  Un[        UR                  5      (       a  Uc  [        S5      eOUc  Uc  [        S5      eUnO[        S5      eXl	        X0l
        U(       a  UO[        R                  " 5       U l        [        5       U l        [!        S5      U l        U=(       d    [$        R&                  U l        S U l        U R,                  R/                  5       n	Ub  U	R1                  U5        U	R3                  S5      U l        [        U R4                  [
        5      (       d  [        S5      eU	R3                  S	5      U l        U R6                  b*  [        U R6                  [8        5      (       d  [        S
5      eU	R3                  S5      U l        [=        U R:                  5      (       d  [        S5      eU	R3                  S5      U l        [        U R>                  [
        5      (       d  [        S5      e[A        U	5      S:  a7  [        SRC                  SRE                  U	RG                  5       5      5      5      eU(       a)  U RI                  U R                  5      u  U l%        U l&        OSu  U l%        U l&        Ub  [=        U5      (       d  [        S5      eX l'        U R                  RQ                  5        HI  n
U
RS                  U R                  (       a  U R                  RU                  5       O0 U(       a  UO0 5        MK     g )Nrq   rr   z\schema_registry_client must be provided if "schema_str" is a Schema instance with referenceszGschema_registry_client must be provided if "schema_str" is not providedz"You must pass either str or Schemart   rh   ru   ri   rv   rj   rw   r   rx   r   ry   rz   r   z]from_dict must be callable with the signature from_dict(dict, SerializationContext) -> object)+r|   r}   r~   r   r   r   rJ   r   	TypeErrorr]   r   r   r   r   r    ra   r
   rb   r@   rO   r   r   r   r   r   r   r   r   r   r   r   rc   r   r   r   r   r   r   r\   r   r   r   r   )r)   rP   r   rE   rl   rm   rn   r   rD   r   r   r   s              r*   r}   JSONDeserializer.__init__  s    	j#&&JF;F
F++FF%%&&+A+I vx x%- a   F@AA//<m,BbBbBd02#D>'54::"&&++-	T"#,==1E#F $22D99IJJ)27Q)R&**6t==tDDLMM"+--0G"H//00EFF"z2$..$//?@@y>A:$fTYYy~~/?%@AC C 6:6M6Mdll6[3D!36@3D!3 ))<)< P Q Q $''557DNNdnn4>>002"(19r; 8r-   datar   rG   c                   ^^^ Uc  g[        U5      S::  a#  [        SR                  [        U5      5      5      eU R                  US5      nSnUb  U R                  b  U R                  U5      n[        U5       n[        R                  " SUR                  S5      5      u  pgU[        :w  a  [        SR                  U5      5      eU R                  UR                  5       5      nU R                  bf  U R                  R                  U5      n	U R                  U	5      u  pUc4  U R                  X*R                  S5      5      nUb  U R                  U5      nOSn	Su  pUb>  U R                  X9US5      nUR                   nU R                  UR                   5      u  mmO=U R"                  b(  SnU R"                  nU R$                  U R&                  smmOSnU	nXsmmU(       a  U R)                  X#X5      n[*        R,                  " T[.        S9nTR1                  U5      mUUU4S	 jnU R3                  X#[4        R6                  SXSU5      nU R8                  (       a%   U R;                  UTT5      nUR=                  U5        U RB                  b  U RC                  X5      sSSS5        $ UsSSS5        $ ! [>         a  n[        UR@                  5      eSnAff = f! , (       d  f       g= f)
aK  
Deserialize a JSON encoded record with Confluent Schema Registry framing to
a dict, or object instance according to from_dict if from_dict is specified.

Args:
    data (bytes): A JSON serialized record with Confluent Schema Registry framing.

    ctx (SerializationContext): Metadata relevant to the serialization operation.

Returns:
    A dict, or object instance according to from_dict if from_dict is specified.

Raises:
    SerializerError: If there was an error reading the Confluent framing data, or
       if ``data`` was not successfully validated with the configured schema.
N   zExpecting data framing of length 6 bytes or more but total data size is {} bytes. This message was not produced with a Confluent Schema Registry serializerr   zcUnexpected magic byte {}. This message was not produced with a Confluent Schema Registry serializerr{   r   r;   c           	      $   > [        U TTTSX!5      $ r   r   )r   r   r   reader_ref_registryreader_ref_resolverreader_schemas      r*   r   +JSONDeserializer.__call__.<locals>.<lambda>w  s    (M3FH[w9r-   )"r   r!   r   r   r   r   r$   r   unpackreadr   r   
get_schemar   r>   _get_migrationsrD   r]   r   r\   _execute_migrationsr   r?   rA   r   r   r   READrc   r   r   r   r   r   )r)   r   r   rL   r   payloadmagicr   obj_dictwriter_schema_rawwriter_schemawriter_ref_registry
migrationsreader_schema_rawreader_root_resourcer   r   r   r   r   r   s                     @@@r*   r   JSONDeserializer.__call__/  s   $ <t9>$ &B CI&TBSU U
 ))#t44>>#= 33G<Md#w%}}UGLLODE#( *FFLfUmU U
 ((8H~~)$(NN$=$=i$H!595L5LM^5_2?"55c;L;LW;UVG*(,(?(?(H$(!5?2(!11'm]ab
$1$8$8!595L5L]MaMa5b22)!
$(LL!595H5H$J\J\22!
$5!5B2233C*W#+#9#9\$C "5"H"HI]"^!: **3+<+<>H ~~9 $ 3 34E}Vi jI&&x0 *x5o $#r s $#f ' 9,RZZ889g $#s7   :G#K$J4K)K4
K>KKK
K)rD   c                     Uc  gU R                   R                  U5      nUb  U$ [        XR                  5      n[        R
                  " UR                  5      nU R                   R                  XU45        XC4$ r   r   r   s        r*   r   #JSONDeserializer._get_parsed_schema  r   r-   r   r   c                     U R                   R                  US 5      nUb  U$ [        U5      nUR                  U5        U" X#S9nX@R                   U'   U$ r   r   r   s         r*   r   JSONDeserializer._get_validator  r   r-   )r   r   ra   r   r\   r   r   r]   r   r   r   r   rc   rb   )NNNNNNr'   )r3   r4   r5   r6   r7   r   r   r   r   r   r   r   r	   r   r"   r   r   r   r}   r   r   r   r   r   r   r   r   r8   r   r   s   @r*   r   r     sS   /bPI ,115.I!%'M OSAE#$(04*.I;#vt+,I; Hd,@%A6%IJKI; !))= >	I;
 tnI; D>I;  -I; h'I; I;VYU Y2F)G YSXY]_egkYkSl Yv+ +E(::NPXYaPb:b4c +
V 
J 
RZ 
_h 
 
r-   r   r   r   pathr   r   c                    Ub  Ub  [        U[        5      (       a  U$ U R                  5       nUb  [        U5      Ul        UR                  S5      nUb  [        XU5      n	U	b  [        X	X#XEU5      $ UR                  S5      n
U
b  [        XU5      n	U	b  [        X	X#XEU5      $ UR                  S5      nUb  [        XU5      n	U	b  [        X	X#XEU5      $ UR                  S5      nUb4  [        U[        5      (       a  U Vs/ s H  n[        XX#XMU5      PM     sn$ UR                  S5      nUb)  UR                  U5      n[        XR                  X#XEU5      $ [        U5      nU[        R                  :X  a@  UR                  S5      nUb*  UR                  5        H  u  nn[        XUUUX#U5        M     U$ U[        R                  [        R                   [        R"                  [        R$                  [        R&                  4;   aM  UbJ  U R(                  R*                  nU(       a$  [-        [/        U5      UR*                  5      (       d	  U" XU5      $ U$ s  snf )NallOfanyOfoneOfitemsz$ref
properties)r~   r   current_fieldget_type
field_typer>   _validate_subschemasr   listlookupcontentsr   RECORDr  _transform_fieldENUMSTRINGINTDOUBLEBOOLEANr   tags	_disjointr   )r   rD   rF   r   r  r   r   	field_ctxall_of	subschemaany_ofone_ofr  itemrS   
ref_schemars   props	prop_nameprop_schema	rule_tagss                        r*   r   r     s5    &.Jvt,D,D!!#I'/	ZZ F(,G	 S\XghhZZ F(,G	 S\XghhZZ F(,G	 S\XghhJJwEgt$$ovwovgkIc,dRabovww
**V
C
!((-
11<t^mnn6"Ki&&&

<(*/++-&	; Iw!,l/[ +8 y~~y'7'7	HXHXZcZkZkll IIc)ninn$M$M&sw??N% xs   Ir*  r+  c           	      `   US-   U-   n U R                  UUU[        U5      [        U5      5        X2   n	[        XXVXU5      n
U R                  R
                  [        R                  :X  a  U
SL a  [        U R                  5      eOXU'   U R                  5         g ! U R                  5         f = f)N.F)
enter_fieldr  get_inline_tagsr   r   kindr   	CONDITIONr   
exit_field)r   r  r*  r   r+  rF   r   r   	full_namer   	new_values              r*   r  r    s     s
Y&I[!K(	
 "cI^mn	88==H...E!(22 " "+Is   B B B-
subschemasr   c                 R    U  H  n [        XUS9  Us  $    g ! [         a     M"  f = f)N)instancerD   r   r   )r6  r   r   r$  s       r*   r  r    s<    
  		g(K     		s   
&&c                    [        U [        5      (       a  [        R                  $ [        U [        5      (       a  U R                  S5      nOU nU R                  S5      c  U R                  S5      b  [        R                  $ US:X  a8  U R                  S5      nU(       d  [        R                  $ [        R                  $ US:X  a  [        R                  $ US:X  a  [        R                  $ US:X  a  [        R                  $ US	:X  a  [        R                  $ US
:X  a  [        R                  $ US:X  a  [        R                  $ [        R                  $ )Ntypeconstenumr   r  arraystringintegernumberbooleannull)r~   r  r   COMBINEDr   r>   r  MAPr  ARRAYr  r  r  r  NULL)rD   rs   r)  s      r*   r  r    s   &$!!!	FD	!	!jj( zz'&&**V*<*H~~h

<(== ghi}}hi   f~~>>r-   tags1tags2c                 $    U  H
  nX!;   d  M
    g   g)NFTr(   )rG  rH  tags      r*   r!  r!    s    <  r-   c                 T    U R                  S5      nUc
  [        5       $ [        U5      $ )Nzconfluent:tags)r>   r   )rD   r   s     r*   r0  r0  !  s'    ::&'D|u4yr-   r'   )Edecimalior   r@   r   typingr   r   r   r   r   r	   r=   referencing
cachetoolsr
   
jsonschemar   r   jsonschema.protocolsr   jsonschema.validatorsr   r   r   referencing._corer   confluent_kafka.schema_registryr   r   r   r   r   r   -confluent_kafka.schema_registry.rule_registryr   %confluent_kafka.schema_registry.serder   r   r   r   r   r   r    confluent_kafka.serializationr!   r"   r   floatr   Decimalr   r  r   JsonMessager   DRAFT7rA   r$   rC   rN   rX   r   r   r  r  r  r!  r0  r(   r-   r*   <module>r]     s  $     > >    0 * / * &M M
 G* * *A 	OO
	 4:
%%,,
w 
=S = (,,@8$ 2|^ |~	x' xv-	-(-8@-PX-
-#-6D- k-`	,/:E+3CK^l0Z   j	Z I >SX c#h 4 J 3s8 r-   