ó SÉLjc@s&dZdZdefd„ƒYZdS(sÆA simple wrapper around enum types to expose utility functions. Instances are created as properties with the same name as the enum they wrap on proto classes. For usage, see: reflection_test.py s"rabsatt@google.com (Kevin Rabsatt)tEnumTypeWrappercBsJeZdZdZd„Zd„Zd„Zd„Zd„Z d„Z RS(s/A utility for finding the names of enum values.cCs||_||_dS(s-Inits EnumTypeWrapper with an EnumDescriptor.N(t _enum_typet DESCRIPTOR(tselft enum_type((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pyt__init__.s cCsC||jjkr#|jj|jStd|jj|fƒ‚dS(s6Returns a string containing the name of an enum value.s(Enum %s has no name defined for value %dN(Rtvalues_by_numbertnamet ValueError(Rtnumber((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pytName3scCsC||jjkr#|jj|jStd|jj|fƒ‚dS(s6Returns the value coresponding to the given enum name.s(Enum %s has no value defined for name %sN(Rtvalues_by_nameR RR(RR((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pytValue:scCs g|jjD]}|j^q S(s~Return a list of the string names in the enum. These are returned in the order they were defined in the .proto file. (RtvaluesR(Rtvalue_descriptor((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pytkeysAscCs g|jjD]}|j^q S(s€Return a list of the integer values in the enum. These are returned in the order they were defined in the .proto file. (RR R (RR((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pyR JscCs)g|jjD]}|j|jf^q S(s…Return a list of the (name, value) pairs of the enum. These are returned in the order they were defined in the .proto file. (RR RR (RR((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pytitemsSsN( t__name__t __module__t__doc__tNoneRRR R RR R(((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pyR)s    N(Rt __author__tobjectR(((sN/usr/lib/python2.7/site-packages/google/protobuf/internal/enum_type_wrapper.pyt$s