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

# pylint: disable=R0205,R0902,R0903,R0913,E1101

import grpc

from . import g2diagnostic_pb2 as g2diagnostic__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.CheckDBPerf = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/CheckDBPerf",
            request_serializer=g2diagnostic__pb2.CheckDBPerfRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.CheckDBPerfResponse.FromString,
        )
        self.Destroy = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/Destroy",
            request_serializer=g2diagnostic__pb2.DestroyRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.DestroyResponse.FromString,
        )
        self.GetAvailableMemory = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/GetAvailableMemory",
            request_serializer=g2diagnostic__pb2.GetAvailableMemoryRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.GetAvailableMemoryResponse.FromString,
        )
        self.GetDBInfo = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/GetDBInfo",
            request_serializer=g2diagnostic__pb2.GetDBInfoRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.GetDBInfoResponse.FromString,
        )
        self.GetLogicalCores = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/GetLogicalCores",
            request_serializer=g2diagnostic__pb2.GetLogicalCoresRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.GetLogicalCoresResponse.FromString,
        )
        self.GetPhysicalCores = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/GetPhysicalCores",
            request_serializer=g2diagnostic__pb2.GetPhysicalCoresRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.GetPhysicalCoresResponse.FromString,
        )
        self.GetTotalSystemMemory = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/GetTotalSystemMemory",
            request_serializer=g2diagnostic__pb2.GetTotalSystemMemoryRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.GetTotalSystemMemoryResponse.FromString,
        )
        self.Init = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/Init",
            request_serializer=g2diagnostic__pb2.InitRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.InitResponse.FromString,
        )
        self.InitWithConfigID = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/InitWithConfigID",
            request_serializer=g2diagnostic__pb2.InitWithConfigIDRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.InitWithConfigIDResponse.FromString,
        )
        self.Reinit = channel.unary_unary(
            "/g2diagnostic.G2Diagnostic/Reinit",
            request_serializer=g2diagnostic__pb2.ReinitRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.ReinitResponse.FromString,
        )
        self.StreamEntityListBySize = channel.unary_stream(
            "/g2diagnostic.G2Diagnostic/StreamEntityListBySize",
            request_serializer=g2diagnostic__pb2.StreamEntityListBySizeRequest.SerializeToString,
            response_deserializer=g2diagnostic__pb2.StreamEntityListBySizeResponse.FromString,
        )


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

    def CheckDBPerf(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 Destroy(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 GetAvailableMemory(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 GetDBInfo(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 GetLogicalCores(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 GetPhysicalCores(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 GetTotalSystemMemory(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 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 InitWithConfigID(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 Reinit(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 StreamEntityListBySize(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_G2DiagnosticServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "CheckDBPerf": grpc.unary_unary_rpc_method_handler(
            servicer.CheckDBPerf,
            request_deserializer=g2diagnostic__pb2.CheckDBPerfRequest.FromString,
            response_serializer=g2diagnostic__pb2.CheckDBPerfResponse.SerializeToString,
        ),
        "Destroy": grpc.unary_unary_rpc_method_handler(
            servicer.Destroy,
            request_deserializer=g2diagnostic__pb2.DestroyRequest.FromString,
            response_serializer=g2diagnostic__pb2.DestroyResponse.SerializeToString,
        ),
        "GetAvailableMemory": grpc.unary_unary_rpc_method_handler(
            servicer.GetAvailableMemory,
            request_deserializer=g2diagnostic__pb2.GetAvailableMemoryRequest.FromString,
            response_serializer=g2diagnostic__pb2.GetAvailableMemoryResponse.SerializeToString,
        ),
        "GetDBInfo": grpc.unary_unary_rpc_method_handler(
            servicer.GetDBInfo,
            request_deserializer=g2diagnostic__pb2.GetDBInfoRequest.FromString,
            response_serializer=g2diagnostic__pb2.GetDBInfoResponse.SerializeToString,
        ),
        "GetLogicalCores": grpc.unary_unary_rpc_method_handler(
            servicer.GetLogicalCores,
            request_deserializer=g2diagnostic__pb2.GetLogicalCoresRequest.FromString,
            response_serializer=g2diagnostic__pb2.GetLogicalCoresResponse.SerializeToString,
        ),
        "GetPhysicalCores": grpc.unary_unary_rpc_method_handler(
            servicer.GetPhysicalCores,
            request_deserializer=g2diagnostic__pb2.GetPhysicalCoresRequest.FromString,
            response_serializer=g2diagnostic__pb2.GetPhysicalCoresResponse.SerializeToString,
        ),
        "GetTotalSystemMemory": grpc.unary_unary_rpc_method_handler(
            servicer.GetTotalSystemMemory,
            request_deserializer=g2diagnostic__pb2.GetTotalSystemMemoryRequest.FromString,
            response_serializer=g2diagnostic__pb2.GetTotalSystemMemoryResponse.SerializeToString,
        ),
        "Init": grpc.unary_unary_rpc_method_handler(
            servicer.Init,
            request_deserializer=g2diagnostic__pb2.InitRequest.FromString,
            response_serializer=g2diagnostic__pb2.InitResponse.SerializeToString,
        ),
        "InitWithConfigID": grpc.unary_unary_rpc_method_handler(
            servicer.InitWithConfigID,
            request_deserializer=g2diagnostic__pb2.InitWithConfigIDRequest.FromString,
            response_serializer=g2diagnostic__pb2.InitWithConfigIDResponse.SerializeToString,
        ),
        "Reinit": grpc.unary_unary_rpc_method_handler(
            servicer.Reinit,
            request_deserializer=g2diagnostic__pb2.ReinitRequest.FromString,
            response_serializer=g2diagnostic__pb2.ReinitResponse.SerializeToString,
        ),
        "StreamEntityListBySize": grpc.unary_stream_rpc_method_handler(
            servicer.StreamEntityListBySize,
            request_deserializer=g2diagnostic__pb2.StreamEntityListBySizeRequest.FromString,
            response_serializer=g2diagnostic__pb2.StreamEntityListBySizeResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "g2diagnostic.G2Diagnostic", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def CheckDBPerf(
        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,
            "/g2diagnostic.G2Diagnostic/CheckDBPerf",
            g2diagnostic__pb2.CheckDBPerfRequest.SerializeToString,
            g2diagnostic__pb2.CheckDBPerfResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Destroy(
        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,
            "/g2diagnostic.G2Diagnostic/Destroy",
            g2diagnostic__pb2.DestroyRequest.SerializeToString,
            g2diagnostic__pb2.DestroyResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetAvailableMemory(
        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,
            "/g2diagnostic.G2Diagnostic/GetAvailableMemory",
            g2diagnostic__pb2.GetAvailableMemoryRequest.SerializeToString,
            g2diagnostic__pb2.GetAvailableMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetDBInfo(
        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,
            "/g2diagnostic.G2Diagnostic/GetDBInfo",
            g2diagnostic__pb2.GetDBInfoRequest.SerializeToString,
            g2diagnostic__pb2.GetDBInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetLogicalCores(
        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,
            "/g2diagnostic.G2Diagnostic/GetLogicalCores",
            g2diagnostic__pb2.GetLogicalCoresRequest.SerializeToString,
            g2diagnostic__pb2.GetLogicalCoresResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetPhysicalCores(
        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,
            "/g2diagnostic.G2Diagnostic/GetPhysicalCores",
            g2diagnostic__pb2.GetPhysicalCoresRequest.SerializeToString,
            g2diagnostic__pb2.GetPhysicalCoresResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetTotalSystemMemory(
        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,
            "/g2diagnostic.G2Diagnostic/GetTotalSystemMemory",
            g2diagnostic__pb2.GetTotalSystemMemoryRequest.SerializeToString,
            g2diagnostic__pb2.GetTotalSystemMemoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @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,
            "/g2diagnostic.G2Diagnostic/Init",
            g2diagnostic__pb2.InitRequest.SerializeToString,
            g2diagnostic__pb2.InitResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def InitWithConfigID(
        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,
            "/g2diagnostic.G2Diagnostic/InitWithConfigID",
            g2diagnostic__pb2.InitWithConfigIDRequest.SerializeToString,
            g2diagnostic__pb2.InitWithConfigIDResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Reinit(
        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,
            "/g2diagnostic.G2Diagnostic/Reinit",
            g2diagnostic__pb2.ReinitRequest.SerializeToString,
            g2diagnostic__pb2.ReinitResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def StreamEntityListBySize(
        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_stream(
            request,
            target,
            "/g2diagnostic.G2Diagnostic/StreamEntityListBySize",
            g2diagnostic__pb2.StreamEntityListBySizeRequest.SerializeToString,
            g2diagnostic__pb2.StreamEntityListBySizeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
