"""
@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.control_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 ControlStub:
    def __init__(self, channel: typing.Union[grpc.Channel, grpc.aio.Channel]) -> None: ...
    StartRun: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.StartRunRequest,
        flwr.proto.control_pb2.StartRunResponse,
    ]
    """Start run upon request"""

    StopRun: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.StopRunRequest,
        flwr.proto.control_pb2.StopRunResponse,
    ]
    """Stop run upon request"""

    StreamLogs: grpc.UnaryStreamMultiCallable[
        flwr.proto.control_pb2.StreamLogsRequest,
        flwr.proto.control_pb2.StreamLogsResponse,
    ]
    """Start log stream upon request"""

    ListRuns: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ListRunsRequest,
        flwr.proto.control_pb2.ListRunsResponse,
    ]
    """flwr ls command"""

    GetLoginDetails: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.GetLoginDetailsRequest,
        flwr.proto.control_pb2.GetLoginDetailsResponse,
    ]
    """Get login details upon request"""

    GetAuthTokens: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.GetAuthTokensRequest,
        flwr.proto.control_pb2.GetAuthTokensResponse,
    ]
    """Get auth tokens upon request"""

    PullArtifacts: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.PullArtifactsRequest,
        flwr.proto.control_pb2.PullArtifactsResponse,
    ]
    """Pull artifacts generated during a run (flwr pull)"""

    RegisterNode: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.RegisterNodeRequest,
        flwr.proto.control_pb2.RegisterNodeResponse,
    ]
    """Register SuperNode"""

    UnregisterNode: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.UnregisterNodeRequest,
        flwr.proto.control_pb2.UnregisterNodeResponse,
    ]
    """Unregister SuperNode"""

    ListNodes: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ListNodesRequest,
        flwr.proto.control_pb2.ListNodesResponse,
    ]
    """List SuperNodes"""

    ListFederations: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ListFederationsRequest,
        flwr.proto.control_pb2.ListFederationsResponse,
    ]
    """List Federations"""

    ShowFederation: grpc.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ShowFederationRequest,
        flwr.proto.control_pb2.ShowFederationResponse,
    ]
    """Show Federation"""

class ControlAsyncStub:
    StartRun: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.StartRunRequest,
        flwr.proto.control_pb2.StartRunResponse,
    ]
    """Start run upon request"""

    StopRun: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.StopRunRequest,
        flwr.proto.control_pb2.StopRunResponse,
    ]
    """Stop run upon request"""

    StreamLogs: grpc.aio.UnaryStreamMultiCallable[
        flwr.proto.control_pb2.StreamLogsRequest,
        flwr.proto.control_pb2.StreamLogsResponse,
    ]
    """Start log stream upon request"""

    ListRuns: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ListRunsRequest,
        flwr.proto.control_pb2.ListRunsResponse,
    ]
    """flwr ls command"""

    GetLoginDetails: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.GetLoginDetailsRequest,
        flwr.proto.control_pb2.GetLoginDetailsResponse,
    ]
    """Get login details upon request"""

    GetAuthTokens: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.GetAuthTokensRequest,
        flwr.proto.control_pb2.GetAuthTokensResponse,
    ]
    """Get auth tokens upon request"""

    PullArtifacts: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.PullArtifactsRequest,
        flwr.proto.control_pb2.PullArtifactsResponse,
    ]
    """Pull artifacts generated during a run (flwr pull)"""

    RegisterNode: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.RegisterNodeRequest,
        flwr.proto.control_pb2.RegisterNodeResponse,
    ]
    """Register SuperNode"""

    UnregisterNode: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.UnregisterNodeRequest,
        flwr.proto.control_pb2.UnregisterNodeResponse,
    ]
    """Unregister SuperNode"""

    ListNodes: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ListNodesRequest,
        flwr.proto.control_pb2.ListNodesResponse,
    ]
    """List SuperNodes"""

    ListFederations: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ListFederationsRequest,
        flwr.proto.control_pb2.ListFederationsResponse,
    ]
    """List Federations"""

    ShowFederation: grpc.aio.UnaryUnaryMultiCallable[
        flwr.proto.control_pb2.ShowFederationRequest,
        flwr.proto.control_pb2.ShowFederationResponse,
    ]
    """Show Federation"""

class ControlServicer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def StartRun(
        self,
        request: flwr.proto.control_pb2.StartRunRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.StartRunResponse, collections.abc.Awaitable[flwr.proto.control_pb2.StartRunResponse]]:
        """Start run upon request"""

    @abc.abstractmethod
    def StopRun(
        self,
        request: flwr.proto.control_pb2.StopRunRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.StopRunResponse, collections.abc.Awaitable[flwr.proto.control_pb2.StopRunResponse]]:
        """Stop run upon request"""

    @abc.abstractmethod
    def StreamLogs(
        self,
        request: flwr.proto.control_pb2.StreamLogsRequest,
        context: _ServicerContext,
    ) -> typing.Union[collections.abc.Iterator[flwr.proto.control_pb2.StreamLogsResponse], collections.abc.AsyncIterator[flwr.proto.control_pb2.StreamLogsResponse]]:
        """Start log stream upon request"""

    @abc.abstractmethod
    def ListRuns(
        self,
        request: flwr.proto.control_pb2.ListRunsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.ListRunsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ListRunsResponse]]:
        """flwr ls command"""

    @abc.abstractmethod
    def GetLoginDetails(
        self,
        request: flwr.proto.control_pb2.GetLoginDetailsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.GetLoginDetailsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.GetLoginDetailsResponse]]:
        """Get login details upon request"""

    @abc.abstractmethod
    def GetAuthTokens(
        self,
        request: flwr.proto.control_pb2.GetAuthTokensRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.GetAuthTokensResponse, collections.abc.Awaitable[flwr.proto.control_pb2.GetAuthTokensResponse]]:
        """Get auth tokens upon request"""

    @abc.abstractmethod
    def PullArtifacts(
        self,
        request: flwr.proto.control_pb2.PullArtifactsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.PullArtifactsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.PullArtifactsResponse]]:
        """Pull artifacts generated during a run (flwr pull)"""

    @abc.abstractmethod
    def RegisterNode(
        self,
        request: flwr.proto.control_pb2.RegisterNodeRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.RegisterNodeResponse, collections.abc.Awaitable[flwr.proto.control_pb2.RegisterNodeResponse]]:
        """Register SuperNode"""

    @abc.abstractmethod
    def UnregisterNode(
        self,
        request: flwr.proto.control_pb2.UnregisterNodeRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.UnregisterNodeResponse, collections.abc.Awaitable[flwr.proto.control_pb2.UnregisterNodeResponse]]:
        """Unregister SuperNode"""

    @abc.abstractmethod
    def ListNodes(
        self,
        request: flwr.proto.control_pb2.ListNodesRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.ListNodesResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ListNodesResponse]]:
        """List SuperNodes"""

    @abc.abstractmethod
    def ListFederations(
        self,
        request: flwr.proto.control_pb2.ListFederationsRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.ListFederationsResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ListFederationsResponse]]:
        """List Federations"""

    @abc.abstractmethod
    def ShowFederation(
        self,
        request: flwr.proto.control_pb2.ShowFederationRequest,
        context: _ServicerContext,
    ) -> typing.Union[flwr.proto.control_pb2.ShowFederationResponse, collections.abc.Awaitable[flwr.proto.control_pb2.ShowFederationResponse]]:
        """Show Federation"""

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