"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2022 Flower Labs GmbH. 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.
==============================================================================
"""

import abc
import collections.abc
import flwr.proto.fab_pb2
import flwr.proto.fleet_pb2
import flwr.proto.heartbeat_pb2
import flwr.proto.message_pb2
import flwr.proto.run_pb2
import grpc
import grpc.aio
import typing

_T = typing.TypeVar("_T")

class _MaybeAsyncIterator(collections.abc.AsyncIterator[_T], collections.abc.Iterator[_T], metaclass=abc.ABCMeta): ...

class _ServicerContext(grpc.ServicerContext, grpc.aio.ServicerContext):  # type: ignore[misc, type-arg]
    ...

class FleetStub:
    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    RegisterNode: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.RegisterNodeFleetRequest,
        flwr.proto.fleet_pb2.RegisterNodeFleetResponse,
    ]
    """Register Node"""

    ActivateNode: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.ActivateNodeRequest,
        flwr.proto.fleet_pb2.ActivateNodeResponse,
    ]
    """Activate Node"""

    DeactivateNode: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.DeactivateNodeRequest,
        flwr.proto.fleet_pb2.DeactivateNodeResponse,
    ]
    """Deactivate Node"""

    UnregisterNode: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.UnregisterNodeFleetRequest,
        flwr.proto.fleet_pb2.UnregisterNodeFleetResponse,
    ]
    """Unregister Node"""

    SendNodeHeartbeat: grpc.UnaryUnaryMultiCallable[
        flwr.proto.heartbeat_pb2.SendNodeHeartbeatRequest,
        flwr.proto.heartbeat_pb2.SendNodeHeartbeatResponse,
    ]

    PullMessages: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.PullMessagesRequest,
        flwr.proto.fleet_pb2.PullMessagesResponse,
    ]
    """Retrieve one or more messages, if possible

    HTTP API path: /api/v1/fleet/pull-messages
    """

    PushMessages: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.PushMessagesRequest,
        flwr.proto.fleet_pb2.PushMessagesResponse,
    ]
    """Complete one or more messages, if possible

    HTTP API path: /api/v1/fleet/push-messages
    """

    GetRun: grpc.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunRequest,
        flwr.proto.run_pb2.GetRunResponse,
    ]

    GetFab: grpc.UnaryUnaryMultiCallable[
        flwr.proto.fab_pb2.GetFabRequest,
        flwr.proto.fab_pb2.GetFabResponse,
    ]
    """Get FAB"""

    PushObject: grpc.UnaryUnaryMultiCallable[
        flwr.proto.message_pb2.PushObjectRequest,
        flwr.proto.message_pb2.PushObjectResponse,
    ]
    """Push Object"""

    PullObject: grpc.UnaryUnaryMultiCallable[
        flwr.proto.message_pb2.PullObjectRequest,
        flwr.proto.message_pb2.PullObjectResponse,
    ]
    """Pull Object"""

    ConfirmMessageReceived: grpc.UnaryUnaryMultiCallable[
        flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
        flwr.proto.message_pb2.ConfirmMessageReceivedResponse,
    ]
    """Confirm Message Received"""

class FleetAsyncStub:
    RegisterNode: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.RegisterNodeFleetRequest,
        flwr.proto.fleet_pb2.RegisterNodeFleetResponse,
    ]
    """Register Node"""

    ActivateNode: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.ActivateNodeRequest,
        flwr.proto.fleet_pb2.ActivateNodeResponse,
    ]
    """Activate Node"""

    DeactivateNode: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.DeactivateNodeRequest,
        flwr.proto.fleet_pb2.DeactivateNodeResponse,
    ]
    """Deactivate Node"""

    UnregisterNode: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.UnregisterNodeFleetRequest,
        flwr.proto.fleet_pb2.UnregisterNodeFleetResponse,
    ]
    """Unregister Node"""

    SendNodeHeartbeat: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.heartbeat_pb2.SendNodeHeartbeatRequest,
        flwr.proto.heartbeat_pb2.SendNodeHeartbeatResponse,
    ]

    PullMessages: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.PullMessagesRequest,
        flwr.proto.fleet_pb2.PullMessagesResponse,
    ]
    """Retrieve one or more messages, if possible

    HTTP API path: /api/v1/fleet/pull-messages
    """

    PushMessages: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fleet_pb2.PushMessagesRequest,
        flwr.proto.fleet_pb2.PushMessagesResponse,
    ]
    """Complete one or more messages, if possible

    HTTP API path: /api/v1/fleet/push-messages
    """

    GetRun: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunRequest,
        flwr.proto.run_pb2.GetRunResponse,
    ]

    GetFab: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.fab_pb2.GetFabRequest,
        flwr.proto.fab_pb2.GetFabResponse,
    ]
    """Get FAB"""

    PushObject: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.message_pb2.PushObjectRequest,
        flwr.proto.message_pb2.PushObjectResponse,
    ]
    """Push Object"""

    PullObject: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.message_pb2.PullObjectRequest,
        flwr.proto.message_pb2.PullObjectResponse,
    ]
    """Pull Object"""

    ConfirmMessageReceived: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
        flwr.proto.message_pb2.ConfirmMessageReceivedResponse,
    ]
    """Confirm Message Received"""

class FleetServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def RegisterNode(
        self,
        request: flwr.proto.fleet_pb2.RegisterNodeFleetRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fleet_pb2.RegisterNodeFleetResponse, collections.abc.Awaitable[flwr.proto.fleet_pb2.RegisterNodeFleetResponse]]:
        """Register Node"""

    @abc.abstractmethod
    def ActivateNode(
        self,
        request: flwr.proto.fleet_pb2.ActivateNodeRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fleet_pb2.ActivateNodeResponse, collections.abc.Awaitable[flwr.proto.fleet_pb2.ActivateNodeResponse]]:
        """Activate Node"""

    @abc.abstractmethod
    def DeactivateNode(
        self,
        request: flwr.proto.fleet_pb2.DeactivateNodeRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fleet_pb2.DeactivateNodeResponse, collections.abc.Awaitable[flwr.proto.fleet_pb2.DeactivateNodeResponse]]:
        """Deactivate Node"""

    @abc.abstractmethod
    def UnregisterNode(
        self,
        request: flwr.proto.fleet_pb2.UnregisterNodeFleetRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fleet_pb2.UnregisterNodeFleetResponse, collections.abc.Awaitable[flwr.proto.fleet_pb2.UnregisterNodeFleetResponse]]:
        """Unregister Node"""

    @abc.abstractmethod
    def SendNodeHeartbeat(
        self,
        request: flwr.proto.heartbeat_pb2.SendNodeHeartbeatRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.heartbeat_pb2.SendNodeHeartbeatResponse, collections.abc.Awaitable[flwr.proto.heartbeat_pb2.SendNodeHeartbeatResponse]]: ...

    @abc.abstractmethod
    def PullMessages(
        self,
        request: flwr.proto.fleet_pb2.PullMessagesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fleet_pb2.PullMessagesResponse, collections.abc.Awaitable[flwr.proto.fleet_pb2.PullMessagesResponse]]:
        """Retrieve one or more messages, if possible

        HTTP API path: /api/v1/fleet/pull-messages
        """

    @abc.abstractmethod
    def PushMessages(
        self,
        request: flwr.proto.fleet_pb2.PushMessagesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fleet_pb2.PushMessagesResponse, collections.abc.Awaitable[flwr.proto.fleet_pb2.PushMessagesResponse]]:
        """Complete one or more messages, if possible

        HTTP API path: /api/v1/fleet/push-messages
        """

    @abc.abstractmethod
    def GetRun(
        self,
        request: flwr.proto.run_pb2.GetRunRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.run_pb2.GetRunResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetRunResponse]]: ...

    @abc.abstractmethod
    def GetFab(
        self,
        request: flwr.proto.fab_pb2.GetFabRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.fab_pb2.GetFabResponse, collections.abc.Awaitable[flwr.proto.fab_pb2.GetFabResponse]]:
        """Get FAB"""

    @abc.abstractmethod
    def PushObject(
        self,
        request: flwr.proto.message_pb2.PushObjectRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.message_pb2.PushObjectResponse, collections.abc.Awaitable[flwr.proto.message_pb2.PushObjectResponse]]:
        """Push Object"""

    @abc.abstractmethod
    def PullObject(
        self,
        request: flwr.proto.message_pb2.PullObjectRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.message_pb2.PullObjectResponse, collections.abc.Awaitable[flwr.proto.message_pb2.PullObjectResponse]]:
        """Pull Object"""

    @abc.abstractmethod
    def ConfirmMessageReceived(
        self,
        request: flwr.proto.message_pb2.ConfirmMessageReceivedRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.message_pb2.ConfirmMessageReceivedResponse, collections.abc.Awaitable[flwr.proto.message_pb2.ConfirmMessageReceivedResponse]]:
        """Confirm Message Received"""

def add_FleetServicer_to_server(servicer: FleetServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
