File: //lib/python3.9/site-packages/google/protobuf/__pycache__/service_reflection.cpython-39.pyc
a
x��gH- � @ sp d Z dZddlmZ e�� dkr,ddlmZ G dd� de�ZG dd � d e�Z G d
d� de
�ZG dd
� d
e
�ZdS )a* Contains metaclasses used to create protocol service and service stub
classes from ServiceDescriptor objects at runtime.
The GeneratedServiceType and GeneratedServiceStubType metaclasses are used to
inject all useful functionality into the classes output by the protocol
compiler at compile-time.
zpetar@google.com (Petar Petrov)� )�api_implementationZcpp)�_messagec @ s e Zd ZdZdZdd� ZdS )�GeneratedServiceTypea� Metaclass for service classes created at runtime from ServiceDescriptors.
Implementations for all methods described in the Service class are added here
by this class. We also create properties to allow getting/setting all fields
in the protocol message.
The protocol compiler currently uses this metaclass to create protocol service
classes at runtime. Clients can also manually create their own classes at
runtime, as in this example::
mydescriptor = ServiceDescriptor(.....)
class MyProtoService(service.Service):
__metaclass__ = GeneratedServiceType
DESCRIPTOR = mydescriptor
myservice_instance = MyProtoService()
# ...
�
DESCRIPTORc C sT t j|vrdS |t j }t|t�r8tj�|�}||t j<