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

from . import integration_code_repository_pb2 as admin_dot_v1_dot_integration__code__repository__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.DeleteCodeRepoById = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/DeleteCodeRepoById',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.DeleteCodeRepoByIdRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.DeleteCodeRepoByIdResponse.FromString,
                _registered_method=True)
        self.CancelDeleteCodeRepoById = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/CancelDeleteCodeRepoById',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.CancelDeleteCodeRepoByIdRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.CancelDeleteCodeRepoByIdResponse.FromString,
                _registered_method=True)
        self.ConnectCodeRepository = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/ConnectCodeRepository',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.ConnectCodeRepositoryRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.ConnectCodeRepositoryResponse.FromString,
                _registered_method=True)
        self.GetAccessToken = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/GetAccessToken',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetAccessTokenRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetAccessTokenResponse.FromString,
                _registered_method=True)
        self.GetGithubRepositoriesFromAuthUser = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/GetGithubRepositoriesFromAuthUser',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetGithubRepositoriesFromAuthUserRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetGithubRepositoriesFromAuthUserResponse.FromString,
                _registered_method=True)
        self.GetUserAccessToken = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/GetUserAccessToken',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetUserAccessTokenRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetUserAccessTokenResponse.FromString,
                _registered_method=True)
        self.GetCodeRepos = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/GetCodeRepos',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetCodeReposRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetCodeReposResponse.FromString,
                _registered_method=True)
        self.CreateCodeRepo = channel.unary_unary(
                '/admin.v1.CodeRepositoryService/CreateCodeRepo',
                request_serializer=admin_dot_v1_dot_integration__code__repository__pb2.CreateCodeRepoRequest.SerializeToString,
                response_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.CreateCodeRepoResponse.FromString,
                _registered_method=True)


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

    def DeleteCodeRepoById(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 CancelDeleteCodeRepoById(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 ConnectCodeRepository(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 GetAccessToken(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 GetGithubRepositoriesFromAuthUser(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 GetUserAccessToken(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 GetCodeRepos(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 CreateCodeRepo(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_CodeRepositoryServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'DeleteCodeRepoById': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteCodeRepoById,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.DeleteCodeRepoByIdRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.DeleteCodeRepoByIdResponse.SerializeToString,
            ),
            'CancelDeleteCodeRepoById': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelDeleteCodeRepoById,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.CancelDeleteCodeRepoByIdRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.CancelDeleteCodeRepoByIdResponse.SerializeToString,
            ),
            'ConnectCodeRepository': grpc.unary_unary_rpc_method_handler(
                    servicer.ConnectCodeRepository,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.ConnectCodeRepositoryRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.ConnectCodeRepositoryResponse.SerializeToString,
            ),
            'GetAccessToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccessToken,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetAccessTokenRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetAccessTokenResponse.SerializeToString,
            ),
            'GetGithubRepositoriesFromAuthUser': grpc.unary_unary_rpc_method_handler(
                    servicer.GetGithubRepositoriesFromAuthUser,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetGithubRepositoriesFromAuthUserRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetGithubRepositoriesFromAuthUserResponse.SerializeToString,
            ),
            'GetUserAccessToken': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUserAccessToken,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetUserAccessTokenRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetUserAccessTokenResponse.SerializeToString,
            ),
            'GetCodeRepos': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCodeRepos,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.GetCodeReposRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.GetCodeReposResponse.SerializeToString,
            ),
            'CreateCodeRepo': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateCodeRepo,
                    request_deserializer=admin_dot_v1_dot_integration__code__repository__pb2.CreateCodeRepoRequest.FromString,
                    response_serializer=admin_dot_v1_dot_integration__code__repository__pb2.CreateCodeRepoResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'admin.v1.CodeRepositoryService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('admin.v1.CodeRepositoryService', rpc_method_handlers)


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

    @staticmethod
    def DeleteCodeRepoById(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,
            '/admin.v1.CodeRepositoryService/DeleteCodeRepoById',
            admin_dot_v1_dot_integration__code__repository__pb2.DeleteCodeRepoByIdRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.DeleteCodeRepoByIdResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelDeleteCodeRepoById(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,
            '/admin.v1.CodeRepositoryService/CancelDeleteCodeRepoById',
            admin_dot_v1_dot_integration__code__repository__pb2.CancelDeleteCodeRepoByIdRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.CancelDeleteCodeRepoByIdResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ConnectCodeRepository(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,
            '/admin.v1.CodeRepositoryService/ConnectCodeRepository',
            admin_dot_v1_dot_integration__code__repository__pb2.ConnectCodeRepositoryRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.ConnectCodeRepositoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAccessToken(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,
            '/admin.v1.CodeRepositoryService/GetAccessToken',
            admin_dot_v1_dot_integration__code__repository__pb2.GetAccessTokenRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.GetAccessTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetGithubRepositoriesFromAuthUser(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,
            '/admin.v1.CodeRepositoryService/GetGithubRepositoriesFromAuthUser',
            admin_dot_v1_dot_integration__code__repository__pb2.GetGithubRepositoriesFromAuthUserRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.GetGithubRepositoriesFromAuthUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetUserAccessToken(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,
            '/admin.v1.CodeRepositoryService/GetUserAccessToken',
            admin_dot_v1_dot_integration__code__repository__pb2.GetUserAccessTokenRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.GetUserAccessTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCodeRepos(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,
            '/admin.v1.CodeRepositoryService/GetCodeRepos',
            admin_dot_v1_dot_integration__code__repository__pb2.GetCodeReposRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.GetCodeReposResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateCodeRepo(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,
            '/admin.v1.CodeRepositoryService/CreateCodeRepo',
            admin_dot_v1_dot_integration__code__repository__pb2.CreateCodeRepoRequest.SerializeToString,
            admin_dot_v1_dot_integration__code__repository__pb2.CreateCodeRepoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
