hfdZdZddlZddlZddlmZddlmZddlmZejZdZ dZ d Z d Z Gd d e Zd Zer ejjZn eZdZdS)aKProvides DescriptorPool to use as a container for proto2 descriptors. The DescriptorPool is used in conjection with a DescriptorDatabase to maintain a collection of protocol buffer descriptors for use when dynamically creating message types at runtime. For most applications protocol buffers should be used via modules generated by the protocol buffer compiler tool. This should only be used when the type of protocol buffers used in an application or library cannot be predetermined. Below is a straightforward example on how to use this class:: pool = DescriptorPool() file_descriptor_protos = [ ... ] for file_descriptor_proto in file_descriptor_protos: pool.Add(file_descriptor_proto) my_message_descriptor = pool.FindMessageTypeByName('some.package.MessageType') The message descriptor can be used in conjunction with the message_factory module in order to create a protocol buffer class that can be encoded and decoded. If you want to get a Python class for the specified proto, use the helper functions inside google.protobuf.message_factory directly instead of this class. z"matthewtoia@google.com (Matt Toia)N) descriptor)descriptor_database) text_encodingcfd}j|_j|_|jj|S)zMark functions as deprecated.cZtjdjzt|i|S)NzCall to deprecated function %s(). Note: Do add unlinked descriptors to descriptor_pool is wrong. Use Add() or AddSerializedFile() instead.)category)warningswarn__name__DeprecationWarning)argskwargsfuncs /builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/google/protobuf/descriptor_pool.pyNewFuncz_Deprecated..NewFuncJsG M ] #$ %%%% 4   )r __doc____dict__update)rrs` r _DeprecatedrGsO!!!!!]'L'/ $-((( .rc,|dS)aIRemove leading period from fully-qualified type name. Due to b/13860351 in descriptor_database.py, types in the root namespace are generated with a leading period. This function removes that prefix. Args: name (str): The fully-qualified symbol name. Returns: str: The normalized fully-qualified symbol name. .)lstripnames r_NormalizeFullyQualifiedNamerWs S  rc>|dr|jSdS)zCReturns the value of the field `options`, or None if it is not set.optionsN)HasFieldr)descriptor_protos r_OptionsOrNoner!fs&y))  ## 4rc|jo]|jjoQ|jjo3|jt jjko|j t jj kSN) is_extensioncontaining_type has_options GetOptionsmessage_set_wire_formattyperFieldDescriptor TYPE_MESSAGElabelLABEL_OPTIONAL)fields r_IsMessageSetExtensionr/nsh   C   + C   * * , , D C * 2? ? C +3B B DrczeZdZdZerd.dZ d/dZdZdZdZ e d Z d Z e d Z d Ze d ZdZe dZdZe dZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$ d0d#Z% d1d$Z& d2d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d.d,Z.d-Z/dS)3DescriptorPoolzGA collection of protobufs dynamically constructed by descriptor protos.Nc@tj|Sr#)r_messager1)cls descriptor_dbs r__new__zDescriptorPool.__new__{s   . .} = ==rFctj|_||_i|_i|_i|_i|_i|_i|_ tj t|_ tj t|_dS)aLInitializes a Pool of proto buffs. The descriptor_db argument to the constructor is provided to allow specialized file descriptor proto lookup code to be triggered on demand. An example would be an implementation which will read and compile a file specified in a call to FindFileByName() and not require the call to Add() at all. Results from this database will be cached internally here as well. Args: descriptor_db: A secondary source of file descriptors. use_deprecated_legacy_json_field_conflicts: Unused, for compatibility with C++. N)rDescriptorDatabase _internal_db_descriptor_db _descriptors_enum_descriptors_service_descriptors_file_descriptors_toplevel_extensions_top_enum_values collections defaultdictdict_extensions_by_name_extensions_by_number)selfr5*use_deprecated_legacy_json_field_conflictss r__init__zDescriptorPool.__init__s{",>@@D'DDD "DD "DD +6t<!>Drc|jtjf|jtjf|jtjf|jtjf|j tj ffD]\}}||vr||}t|tj r|j j j}n |j j}t||r||krBd|zdz|zdz|zdz}t|tj r|dz }t|dSdS)aCheck if the descriptor name conflicts with another of the same name. Args: desc: Descriptor of a message, enum, service, extension or enum value. desc_name (str): the full name of desc. file_name (str): The file name of descriptor. zConflict register for file "z": z is already defined in file "zo". Please fix the conflict by adding package name on the proto file, or use different name for the duplication.zQ Note: enum values appear as siblings of the enum type instead of children of it.N)r;r Descriptorr<EnumDescriptorr=ServiceDescriptorr?r*r@EnumValueDescriptor isinstancer)filer TypeError) rFdesc desc_name file_nameregisterdescriptor_typeold_descold_file error_msgs r_CheckConflictRegisterz%DescriptorPool._CheckConflictRegistersE  J12 !:; "J$@A "J$>?  >? &A!/ h  I& h > ? ? (]',((]'($00 %  ! !5 A()67  #33) j< = = - , -I)$$ $-  rc:|j|dS)zAdds the FileDescriptorProto and its types to this pool. Args: file_desc_proto (FileDescriptorProto): The file descriptor to add. N)r9Add)rFfile_desc_protos rr[zDescriptorPool.Adds! /*****rc~ddlm}|j|}||}||_|S)aAdds the FileDescriptorProto and its types to this pool. Args: serialized_file_desc_proto (bytes): A bytes string, serialization of the :class:`FileDescriptorProto` to add. Returns: FileDescriptor: Descriptor for the added file. r)descriptor_pb2)google.protobufr^FileDescriptorProto FromString!_ConvertFileProtoToFileDescriptor serialized_pb)rFserialized_file_desc_protor^r\ file_descs rAddSerializedFilez DescriptorPool.AddSerializedFilesR/.....$8CC"$$O66GGI8I rc0||dSr#)_AddDescriptorrFrQs r AddDescriptorzDescriptorPool.AddDescriptorsrct|tjstd|||j|jj||j|j<| |jdS)aAdds a Descriptor to the pool, non-recursively. If the Descriptor contains nested messages or enums, the caller must explicitly register them. This method also registers the FileDescriptor associated with the message. Args: desc: A Descriptor. z+Expected instance of descriptor.Descriptor.N) rNrrJrPrY full_namerOrr;_AddFileDescriptorris rrhzDescriptorPool._AddDescriptorsr dJ1 2 2E C D DDdndinEEE(,Ddn%DI&&&&&rc0||dSr#)_AddEnumDescriptor)rF enum_descs rAddEnumDescriptorz DescriptorPool.AddEnumDescriptorsI&&&&&rct|tjstd|jj}|||j|||j|j<|jj r?|j d|jj dz dk}n|j ddk}|rl|jj}|jj }|j D]L}td ||jf}||||||j|<M||jdS)zAdds an EnumDescriptor to the pool. This method also registers the FileDescriptor associated with the enum. Args: enum_desc: An EnumDescriptor. z/Expected instance of descriptor.EnumDescriptor.rrN)rNrrKrPrOrrYrlr<packagecountvaluesrjoinr@rm)rFrprS top_levelrt enum_valuerls rroz!DescriptorPool._AddEnumDescriptors\ i!: ; ;I G H HH#I 9+> JJJ2;D9./ ~6&,,S11^+11#667:;s y*"< = =;  "; 9 : :: ( !! Y().*=???7@d 34 E0  #%%.%57m - ' ' $  -"9  & 0)2B D DEE E (     d & y89 ) Y67i((8.7 y89  *,,,88s.B?? C  C c0||dSr#)_InternalAddFileDescriptorrFres rAddFileDescriptorz DescriptorPool.AddFileDescriptorjs##I.....rc0||dS)Adds a FileDescriptor to the pool, non-recursively. If the FileDescriptor contains messages or enums, the caller must explicitly register them. Args: file_desc: A FileDescriptor. N)rmrs rrz)DescriptorPool._InternalAddFileDescriptoros I&&&&&rcvt|tjstd||j|j<dS)rz/Expected instance of descriptor.FileDescriptor.N)rNrFileDescriptorrPr>rrs rrmz!DescriptorPool._AddFileDescriptor{s> i!: ; ;I G H HH-6D9>***rc> |j|S#t$rYnwxYw |j|}n;#t$r.}|jr|j|}n|Yd}~nd}~wwxYw|std|z||S)aGets a FileDescriptor by file name. Args: file_name (str): The path to the file to get a descriptor for. Returns: FileDescriptor: The descriptor for the named file. Raises: KeyError: if the file cannot be found in the pool. NzCannot find a file named %s)r>rr9FindFileByNamer:rb)rFrS file_protoerrors rrzDescriptorPool.FindFileByNames  #I ..     d $33I>>jj  (77 BB     @ 2Y> ? ??  1 1* = ==s!  ; A3$A..A3ct|} ||S#t$rYnwxYw ||||S#t$rtd|zwxYw)a;Gets the FileDescriptor for the file containing the specified symbol. Args: symbol (str): The name of the symbol to search for. Returns: FileDescriptor: Descriptor for the file that contains the specified symbol. Raises: KeyError: if the file cannot be found in the pool. Cannot find a file containing %s)r!_InternalFindFileContainingSymbolr_FindFileContainingSymbolInDb)rFsymbols rFindFileContainingSymbolz'DescriptorPool.FindFileContainingSymbols*& 1 1F  3 3F ; ;;     d B ((000  3 3F ; ;; BBB 7&@ A AABs& 33)A!!A>c^ |j|jS#t$rYnwxYw |j|jS#t$rYnwxYw |j|jS#t$rYnwxYw |j|jjS#t$rYnwxYw |j|jS#t$rYnwxYw|d\}}} | |}||j vs||j vs ||j vsJ|jS#ttf$rtd|zwxYw)a<Gets the already built FileDescriptor containing the specified symbol. Args: symbol (str): The name of the symbol to search for. Returns: FileDescriptor: Descriptor for the file that contains the specified symbol. Raises: KeyError: if the file cannot be found in the pool. rr)r;rOrr<r=r@r)r? rpartitionFindMessageTypeByNameextensions_by_namefields_by_nameenum_values_by_namer)rFrtop_name_sub_namemessages rrz0DescriptorPool._InternalFindFileContainingSymbols  v & ++     d   #F + 00     d   &v . 33     d   "6 * / 44     d   &v . 33     d #--c22HaB**844g'444'000'55556\ n %BBB 7&@ A AABs] !!7 AAA A'&A'+B BBB%% B21B28D$D,cvt|}||jvr|||j|S)aLoads the named descriptor from the pool. Args: full_name (str): The full name of the descriptor to load. Returns: Descriptor: The descriptor for the named type. Raises: KeyError: if the message cannot be found in the pool. )rr;rrFrls rrz$DescriptorPool.FindMessageTypeByNamesA-Y77I))) ((333  Y ''rcvt|}||jvr|||j|S)aLoads the named enum descriptor from the pool. Args: full_name (str): The full name of the enum descriptor to load. Returns: EnumDescriptor: The enum descriptor for the named type. Raises: KeyError: if the enum cannot be found in the pool. )rr<rrs rFindEnumTypeByNamez!DescriptorPool.FindEnumTypeByNamesA-Y77I... ((333  !) ,,rct|}|d\}}}||}|j|S)aLoads the named field descriptor from the pool. Args: full_name (str): The full name of the field descriptor to load. Returns: FieldDescriptor: The field descriptor for the named field. Raises: KeyError: if the field cannot be found in the pool. r)rrrr)rFrl message_namer field_namemessage_descriptors rFindFieldByNamezDescriptorPool.FindFieldByNameM-Y77I"+"6"6s";";L!Z33LAA  ,Z 88rct|}|d\}}}||}|j|S)aLoads the named oneof descriptor from the pool. Args: full_name (str): The full name of the oneof descriptor to load. Returns: OneofDescriptor: The oneof descriptor for the named oneof. Raises: KeyError: if the oneof cannot be found in the pool. r)rrroneofs_by_name)rFrlrr oneof_namers rFindOneofByNamezDescriptorPool.FindOneofByName'rrc t|} |j|S#t$rYnwxYw|d\}}} ||}n%#t$r||}YnwxYw|j|S)a+Loads the named extension descriptor from the pool. Args: full_name (str): The full name of the extension descriptor to load. Returns: FieldDescriptor: The field descriptor for the named extension. Raises: KeyError: if the extension cannot be found in the pool. r)rr?rrrrr)rFrlrrextension_namescopes rFindExtensionByNamez"DescriptorPool.FindExtensionByName8s-Y77I  &y 11     d &/&:&:3&?&?#L!^<((66ee <<<00;;eee<  #N 33s  ++AB?Bc |j||S#t$r,||||j||cYSwxYw)aGets the extension of the specified message with the specified number. Extensions have to be registered to this pool by calling :func:`Add` or :func:`AddExtensionDescriptor`. Args: message_descriptor (Descriptor): descriptor of the extended message. number (int): Number of the extension field. Returns: FieldDescriptor: The descriptor for the extension. Raises: KeyError: when no extension with the given number is known for the specified message. )rEr_TryLoadExtensionFromDB)rFrrs rFindExtensionByNumberz$DescriptorPool.FindExtensionByNumberVsl"D  '(: ;F CC DDD ""#5v>>>  '(: ;F CCCCDs3A  A c*|jrat|jdrL|j}|j|}|D](}||j|vr|||)t |j|S)a[Gets all the known extensions of a given message. Extensions have to be registered to this pool by build related :func:`Add` or :func:`AddExtensionDescriptor`. Args: message_descriptor (Descriptor): Descriptor of the extended message. Returns: list[FieldDescriptor]: Field descriptors describing the extensions. FindAllExtensionNumbers)r:hasattrrlrrErlistrv)rFrrl all_numbersrs rFindAllExtensionsz DescriptorPool.FindAllExtensionsms Aw 6 8 8A$.i'?? JJkAA& T/0BC C C  $$%7@@@@ *+=>EEGG H HHrc|jsdSt|jdsdS|j}|j||}|dS ||dS#d|j|fz}t j|tYdSxYw)zTry to Load extensions from descriptor db. Args: message_descriptor: descriptor of the extended message. number: the extension number that needs to be loaded. NFindFileContainingExtensionz5Unable to load proto file %s for extension number %d.) r:rrlrrbrr r RuntimeWarning)rFrrrlrwarn_msgs rrz&DescriptorPool._TryLoadExtensionFromDBs    f  : < <  f",I$@@6J f. ,,Z88888.I?F+,hmHn------s A(B cvt|}||jvr|||j|S)a'Loads the named service descriptor from the pool. Args: full_name (str): The full name of the service descriptor to load. Returns: ServiceDescriptor: The service descriptor for the named service. Raises: KeyError: if the service cannot be found in the pool. )rr=rrs rFindServiceByNamez DescriptorPool.FindServiceByNamesA-Y77I111 ((333  $Y //rct|}|d\}}}||}|j|S)a+Loads the named service method descriptor from the pool. Args: full_name (str): The full name of the method descriptor to load. Returns: MethodDescriptor: The method descriptor for the service method. Raises: KeyError: if the method cannot be found in the pool. r)rrrmethods_by_name)rFrl service_namer method_nameservice_descriptors rFindMethodByNamezDescriptorPool.FindMethodByNamesM-Y77I#,#7#7#<#< L![// ==  -k ::rc |j|}n;#t$r.}|jr|j|}n|Yd}~nd}~wwxYw|std|z||S)a0Finds the file in descriptor DB containing the specified symbol. Args: symbol (str): The name of the symbol to search for. Returns: FileDescriptor: The file that contains the specified symbol. Raises: KeyError: if the file cannot be found in the descriptor database. Nr)r9rrr:rb)rFrrrs rrz,DescriptorPool._FindFileContainingSymbolInDbs$==fEEjj  (AA&II     B 7&@ A AA  1 1* = ==s A$AAc |jjvrt|j}fd|jDfd|jD}t j|j|j|j t|| |t j  }i}|D]w}| |j| d|jDx|jD]4}||j|||j }||j|j<5|jD].} | |j|d|d|j| j</t-|jD]v\} } | |j| |d} |j| j|| _| | |j|| |j| j<w|jD]} |j| ||jrt?|j}nd}|jD]-} || j|}||j| j<.t-|j D]0\} }!|| ||j||j"|j<1|j|j<j|j}|jD]}#||jD]!}|j$D]}#|"|S) aDCreates a FileDescriptor from a proto or returns a cached copy. This method also has the side effect of loading all the symbols found in the file into the appropriate dictionaries in the pool. Args: file_proto: The proto to convert. Returns: A FileDescriptor matching the passed in proto. c:g|]}|S)r).0nrFs r zDDescriptorPool._ConvertFileProtoToFileDescriptor..s'KKKT((++KKKrc g|] }| Srr)ri direct_depss rrzDDescriptorPool._ConvertFileProtoToFileDescriptor..sJJJ[^JJJr) poolrrtsyntaxrrc dependenciespublic_dependencies create_keyc3BK|]}t|j|fVdSr#)_PrefixWithDotrl)renums r zCDescriptorPool._ConvertFileProtoToFileDescriptor..sMII%T^44d;IIIIIIrNTr$)%rr>r_GetDeps dependencypublic_dependencyrrrtrr!SerializeToString_internal_create_keyr_ExtractSymbolsmessage_types_by_namervenum_types_by_namer_ConvertMessageDescriptor enum_type_ConvertEnumDescriptor enumerater_MakeFieldDescriptor_GetTypeFromScopeextendeer% _SetFieldTyper_SetAllFieldTypesrservice_MakeServiceDescriptorservices_by_namer extensions)rFr built_deps public_depsfile_descriptorrrr message_descrindexextension_protoextension_desc desc_protodesc_proto_prefixrQ service_protorerrs` @rrbz0DescriptorPool._ConvertFileProtoToFileDescriptorsMd444 j&;<<==jKKKKZ5JKKKkJJJJZ-IJJJk"1$" ,,"4466")4 6 6 6oe #II* T))  , 3 3 5 577 8 8 8 II!+!>!E!E!G!GIII I I I I%1,55 *,ou     -l.?@@"+MM)  ' ' :3E(7ud L L *9>::%.j.B$C$C   %22 Z/3*.)?)?  #_%=u*F*F& ?N*2E ; ; ;  *>+>??#/FF* z1:uEEEE  *:+=>>"/FF*%% z77AE-jo>>"+J,>"?"?NN %  ' ' ue(2(:O M M ();<<1@dZ_-&z7I188::..  ""9----!7>>@@00 #.00) $$Y////0 rc0|rd||jfn|jd}nj}ifd|jD}fd|jD}fdt |jD} fdt |jD} fdt |jD} d|jD} | rd } nd } tj did |jd d |ddd| d| d|d|d| dt|d| d| dddddddtj }|j D] }||_ |jD] }||_ t |jD]Z\}}|dr@|j}| |j| || || |_[|t+<||j|jj|j<|S)aAdds the proto to the pool in the specified package. Args: desc_proto: The descriptor_pb2.DescriptorProto protobuf message. package: The package the proto should be located in. file_desc: The file containing this message. scope: Dict mapping short and full symbols to message and enum types. syntax: string indicating syntax of the file ("proto2" or "proto3") Returns: The added descriptor. rNc Bg|]}|Sr)r)rnestedrRrerrFrs rrz.SsF...  && Iy% 9 9...rc Dg|]}|ddSNF)r)rrrRrerrFs rrz.WsH * * *  ##D)Y$)5 2 2 * * *rcFg|]\}}||Srr)rrr.rRrerFs rrz.[sA???%''y%KK???rc Jg|]\}}||d S)Trr)rrrrRrerFs rrz.]sUAAA E9 !!)Yy/3 " 5 5AAArc g|]V\}}tj|jd|jf|dgt |tjWS)rN)r)rOneofDescriptorrrwr!r)rrrQrRs rrz.asv    E4 " I HHi+ , ,    4 !6 8 8 8   rc*g|]}|j|jfSr)startend)rrs rrz.ns!MMMQ!%(MMMrTFrrlfilenamer%fieldsoneofs nested_types enum_typesrr is_extendableextension_rangesrOserialized_startserialized_endrr oneof_indexr)rwr nested_typerrr.r oneof_declextension_rangerrJr!rrr%rrrrappendcontaining_oneofrrYrlrOr;)rFrrtrerrrSrenumsrrrrrrQr field_index field_descrrRs` ``` @rrz(DescriptorPool._ConvertMessageDescriptor7s"((GZ_566ii/iii.i }e........!,...F * * * * * * *( * * *E??????"+J,<"="=???FAAAAAA!***> ? ?AAAJ    %Z%:;;   FNM*2LMMMmmm   4 4 4 __ 4) 4 4  4 v  4 v  4V 45 4: 4z*** 4$m 4*) 4Y 4 4t 4 v! 4$22% 4D&#$$#f""!d#,Z-=#>#>CC Z   ] + +C , {"))&*=>>>/5k/B{,'+E. # #$dndinEEE#'Di Krc .|rd||jf}n|j}|d}n|j}fdt|jD} t j|j|||| |t |tj} | |d|z<| | j | j j| j |<|rO| D]L} td|| jf} | | || j | <M| S)a%Make a protobuf EnumDescriptor given an EnumDescriptorProto protobuf. Args: enum_proto: The descriptor_pb2.EnumDescriptorProto protobuf message. package: Optional package name for the new message EnumDescriptor. file_desc: The file containing the enum descriptor. containing_type: The type containing this enum. scope: Scope containing available types. top_level: If True, the enum is a top level symbol. If False, the enum is defined inside a message. Returns: The added descriptor rNcBg|]\}}||Sr)_MakeEnumValueDescriptor)rrvaluerFs rrz9DescriptorPool._ConvertEnumDescriptor..s=???%++E599???r)rrlrrOrvr%rr.%s)rwrrr%rrKr!rrYrlrOr<rr@) rF enum_protortrer%rrx enum_namerSrvrQr%rls ` rrz%DescriptorPool._ConvertEnumDescriptorsZ""((GZ_566ii/iii.i????"+J,<"="=???F  $*//8.7*3,25D-;J-G-G0:0O Q Q QD $E%) dndinEEE(,D9%111%0 HHguz* + +--  ##E9i@@@+0i(( KrcP|rd||jf}n|j}|jr|j}nd}tjdid|jd|d|d|jd|jddd dd dd dd |jd dddd|dddt|d|d|dtj S)aCreates a field descriptor from a FieldDescriptorProto. For message and enum type fields, this method will do a look up in the pool for the appropriate descriptor for that type. If it is unavailable, it will fall back to the _source function to create it. If this type is still unavailable, construction will fail. Args: field_proto: The proto describing the field. message_name: The name of the containing message. index: Index of the field file_desc: The file containing the field descriptor. is_extension: Indication that this field is for an extension. Returns: An initialized FieldDescriptor object rNrrlrrr)cpp_typerrr%r,has_default_valueF default_valuer$rr json_namerOrr) rwrr-rr*rr)r,r!r)rF field_protorrrer$rlr-s rrz#DescriptorPool._MakeFieldDescriptorsT*#((L+*:;<\}} |||j || _ ||| ||?|j D]} | || |dS)aSets all the descriptor's fields's types. This method also sets the containing types on any extensions. Args: package: The current package of desc_proto. desc_proto: The message descriptor to update. scope: Enclosing scope of available types. rN)rrrrwzipr.rrrrrr%rr) rFrtrr main_descnested_packager.r!rrrs rrz DescriptorPool._SetAllFieldTypessAW%%G&&w GGI#~~%jo66nnxx*/ :;;n#&z'79I#J#JII Z j.%HHHH J )"677QQ''+'='= /2E(;(;n$ ..%PPPP!-AA  ^[%@@@@AArc|jr|||j|}nd}|dsGt|tjrtjj|_ntjj |_tj |j|_ |jtjjks|jtjj kr||_ |jtjj kr||_|jtjjkrd|_g|_n|drqd|_|jtjjks|jtjjkrt+|j|_nF|jtjjkr|j|_n|jtjjkr$|jdk|_n|jtjj kr#|jj|jj|_n|jtjjkr t9j|j|_ni|jtjjkr d|_nFt=|j|_n+d|_|jtjjks|jtjjkrd|_n|jtjjkrd|_n|jtjjkrd|_n|jtjj kr|jjd j|_nm|jtjjkrd |_nK|jtjjkrd|_n)|jtjj krd|_nd |_|j|_dS) aSets the field's type, cpp_type, message_type and enum_type. Args: field_proto: Data about the field in proto format. field_desc: The descriptor to modify. package: The package the field's container is in. scope: Enclosing scope of available types. Nr)Fr,Ttruegrrr) type_namerrrNrrJr*r+r) TYPE_ENUMProtoTypeToCppProtoTyper* TYPE_GROUPrrr,LABEL_REPEATEDr+r, TYPE_DOUBLE TYPE_FLOATfloat TYPE_STRING TYPE_BOOLlowervalues_by_namer TYPE_BYTESr CUnescapeintrv)rFr.r!rtrrQs rrzDescriptorPool._SetFieldTypes}  # #G[-BE J Jdd d    ' '@ D*/ 0 0@%5B %5? $4LLJ J6CCC  z9D D D $j:5???!jJ6EEE%*j"!#j   o . .'%%)j"  j8D D D  j8C C C#()B#C#C    z9E E E#.#<    z9C C C#.#<#B#B#D#D#N    z9C C C#-#7#F  %$''-    z9D D D#0#:  %$'$'    z9F F F#'   $'{'@#A#A   %*j"  j8D D D  j8C C C#&    z9E E E#&    z9C C C#(    z9C C C#-#7#>q#A#H    z9D D D#&    z9F F F#'    z9D D D#'   $%  !&JOOOrcxtj|j||jt |dtjS)zCreates a enum value descriptor object from a enum value proto. Args: value_proto: The proto describing the enum value. index: The index of the enum value. Returns: An initialized EnumValueDescriptor object. N)rrrrr)r)rrMrrr!r)rF value_protors rr$z'DescriptorPool._MakeEnumValueDescriptorisA  )  !{++ 2 4 4 44rc nrd|jfn|jfdt|jD}t j|j||t ||tj}||j |j j|j <|S)aMake a protobuf ServiceDescriptor given a ServiceDescriptorProto. Args: service_proto: The descriptor_pb2.ServiceDescriptorProto protobuf message. service_index: The index of the service in the File. scope: Dict mapping short and full symbols to message and enum types. package: Optional package name for the new message EnumDescriptor. file_desc: The file containing the service descriptor. Returns: The added descriptor. rc Hg|]\}}||Sr)_MakeMethodDescriptor)rr method_protortrrFrs rrz9DescriptorPool._MakeServiceDescriptor..sNKKK&5,)), g*/88KKKr)rrlrmethodsrrOr) rwrrmethodrrLr!rrYrlrOr=) rFr service_indexrrtrerJrQrs ` `` @rrz%DescriptorPool._MakeServiceDescriptor}s(XXw (:;<.sEEE1EEErN)setaddrrr)rFrvisitedrdep_desc public_filess rrzDescriptorPool._GetDepssG"88 7 " " J&&z22EE(DEEE ==w777777777 88rc||vr[t|d}|r7d||gz}||vr|}n|d|7||S)a?Finds a given type name in the current scope. Args: package: The package the proto should be located in. type_name: The name of the type to be found in the scope. scope: Dict mapping short and full symbols to message and enum types. Returns: The descriptor for the requested type. r)rsplitrwpop)rFrtr5r componentspossible_matchs rrz DescriptorPool._GetTypeFromScopes!'**0055j * {":;; U " "$)  ..      rr#r)NNNN)NNNNF)F)0r __module__ __qualname__r_USE_C_DESCRIPTORSr6rHrYr[rfrrjrhrqror~r{rrrrrmrrrrrrrrrrrrrrrbrrrrrr$rrHrrrrrrr1r1vs:OO>>>>> LQ????>$$$L+++*;'''('';' , , ,H--;- E E E ,,;,*8*8*8X//;/ ' ' ' 7 7 7>>>:BBB6/B/B/Bb((($---$999"999"444<DDD.III0...8000";;;">>>.[[[zKO37\\\\|HLIN2222j4924242424hAAA@J'J'J'X444("""H444@555 8888(rr1c:|dr|nd|zS)Nrr&) startswithrs rrrs!%% 754<7rctSr#)_DEFAULTrrrDefaultrk s /r)r __author__rAr r_rrrrfrrr!r/objectr1rr3 default_poolrjrkrrrros,>62 &&&&&&//////)))))) 2      DDDCCCCCVCCCL$888 -(( ^  (r