"""
@generated by mypy-protobuf.  Do not edit manually!
isort:skip_file
Copyright 2024 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.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 ClientAppIoStub:
    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,
    ]
    """Get run IDs with pending messages"""

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

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

    PullClientAppInputs: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppInputsRequest,
        flwr.proto.appio_pb2.PullAppInputsResponse,
    ]
    """Pull client app inputs"""

    PushClientAppOutputs: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppOutputsRequest,
        flwr.proto.appio_pb2.PushAppOutputsResponse,
    ]
    """Push client app outputs"""

    PushMessage: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppMessagesRequest,
        flwr.proto.appio_pb2.PushAppMessagesResponse,
    ]
    """Push Message"""

    PullMessage: grpc.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppMessagesRequest,
        flwr.proto.appio_pb2.PullAppMessagesResponse,
    ]
    """Pull Message"""

    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 ClientAppIoAsyncStub:
    ListAppsToLaunch: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.ListAppsToLaunchRequest,
        flwr.proto.appio_pb2.ListAppsToLaunchResponse,
    ]
    """Get run IDs with pending messages"""

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

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

    PullClientAppInputs: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppInputsRequest,
        flwr.proto.appio_pb2.PullAppInputsResponse,
    ]
    """Pull client app inputs"""

    PushClientAppOutputs: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppOutputsRequest,
        flwr.proto.appio_pb2.PushAppOutputsResponse,
    ]
    """Push client app outputs"""

    PushMessage: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PushAppMessagesRequest,
        flwr.proto.appio_pb2.PushAppMessagesResponse,
    ]
    """Push Message"""

    PullMessage: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.appio_pb2.PullAppMessagesRequest,
        flwr.proto.appio_pb2.PullAppMessagesResponse,
    ]
    """Pull Message"""

    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 ClientAppIoServicer(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]]:
        """Get run IDs with pending messages"""

    @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"""

    @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 PullClientAppInputs(
        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 client app inputs"""

    @abc.abstractmethod
    def PushClientAppOutputs(
        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 client app outputs"""

    @abc.abstractmethod
    def PushMessage(
        self,
        request: flwr.proto.appio_pb2.PushAppMessagesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.PushAppMessagesResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PushAppMessagesResponse]]:
        """Push Message"""

    @abc.abstractmethod
    def PullMessage(
        self,
        request: flwr.proto.appio_pb2.PullAppMessagesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.appio_pb2.PullAppMessagesResponse, collections.abc.Awaitable[flwr.proto.appio_pb2.PullAppMessagesResponse]]:
        """Pull Message"""

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