"""
@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.log_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 SimulationIoStub:
    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"""

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

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

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

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

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

    GetFederationOptions: grpc.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetFederationOptionsRequest,
        flwr.proto.run_pb2.GetFederationOptionsResponse,
    ]
    """Get Federation Options"""

    GetRunStatus: grpc.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunStatusRequest,
        flwr.proto.run_pb2.GetRunStatusResponse,
    ]
    """Get Run Status"""

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

class SimulationIoAsyncStub:
    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"""

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

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

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

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

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

    GetFederationOptions: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetFederationOptionsRequest,
        flwr.proto.run_pb2.GetFederationOptionsResponse,
    ]
    """Get Federation Options"""

    GetRunStatus: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.run_pb2.GetRunStatusRequest,
        flwr.proto.run_pb2.GetRunStatusResponse,
    ]
    """Get Run Status"""

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

class SimulationIoServicer(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 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 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 Simulation 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 Simulation 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 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 GetFederationOptions(
        self,
        request: flwr.proto.run_pb2.GetFederationOptionsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.run_pb2.GetFederationOptionsResponse, collections.abc.Awaitable[flwr.proto.run_pb2.GetFederationOptionsResponse]]:
        """Get Federation Options"""

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

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

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