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

import grpc

from chalk._gen.chalk.server.v1 import auth_pb2 as chalk_dot_server_dot_v1_dot_auth__pb2
from chalk._gen.chalk.server.v1 import link_pb2 as chalk_dot_server_dot_v1_dot_link__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetToken = channel.unary_unary(
            "/chalk.server.v1.AuthService/GetToken",
            request_serializer=chalk_dot_server_dot_v1_dot_auth__pb2.GetTokenRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_auth__pb2.GetTokenResponse.FromString,
        )
        self.CreateLinkSession = channel.unary_unary(
            "/chalk.server.v1.AuthService/CreateLinkSession",
            request_serializer=chalk_dot_server_dot_v1_dot_link__pb2.CreateLinkSessionRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_link__pb2.CreateLinkSessionResponse.FromString,
        )
        self.GetLinkSession = channel.unary_unary(
            "/chalk.server.v1.AuthService/GetLinkSession",
            request_serializer=chalk_dot_server_dot_v1_dot_link__pb2.GetLinkSessionRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_link__pb2.GetLinkSessionResponse.FromString,
        )
        self.UpdateLinkSession = channel.unary_unary(
            "/chalk.server.v1.AuthService/UpdateLinkSession",
            request_serializer=chalk_dot_server_dot_v1_dot_auth__pb2.UpdateLinkSessionRequest.SerializeToString,
            response_deserializer=chalk_dot_server_dot_v1_dot_auth__pb2.UpdateLinkSessionResponse.FromString,
        )


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

    def GetToken(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 CreateLinkSession(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 GetLinkSession(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 UpdateLinkSession(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_AuthServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetToken": grpc.unary_unary_rpc_method_handler(
            servicer.GetToken,
            request_deserializer=chalk_dot_server_dot_v1_dot_auth__pb2.GetTokenRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_auth__pb2.GetTokenResponse.SerializeToString,
        ),
        "CreateLinkSession": grpc.unary_unary_rpc_method_handler(
            servicer.CreateLinkSession,
            request_deserializer=chalk_dot_server_dot_v1_dot_link__pb2.CreateLinkSessionRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_link__pb2.CreateLinkSessionResponse.SerializeToString,
        ),
        "GetLinkSession": grpc.unary_unary_rpc_method_handler(
            servicer.GetLinkSession,
            request_deserializer=chalk_dot_server_dot_v1_dot_link__pb2.GetLinkSessionRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_link__pb2.GetLinkSessionResponse.SerializeToString,
        ),
        "UpdateLinkSession": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateLinkSession,
            request_deserializer=chalk_dot_server_dot_v1_dot_auth__pb2.UpdateLinkSessionRequest.FromString,
            response_serializer=chalk_dot_server_dot_v1_dot_auth__pb2.UpdateLinkSessionResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "chalk.server.v1.AuthService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetToken(
        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,
            "/chalk.server.v1.AuthService/GetToken",
            chalk_dot_server_dot_v1_dot_auth__pb2.GetTokenRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_auth__pb2.GetTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def CreateLinkSession(
        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,
            "/chalk.server.v1.AuthService/CreateLinkSession",
            chalk_dot_server_dot_v1_dot_link__pb2.CreateLinkSessionRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_link__pb2.CreateLinkSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetLinkSession(
        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,
            "/chalk.server.v1.AuthService/GetLinkSession",
            chalk_dot_server_dot_v1_dot_link__pb2.GetLinkSessionRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_link__pb2.GetLinkSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateLinkSession(
        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,
            "/chalk.server.v1.AuthService/UpdateLinkSession",
            chalk_dot_server_dot_v1_dot_auth__pb2.UpdateLinkSessionRequest.SerializeToString,
            chalk_dot_server_dot_v1_dot_auth__pb2.UpdateLinkSessionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
