"""
@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.appio_pb2
import flwr.proto.fab_pb2
import flwr.proto.heartbeat_pb2
import flwr.proto.log_pb2
import flwr.proto.message_pb2
import flwr.proto.run_pb2
import flwr.proto.serverappio_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 ServerAppIoStub:
    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    ListAppsToLaunch: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.ListAppsToLaunchRequest,
        flwr.proto.appio_pb2.ListAppsToLaunchResponse,
    ]
    """List runs to launch"""

    RequestToken: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.RequestTokenRequest,
        flwr.proto.appio_pb2.RequestTokenResponse,
    ]
    """Request token for a run"""

    GetNodes: grpc.UnaryUnaryMultiCallable[
        flwr.proto.serverappio_pb2.GetNodesRequest,
        flwr.proto.serverappio_pb2.GetNodesResponse,
    ]
    """Return a set of nodes"""

    PushMessages: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppMessagesRequest,
        flwr.proto.appio_pb2.PushAppMessagesResponse,
    ]
    """Create one or more messages"""

    PullMessages: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppMessagesRequest,
        flwr.proto.appio_pb2.PullAppMessagesResponse,
    ]
    """Get message results"""

    GetRun: grpc.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunRequest,
        flwr.proto.run_pb2.GetRunResponse,
    ]
    """Get run details"""

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

    PullAppInputs: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppInputsRequest,
        flwr.proto.appio_pb2.PullAppInputsResponse,
    ]
    """Pull ServerApp inputs"""

    PushAppOutputs: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppOutputsRequest,
        flwr.proto.appio_pb2.PushAppOutputsResponse,
    ]
    """Push ServerApp outputs"""

    UpdateRunStatus: grpc.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.UpdateRunStatusRequest,
        flwr.proto.run_pb2.UpdateRunStatusResponse,
    ]
    """Update the status of a given run"""

    GetRunStatus: grpc.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunStatusRequest,
        flwr.proto.run_pb2.GetRunStatusResponse,
    ]
    """Get the status of a given run"""

    PushLogs: grpc.UnaryUnaryMultiCallable[
        flwr.proto.log_pb2.PushLogsRequest,
        flwr.proto.log_pb2.PushLogsResponse,
    ]
    """Push ServerApp logs"""

    SendAppHeartbeat: grpc.UnaryUnaryMultiCallable[
        flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
        flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
    ]
    """App heartbeat"""

    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 ServerAppIoAsyncStub:
    ListAppsToLaunch: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.ListAppsToLaunchRequest,
        flwr.proto.appio_pb2.ListAppsToLaunchResponse,
    ]
    """List runs to launch"""

    RequestToken: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.RequestTokenRequest,
        flwr.proto.appio_pb2.RequestTokenResponse,
    ]
    """Request token for a run"""

    GetNodes: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.serverappio_pb2.GetNodesRequest,
        flwr.proto.serverappio_pb2.GetNodesResponse,
    ]
    """Return a set of nodes"""

    PushMessages: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppMessagesRequest,
        flwr.proto.appio_pb2.PushAppMessagesResponse,
    ]
    """Create one or more messages"""

    PullMessages: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppMessagesRequest,
        flwr.proto.appio_pb2.PullAppMessagesResponse,
    ]
    """Get message results"""

    GetRun: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunRequest,
        flwr.proto.run_pb2.GetRunResponse,
    ]
    """Get run details"""

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

    PullAppInputs: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppInputsRequest,
        flwr.proto.appio_pb2.PullAppInputsResponse,
    ]
    """Pull ServerApp inputs"""

    PushAppOutputs: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppOutputsRequest,
        flwr.proto.appio_pb2.PushAppOutputsResponse,
    ]
    """Push ServerApp outputs"""

    UpdateRunStatus: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.UpdateRunStatusRequest,
        flwr.proto.run_pb2.UpdateRunStatusResponse,
    ]
    """Update the status of a given run"""

    GetRunStatus: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunStatusRequest,
        flwr.proto.run_pb2.GetRunStatusResponse,
    ]
    """Get the status of a given run"""

    PushLogs: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.log_pb2.PushLogsRequest,
        flwr.proto.log_pb2.PushLogsResponse,
    ]
    """Push ServerApp logs"""

    SendAppHeartbeat: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
        flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse,
    ]
    """App heartbeat"""

    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 ServerAppIoServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def ListAppsToLaunch(
        self,
        request: flwr.proto.appio_pb2.ListAppsToLaunchRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.ListAppsToLaunchResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.ListAppsToLaunchResponse]]:
        """List runs to launch"""

    @abc.abstractmethod
    def RequestToken(
        self,
        request: flwr.proto.appio_pb2.RequestTokenRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.RequestTokenResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.RequestTokenResponse]]:
        """Request token for a run"""

    @abc.abstractmethod
    def GetNodes(
        self,
        request: flwr.proto.serverappio_pb2.GetNodesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.serverappio_pb2.GetNodesResponse, collections.abc.Awaitable[flwr.proto.serverappio_pb2.GetNodesResponse]]:
        """Return a set of nodes"""

    @abc.abstractmethod
    def PushMessages(
        self,
        request: flwr.proto.appio_pb2.PushAppMessagesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.PushAppMessagesResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PushAppMessagesResponse]]:
        """Create one or more messages"""

    @abc.abstractmethod
    def PullMessages(
        self,
        request: flwr.proto.appio_pb2.PullAppMessagesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.PullAppMessagesResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PullAppMessagesResponse]]:
        """Get message results"""

    @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]]:
        """Get run details"""

    @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 PullAppInputs(
        self,
        request: flwr.proto.appio_pb2.PullAppInputsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.PullAppInputsResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PullAppInputsResponse]]:
        """Pull ServerApp inputs"""

    @abc.abstractmethod
    def PushAppOutputs(
        self,
        request: flwr.proto.appio_pb2.PushAppOutputsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.PushAppOutputsResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PushAppOutputsResponse]]:
        """Push ServerApp outputs"""

    @abc.abstractmethod
    def UpdateRunStatus(
        self,
        request: flwr.proto.run_pb2.UpdateRunStatusRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.run_pb2.UpdateRunStatusResponse, collections.abc.Awaitable[flwr.proto.run_pb2.UpdateRunStatusResponse]]:
        """Update the status of a given run"""

    @abc.abstractmethod
    def GetRunStatus(
        self,
        request: flwr.proto.run_pb2.GetRunStatusRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.run_pb2.GetRunStatusResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetRunStatusResponse]]:
        """Get the status of a given run"""

    @abc.abstractmethod
    def PushLogs(
        self,
        request: flwr.proto.log_pb2.PushLogsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.log_pb2.PushLogsResponse, collections.abc.Awaitable[flwr.proto.log_pb2.PushLogsResponse]]:
        """Push ServerApp logs"""

    @abc.abstractmethod
    def SendAppHeartbeat(
        self,
        request: flwr.proto.heartbeat_pb2.SendAppHeartbeatRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse, collections.abc.Awaitable[flwr.proto.heartbeat_pb2.SendAppHeartbeatResponse]]:
        """App heartbeat"""

    @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_ServerAppIoServicer_to_server(servicer: ServerAppIoServicer, server: typing.Union[grpc.Server, grpc.aio.Server]) -> None: ...
