ɺh%!DdZddlmZddlmZdZGddeZdS)z7Contains _ExtensionDict class to represent extensions. ) type_checkers)FieldDescriptorc Lt|tstd|z|jstd|jz|jstd|jz|j|jur2td|jd|jjd|jjddS) z0Verify that the given extension handle is valid.z3HasExtension() expects an extension handle, got: %sz"%s" is not an extension.z""%s" is missing a containing_type.z Extension "z" extends message type "z ", but this message is of type "z".N) isinstancerKeyError is_extension full_namecontaining_type DESCRIPTOR)messageextension_handles /builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib64/python3.11/site-packages/google/protobuf/internal/extension_dict.py_VerifyExtensionHandler&s $o 6 6% H#$ % %%  &M .1A1KK L LL  )1 7%/0 1 11%W-??? ($...$4>>>&000 2 3 33@?cZeZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdS)_ExtensionDictzDict-like container for Extension fields on proto instances. Note that in all cases we expect extension handles to be FieldDescriptors. c||_dS)z^ Args: extended_message: Message instance for which we are the Extensions dict. N)_extended_message)selfextended_messages r__init__z_ExtensionDict.__init__Gs .Drct|j||jj|}||S|jt jkr||j}n|jt j kr|j }t|dsddl m }||t|j dds Jd|jd|j jd|j } ||jjn#t($rYn wxYw|jS|jj||}|S)z8Returns the current value of the given extension handle.N_concrete_classr)message_factoryz-Uninitialized concrete class found for field z (message type ))rr_fieldsgetlabelrLABEL_REPEATED_default_constructorcpp_typeCPPTYPE_MESSAGE message_typehasattrgoogle.protobufrGetMessageClassgetattrr r _SetListener_listener_for_childrenReferenceError default_value setdefault)rr resultr#rs r __getitem__z_ExtensionDict.__getitem__Ns413CDDD  # + / /0@ A AF  m!???44T5KLLff  "o&E E E%2l \#4 5 56333333'' 555 %24Et L L777  ' ' '  * 4 4 4 677 L ,<<>>f D2IJJJJ       ++ # + 6 6&""F MsD D-,D-ct||jsdS|j}|j}d|D}d|D}||kS)NFc g|] }|j | Sr.0fields r z)_ExtensionDict.__eq__..s DDD51CDDDDrc g|] }|j | Sr1r2r3s rr6z)_ExtensionDict.__eq__..s JJJeu7IJEJJJr)r __class__r ListFields)rother my_fields other_fieldss r__eq__z_ExtensionDict.__eq__xsw eT^ , , U&1133I*5577LEDIDDDIJJ|JJJL  $$rc||k SNr1)rr:s r__ne__z_ExtensionDict.__ne__su} rcj|j}d|D}t|S)Nc,g|]}|dj|S)rr2r3s rr6z*_ExtensionDict.__len__..s$KKK%U1X5JKKKKr)rr9len)rfieldsextension_fieldss r__len__z_ExtensionDict.__len__s9  # . . 0 0FKK6KKK   rc td)Nzunhashable object) TypeErrorrs r__hash__z_ExtensionDict.__hash__s ' ( ((rcPt|j||jtjks|jtjkrtd|jztj |}| ||jj |<|j dS)zlIf extension_handle specifies a non-repeated, scalar extension field, sets the value of that field. zKCannot assign to extension "%s" because it is a repeated or composite type.N)rrrrrr!r"rHr rGetTypeChecker CheckValuer _Modified)rr value type_checkers r __setitem__z_ExtensionDict.__setitem__s 413CDDD/"@@@!_%DDD  .8 9 : :: !/0@AAL && "#34$$&&&&&rc:|j|dSr?)rClearExtension)rr s r __delitem__z_ExtensionDict.__delitem__s ))*:;;;;;rcB|jj|dS)zTries to find a known extension with the specified name. Args: name: Extension full name. Returns: Extension field descriptor. N)r_extensions_by_namer)rnames r_FindExtensionByNamez#_ExtensionDict._FindExtensionByNames   ! 5 9 9$ E EErcB|jj|dS)zTries to find a known extension with the field number. Args: number: Extension field number. Returns: Extension field descriptor. N)r_extensions_by_numberr)rnumbers r_FindExtensionByNumberz%_ExtensionDict._FindExtensionByNumbers   ! 7 ; ;FD I IIrcHd|jDS)Nc3@K|]}|dj|dVdS)rNr2)r4fs r z*_ExtensionDict.__iter__..sE " "Qt  "AaD " " " " " "r)rr9rIs r__iter__z_ExtensionDict.__iter__s1 " "$0;;== " " ""rcPt|j|||jjvrdS|jtjkr,t |jj|S|jtj kr*|jj|}|duo|j SdS)NFT) rrrrrrboolrr!r"_is_present_in_parent)rr rOs r __contains__z_ExtensionDict.__contains__s413CDDDt5=== U!??? $(0445EFF G GG O$CCC$,001ABBe $  >5#>> 4rN)__name__ __module__ __qualname____doc__rr.r=r@rFrJrQrTrXr\rarer1rrrr?s ...(((T % % %!!! )))'''*<<< F F F J J J""" rrN)rigoogle.protobuf.internalrgoogle.protobuf.descriptorrrobjectrr1rrrms>3222226666663332WWWWWVWWWWWr