# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""

import grpc
import warnings

from . import hist_pb2 as hist__pb2

GRPC_GENERATED_VERSION = "1.78.0"
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower

    _version_not_supported = first_version_is_lower(
        GRPC_VERSION, GRPC_GENERATED_VERSION
    )
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f"The grpc package installed is at version {GRPC_VERSION},"
        + " but the generated code in hist_pb2_grpc.py depends on"
        + f" grpcio>={GRPC_GENERATED_VERSION}."
        + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
        + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
    )


class HistogrammerServiceStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.Init = channel.unary_unary(
            "/HistogrammerService/Init",
            request_serializer=hist__pb2.InitRequest.SerializeToString,
            response_deserializer=hist__pb2.InitResponse.FromString,
            _registered_method=True,
        )
        self.Describe = channel.unary_unary(
            "/HistogrammerService/Describe",
            request_serializer=hist__pb2.DescribeRequest.SerializeToString,
            response_deserializer=hist__pb2.DescribeResponse.FromString,
            _registered_method=True,
        )
        self.Exists = channel.unary_unary(
            "/HistogrammerService/Exists",
            request_serializer=hist__pb2.ExistsRequest.SerializeToString,
            response_deserializer=hist__pb2.ExistsResponse.FromString,
            _registered_method=True,
        )
        self.Fill = channel.unary_unary(
            "/HistogrammerService/Fill",
            request_serializer=hist__pb2.FillRequest.SerializeToString,
            response_deserializer=hist__pb2.FillResponse.FromString,
            _registered_method=True,
        )
        self.FillMany = channel.unary_unary(
            "/HistogrammerService/FillMany",
            request_serializer=hist__pb2.FillManyRequest.SerializeToString,
            response_deserializer=hist__pb2.FillResponse.FromString,
            _registered_method=True,
        )
        self.Snapshot = channel.unary_unary(
            "/HistogrammerService/Snapshot",
            request_serializer=hist__pb2.SnapshotRequest.SerializeToString,
            response_deserializer=hist__pb2.SnapshotResponse.FromString,
            _registered_method=True,
        )
        self.Delete = channel.unary_unary(
            "/HistogrammerService/Delete",
            request_serializer=hist__pb2.DeleteRequest.SerializeToString,
            response_deserializer=hist__pb2.DeleteResponse.FromString,
            _registered_method=True,
        )
        self.Reset = channel.unary_unary(
            "/HistogrammerService/Reset",
            request_serializer=hist__pb2.ResetRequest.SerializeToString,
            response_deserializer=hist__pb2.ResetResponse.FromString,
            _registered_method=True,
        )
        self.Flush = channel.unary_unary(
            "/HistogrammerService/Flush",
            request_serializer=hist__pb2.FlushRequest.SerializeToString,
            response_deserializer=hist__pb2.FlushResponse.FromString,
            _registered_method=True,
        )
        self.Stats = channel.unary_unary(
            "/HistogrammerService/Stats",
            request_serializer=hist__pb2.StatsRequest.SerializeToString,
            response_deserializer=hist__pb2.StatsResponse.FromString,
            _registered_method=True,
        )


class HistogrammerServiceServicer(object):
    """Missing associated documentation comment in .proto file."""

    def Init(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Describe(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Exists(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Fill(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def FillMany(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Snapshot(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Delete(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Reset(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Flush(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Stats(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_HistogrammerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Init": grpc.unary_unary_rpc_method_handler(
            servicer.Init,
            request_deserializer=hist__pb2.InitRequest.FromString,
            response_serializer=hist__pb2.InitResponse.SerializeToString,
        ),
        "Describe": grpc.unary_unary_rpc_method_handler(
            servicer.Describe,
            request_deserializer=hist__pb2.DescribeRequest.FromString,
            response_serializer=hist__pb2.DescribeResponse.SerializeToString,
        ),
        "Exists": grpc.unary_unary_rpc_method_handler(
            servicer.Exists,
            request_deserializer=hist__pb2.ExistsRequest.FromString,
            response_serializer=hist__pb2.ExistsResponse.SerializeToString,
        ),
        "Fill": grpc.unary_unary_rpc_method_handler(
            servicer.Fill,
            request_deserializer=hist__pb2.FillRequest.FromString,
            response_serializer=hist__pb2.FillResponse.SerializeToString,
        ),
        "FillMany": grpc.unary_unary_rpc_method_handler(
            servicer.FillMany,
            request_deserializer=hist__pb2.FillManyRequest.FromString,
            response_serializer=hist__pb2.FillResponse.SerializeToString,
        ),
        "Snapshot": grpc.unary_unary_rpc_method_handler(
            servicer.Snapshot,
            request_deserializer=hist__pb2.SnapshotRequest.FromString,
            response_serializer=hist__pb2.SnapshotResponse.SerializeToString,
        ),
        "Delete": grpc.unary_unary_rpc_method_handler(
            servicer.Delete,
            request_deserializer=hist__pb2.DeleteRequest.FromString,
            response_serializer=hist__pb2.DeleteResponse.SerializeToString,
        ),
        "Reset": grpc.unary_unary_rpc_method_handler(
            servicer.Reset,
            request_deserializer=hist__pb2.ResetRequest.FromString,
            response_serializer=hist__pb2.ResetResponse.SerializeToString,
        ),
        "Flush": grpc.unary_unary_rpc_method_handler(
            servicer.Flush,
            request_deserializer=hist__pb2.FlushRequest.FromString,
            response_serializer=hist__pb2.FlushResponse.SerializeToString,
        ),
        "Stats": grpc.unary_unary_rpc_method_handler(
            servicer.Stats,
            request_deserializer=hist__pb2.StatsRequest.FromString,
            response_serializer=hist__pb2.StatsResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "HistogrammerService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers("HistogrammerService", rpc_method_handlers)


# This class is part of an EXPERIMENTAL API.
class HistogrammerService(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Init(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Init",
            hist__pb2.InitRequest.SerializeToString,
            hist__pb2.InitResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Describe(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Describe",
            hist__pb2.DescribeRequest.SerializeToString,
            hist__pb2.DescribeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Exists(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Exists",
            hist__pb2.ExistsRequest.SerializeToString,
            hist__pb2.ExistsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Fill(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Fill",
            hist__pb2.FillRequest.SerializeToString,
            hist__pb2.FillResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def FillMany(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/FillMany",
            hist__pb2.FillManyRequest.SerializeToString,
            hist__pb2.FillResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Snapshot(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Snapshot",
            hist__pb2.SnapshotRequest.SerializeToString,
            hist__pb2.SnapshotResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Delete(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Delete",
            hist__pb2.DeleteRequest.SerializeToString,
            hist__pb2.DeleteResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Reset(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Reset",
            hist__pb2.ResetRequest.SerializeToString,
            hist__pb2.ResetResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Flush(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Flush",
            hist__pb2.FlushRequest.SerializeToString,
            hist__pb2.FlushResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Stats(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        insecure=False,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/HistogrammerService/Stats",
            hist__pb2.StatsRequest.SerializeToString,
            hist__pb2.StatsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
