def _MakeMethodDescriptor(self, method_proto, service_name, package, scope,
                              index):
        """Creates a method descriptor from a MethodDescriptorProto.

    Args:
      method_proto: The proto describing the method.
      service_name: The name of the containing service.
      package: Optional package name to look up for types.
      scope: Scope containing available types.
      index: Index of the method in the service.

    Returns:
      An initialized MethodDescriptor object.
    """
        full_name = '.'.join((service_name, method_proto.name))
        input_type = self._GetTypeFromScope(package, method_proto.input_type,
                                            scope)
        output_type = self._GetTypeFromScope(package, method_proto.output_type,
                                             scope)
        return descriptor.MethodDescriptor(
            name=method_proto.name,
            full_name=full_name,
            index=index,
            containing_service=None,
            input_type=input_type,
            output_type=output_type,
            options=_OptionsOrNone(method_proto))
Exemple #2
0
DESCRIPTOR._options = None

_BLOBSTORESTUBSERVICE = _descriptor.ServiceDescriptor(
  name='BlobstoreStubService',
  full_name='apphosting.BlobstoreStubService',
  file=DESCRIPTOR,
  index=0,
  serialized_options=None,
  serialized_start=296,
  serialized_end=482,
  methods=[
  _descriptor.MethodDescriptor(
    name='StoreBlob',
    full_name='apphosting.BlobstoreStubService.StoreBlob',
    index=0,
    containing_service=None,
    input_type=_STOREBLOBREQUEST,
    output_type=google_dot_apphosting_dot_api_dot_api__base__pb2._VOIDPROTO,
    serialized_options=None,
  ),
  _descriptor.MethodDescriptor(
    name='SetBlobStorageType',
    full_name='apphosting.BlobstoreStubService.SetBlobStorageType',
    index=1,
    containing_service=None,
    input_type=_SETBLOBSTORAGETYPEREQUEST,
    output_type=google_dot_apphosting_dot_api_dot_api__base__pb2._VOIDPROTO,
    serialized_options=None,
  ),
])
_sym_db.RegisterServiceDescriptor(_BLOBSTORESTUBSERVICE)
_sym_db.RegisterMessage(RpcError)

_CALLHANDLER = _descriptor.ServiceDescriptor(
    name='CallHandler',
    full_name='apphosting.tools.devappserver2.CallHandler',
    file=DESCRIPTOR,
    index=0,
    options=None,
    serialized_start=787,
    serialized_end=899,
    methods=[
        _descriptor.MethodDescriptor(
            name='HandleCall',
            full_name='apphosting.tools.devappserver2.CallHandler.HandleCall',
            index=0,
            containing_service=None,
            input_type=_REQUEST,
            output_type=_RESPONSE,
            options=None,
        ),
    ])
_sym_db.RegisterServiceDescriptor(_CALLHANDLER)

DESCRIPTOR.services_by_name['CallHandler'] = _CALLHANDLER

try:
    # THESE ELEMENTS WILL BE DEPRECATED.
    # Please use the generated *_pb2_grpc.py files instead.
    import grpc
    from grpc.beta import implementations as beta_implementations
    from grpc.beta import interfaces as beta_interfaces
_EXECOPRESPONSE.fields_by_name['cached_payload']._options = None

_SQLSERVICE = _descriptor.ServiceDescriptor(
  name='SqlService',
  full_name='speckle.sql.SqlService',
  file=DESCRIPTOR,
  index=0,
  serialized_options=None,
  serialized_start=1730,
  serialized_end=2158,
  methods=[
  _descriptor.MethodDescriptor(
    name='Exec',
    full_name='speckle.sql.SqlService.Exec',
    index=0,
    containing_service=None,
    input_type=_EXECREQUEST,
    output_type=_EXECRESPONSE,
    serialized_options=_b('P\001'),
  ),
  _descriptor.MethodDescriptor(
    name='ExecOp',
    full_name='speckle.sql.SqlService.ExecOp',
    index=1,
    containing_service=None,
    input_type=_EXECOPREQUEST,
    output_type=_EXECOPRESPONSE,
    serialized_options=_b('P\001'),
  ),
  _descriptor.MethodDescriptor(
    name='GetMetadata',
_CALLHANDLER = _descriptor.ServiceDescriptor(
    name='CallHandler',
    full_name='apphosting.tools.devappserver2.CallHandler',
    file=DESCRIPTOR,
    index=0,
    serialized_options=None,
    create_key=_descriptor._internal_create_key,
    serialized_start=787,
    serialized_end=899,
    methods=[
        _descriptor.MethodDescriptor(
            name='HandleCall',
            full_name='apphosting.tools.devappserver2.CallHandler.HandleCall',
            index=0,
            containing_service=None,
            input_type=_REQUEST,
            output_type=_RESPONSE,
            serialized_options=None,
            create_key=_descriptor._internal_create_key,
        ),
    ])
_sym_db.RegisterServiceDescriptor(_CALLHANDLER)

DESCRIPTOR.services_by_name['CallHandler'] = _CALLHANDLER

try:
    # THESE ELEMENTS WILL BE DEPRECATED.
    # Please use the generated *_pb2_grpc.py files instead.
    import grpc
    from grpc.beta import implementations as beta_implementations
    from grpc.beta import interfaces as beta_interfaces