# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from distantbes.proto.proto import bazel_config_pb2 as proto_dot_bazel__config__pb2
from distantbes.proto.proto import invocation_pb2 as proto_dot_invocation__pb2
from distantbes.proto.proto import user_pb2 as proto_dot_user__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetInvocation = channel.unary_unary(
                '/buildbuddy.service.BuildBuddyService/GetInvocation',
                request_serializer=proto_dot_invocation__pb2.GetInvocationRequest.SerializeToString,
                response_deserializer=proto_dot_invocation__pb2.GetInvocationResponse.FromString,
                )
        self.SearchInvocation = channel.unary_unary(
                '/buildbuddy.service.BuildBuddyService/SearchInvocation',
                request_serializer=proto_dot_invocation__pb2.SearchInvocationRequest.SerializeToString,
                response_deserializer=proto_dot_invocation__pb2.SearchInvocationResponse.FromString,
                )
        self.CreateUser = channel.unary_unary(
                '/buildbuddy.service.BuildBuddyService/CreateUser',
                request_serializer=proto_dot_user__pb2.CreateUserRequest.SerializeToString,
                response_deserializer=proto_dot_user__pb2.CreateUserResponse.FromString,
                )
        self.GetUser = channel.unary_unary(
                '/buildbuddy.service.BuildBuddyService/GetUser',
                request_serializer=proto_dot_user__pb2.GetUserRequest.SerializeToString,
                response_deserializer=proto_dot_user__pb2.GetUserResponse.FromString,
                )
        self.GetBazelConfig = channel.unary_unary(
                '/buildbuddy.service.BuildBuddyService/GetBazelConfig',
                request_serializer=proto_dot_bazel__config__pb2.GetBazelConfigRequest.SerializeToString,
                response_deserializer=proto_dot_bazel__config__pb2.GetBazelConfigResponse.FromString,
                )
        self.GetInvocationStat = channel.unary_unary(
                '/buildbuddy.service.BuildBuddyService/GetInvocationStat',
                request_serializer=proto_dot_invocation__pb2.GetInvocationStatRequest.SerializeToString,
                response_deserializer=proto_dot_invocation__pb2.GetInvocationStatResponse.FromString,
                )


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

    def GetInvocation(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 SearchInvocation(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 CreateUser(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 GetUser(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 GetBazelConfig(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 GetInvocationStat(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_BuildBuddyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetInvocation': grpc.unary_unary_rpc_method_handler(
                    servicer.GetInvocation,
                    request_deserializer=proto_dot_invocation__pb2.GetInvocationRequest.FromString,
                    response_serializer=proto_dot_invocation__pb2.GetInvocationResponse.SerializeToString,
            ),
            'SearchInvocation': grpc.unary_unary_rpc_method_handler(
                    servicer.SearchInvocation,
                    request_deserializer=proto_dot_invocation__pb2.SearchInvocationRequest.FromString,
                    response_serializer=proto_dot_invocation__pb2.SearchInvocationResponse.SerializeToString,
            ),
            'CreateUser': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateUser,
                    request_deserializer=proto_dot_user__pb2.CreateUserRequest.FromString,
                    response_serializer=proto_dot_user__pb2.CreateUserResponse.SerializeToString,
            ),
            'GetUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUser,
                    request_deserializer=proto_dot_user__pb2.GetUserRequest.FromString,
                    response_serializer=proto_dot_user__pb2.GetUserResponse.SerializeToString,
            ),
            'GetBazelConfig': grpc.unary_unary_rpc_method_handler(
                    servicer.GetBazelConfig,
                    request_deserializer=proto_dot_bazel__config__pb2.GetBazelConfigRequest.FromString,
                    response_serializer=proto_dot_bazel__config__pb2.GetBazelConfigResponse.SerializeToString,
            ),
            'GetInvocationStat': grpc.unary_unary_rpc_method_handler(
                    servicer.GetInvocationStat,
                    request_deserializer=proto_dot_invocation__pb2.GetInvocationStatRequest.FromString,
                    response_serializer=proto_dot_invocation__pb2.GetInvocationStatResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'buildbuddy.service.BuildBuddyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetInvocation(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/buildbuddy.service.BuildBuddyService/GetInvocation',
            proto_dot_invocation__pb2.GetInvocationRequest.SerializeToString,
            proto_dot_invocation__pb2.GetInvocationResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SearchInvocation(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/buildbuddy.service.BuildBuddyService/SearchInvocation',
            proto_dot_invocation__pb2.SearchInvocationRequest.SerializeToString,
            proto_dot_invocation__pb2.SearchInvocationResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def CreateUser(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/buildbuddy.service.BuildBuddyService/CreateUser',
            proto_dot_user__pb2.CreateUserRequest.SerializeToString,
            proto_dot_user__pb2.CreateUserResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetUser(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/buildbuddy.service.BuildBuddyService/GetUser',
            proto_dot_user__pb2.GetUserRequest.SerializeToString,
            proto_dot_user__pb2.GetUserResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetBazelConfig(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/buildbuddy.service.BuildBuddyService/GetBazelConfig',
            proto_dot_bazel__config__pb2.GetBazelConfigRequest.SerializeToString,
            proto_dot_bazel__config__pb2.GetBazelConfigResponse.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)