Source code for nvflare.edge.web.service.edge_api_pb2_grpc

# Copyright (c) 2025, NVIDIA CORPORATION.  All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

import nvflare.edge.web.service.edge_api_pb2 as edge__api__pb2

GRPC_GENERATED_VERSION = '1.71.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in edge_api_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


[docs] class EdgeApiStub(object): """Interface exported by the server. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.Query = channel.unary_unary( '/edgeapi.EdgeApi/Query', request_serializer=edge__api__pb2.Request.SerializeToString, response_deserializer=edge__api__pb2.Reply.FromString, _registered_method=True)
[docs] class EdgeApiServicer(object): """Interface exported by the server. """
[docs] def Query(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
[docs] def add_EdgeApiServicer_to_server(servicer, server): rpc_method_handlers = { 'Query': grpc.unary_unary_rpc_method_handler( servicer.Query, request_deserializer=edge__api__pb2.Request.FromString, response_serializer=edge__api__pb2.Reply.SerializeToString, ), } generic_handler = grpc.method_handlers_generic_handler( 'edgeapi.EdgeApi', rpc_method_handlers) server.add_generic_rpc_handlers((generic_handler,)) server.add_registered_method_handlers('edgeapi.EdgeApi', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
[docs] class EdgeApi(object): """Interface exported by the server. """
[docs] @staticmethod def Query(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None): return grpc.experimental.unary_unary( request, target, '/edgeapi.EdgeApi/Query', edge__api__pb2.Request.SerializeToString, edge__api__pb2.Reply.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata, _registered_method=True)