<reponame>Xenon-Bot/pylib<filename>dbots/protos/mutations_grpc.py
# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: mutations.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

from . import backups_pb2
from . import mutations_pb2


class MutationsBase(abc.ABC):

    @abc.abstractmethod
    async def FlattenMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.MutationContainer, mutations_pb2.MutationContainer]') -> None:
        pass

    @abc.abstractmethod
    async def ReverseMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.MutationContainer, mutations_pb2.MutationContainer]') -> None:
        pass

    @abc.abstractmethod
    async def DiscoverMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.DiscoverMutationsRequest, mutations_pb2.MutationContainer]') -> None:
        pass

    @abc.abstractmethod
    async def MergeMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.MutationContainer, backups_pb2.BackupData]') -> None:
        pass

    @abc.abstractmethod
    async def ApplyMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.ApplyMutationsRequest, mutations_pb2.ApplyMutationsResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/mutations.Mutations/FlattenMutations': grpclib.const.Handler(
                self.FlattenMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.MutationContainer,
                mutations_pb2.MutationContainer,
            ),
            '/mutations.Mutations/ReverseMutations': grpclib.const.Handler(
                self.ReverseMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.MutationContainer,
                mutations_pb2.MutationContainer,
            ),
            '/mutations.Mutations/DiscoverMutations': grpclib.const.Handler(
                self.DiscoverMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.DiscoverMutationsRequest,
                mutations_pb2.MutationContainer,
            ),
            '/mutations.Mutations/MergeMutations': grpclib.const.Handler(
                self.MergeMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.MutationContainer,
                backups_pb2.BackupData,
            ),
            '/mutations.Mutations/ApplyMutations': grpclib.const.Handler(
                self.ApplyMutations,
                grpclib.const.Cardinality.UNARY_STREAM,
                mutations_pb2.ApplyMutationsRequest,
                mutations_pb2.ApplyMutationsResponse,
            ),
        }


class MutationsStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.FlattenMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/FlattenMutations',
            mutations_pb2.MutationContainer,
            mutations_pb2.MutationContainer,
        )
        self.ReverseMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/ReverseMutations',
            mutations_pb2.MutationContainer,
            mutations_pb2.MutationContainer,
        )
        self.DiscoverMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/DiscoverMutations',
            mutations_pb2.DiscoverMutationsRequest,
            mutations_pb2.MutationContainer,
        )
        self.MergeMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/MergeMutations',
            mutations_pb2.MutationContainer,
            backups_pb2.BackupData,
        )
        self.ApplyMutations = grpclib.client.UnaryStreamMethod(
            channel,
            '/mutations.Mutations/ApplyMutations',
            mutations_pb2.ApplyMutationsRequest,
            mutations_pb2.ApplyMutationsResponse,
        )

# Generated by the Protocol Buffers compiler. DO NOT EDIT!
# source: mutations.proto
# plugin: grpclib.plugin.main
import abc
import typing

import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server

from . import backups_pb2
from . import mutations_pb2


class MutationsBase(abc.ABC):

    @abc.abstractmethod
    async def FlattenMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.MutationContainer, mutations_pb2.MutationContainer]') -> None:
        pass

    @abc.abstractmethod
    async def ReverseMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.MutationContainer, mutations_pb2.MutationContainer]') -> None:
        pass

    @abc.abstractmethod
    async def DiscoverMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.DiscoverMutationsRequest, mutations_pb2.MutationContainer]') -> None:
        pass

    @abc.abstractmethod
    async def MergeMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.MutationContainer, backups_pb2.BackupData]') -> None:
        pass

    @abc.abstractmethod
    async def ApplyMutations(self, stream: 'grpclib.server.Stream[mutations_pb2.ApplyMutationsRequest, mutations_pb2.ApplyMutationsResponse]') -> None:
        pass

    def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
        return {
            '/mutations.Mutations/FlattenMutations': grpclib.const.Handler(
                self.FlattenMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.MutationContainer,
                mutations_pb2.MutationContainer,
            ),
            '/mutations.Mutations/ReverseMutations': grpclib.const.Handler(
                self.ReverseMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.MutationContainer,
                mutations_pb2.MutationContainer,
            ),
            '/mutations.Mutations/DiscoverMutations': grpclib.const.Handler(
                self.DiscoverMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.DiscoverMutationsRequest,
                mutations_pb2.MutationContainer,
            ),
            '/mutations.Mutations/MergeMutations': grpclib.const.Handler(
                self.MergeMutations,
                grpclib.const.Cardinality.UNARY_UNARY,
                mutations_pb2.MutationContainer,
                backups_pb2.BackupData,
            ),
            '/mutations.Mutations/ApplyMutations': grpclib.const.Handler(
                self.ApplyMutations,
                grpclib.const.Cardinality.UNARY_STREAM,
                mutations_pb2.ApplyMutationsRequest,
                mutations_pb2.ApplyMutationsResponse,
            ),
        }


class MutationsStub:

    def __init__(self, channel: grpclib.client.Channel) -> None:
        self.FlattenMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/FlattenMutations',
            mutations_pb2.MutationContainer,
            mutations_pb2.MutationContainer,
        )
        self.ReverseMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/ReverseMutations',
            mutations_pb2.MutationContainer,
            mutations_pb2.MutationContainer,
        )
        self.DiscoverMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/DiscoverMutations',
            mutations_pb2.DiscoverMutationsRequest,
            mutations_pb2.MutationContainer,
        )
        self.MergeMutations = grpclib.client.UnaryUnaryMethod(
            channel,
            '/mutations.Mutations/MergeMutations',
            mutations_pb2.MutationContainer,
            backups_pb2.BackupData,
        )
        self.ApplyMutations = grpclib.client.UnaryStreamMethod(
            channel,
            '/mutations.Mutations/ApplyMutations',
            mutations_pb2.ApplyMutationsRequest,
            mutations_pb2.ApplyMutationsResponse,
        )
# Generated by the Protocol Buffers compiler. DO NOT EDIT! # source: mutations.proto # plugin: grpclib.plugin.main