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

import grpc_auth_service.oauth_service_pb2 as oauth__service__pb2


class OAuthStub:
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetProviderLoginURL = channel.unary_unary(
            "/OAuth/GetProviderLoginURL",
            request_serializer=oauth__service__pb2.GetProviderLoginURLRequest.SerializeToString,
            response_deserializer=oauth__service__pb2.GetProviderLoginURLResponse.FromString,
        )
        self.Login = channel.unary_unary(
            "/OAuth/Login",
            request_serializer=oauth__service__pb2.OAuthLoginRequest.SerializeToString,
            response_deserializer=oauth__service__pb2.OAuthLoginResponse.FromString,
        )
        self.GetProviderLoginURLForAttach = channel.unary_unary(
            "/OAuth/GetProviderLoginURLForAttach",
            request_serializer=oauth__service__pb2.GetProviderLoginURLForAttachRequest.SerializeToString,
            response_deserializer=oauth__service__pb2.GetProviderLoginURLForAttachResponse.FromString,
        )
        self.AttachAccountToUser = channel.unary_unary(
            "/OAuth/AttachAccountToUser",
            request_serializer=oauth__service__pb2.AttachAccountToUserRequest.SerializeToString,
            response_deserializer=oauth__service__pb2.AttachAccountToUserResponse.FromString,
        )
        self.DetachAccountFromUser = channel.unary_unary(
            "/OAuth/DetachAccountFromUser",
            request_serializer=oauth__service__pb2.DetachAccountFromUserRequest.SerializeToString,
            response_deserializer=oauth__service__pb2.DetachAccountFromUserResponse.FromString,
        )


class OAuthServicer:
    """Missing associated documentation comment in .proto file."""

    def GetProviderLoginURL(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 Login(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 GetProviderLoginURLForAttach(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 AttachAccountToUser(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 DetachAccountFromUser(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_OAuthServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetProviderLoginURL": grpc.unary_unary_rpc_method_handler(
            servicer.GetProviderLoginURL,
            request_deserializer=oauth__service__pb2.GetProviderLoginURLRequest.FromString,
            response_serializer=oauth__service__pb2.GetProviderLoginURLResponse.SerializeToString,
        ),
        "Login": grpc.unary_unary_rpc_method_handler(
            servicer.Login,
            request_deserializer=oauth__service__pb2.OAuthLoginRequest.FromString,
            response_serializer=oauth__service__pb2.OAuthLoginResponse.SerializeToString,
        ),
        "GetProviderLoginURLForAttach": grpc.unary_unary_rpc_method_handler(
            servicer.GetProviderLoginURLForAttach,
            request_deserializer=oauth__service__pb2.GetProviderLoginURLForAttachRequest.FromString,
            response_serializer=oauth__service__pb2.GetProviderLoginURLForAttachResponse.SerializeToString,
        ),
        "AttachAccountToUser": grpc.unary_unary_rpc_method_handler(
            servicer.AttachAccountToUser,
            request_deserializer=oauth__service__pb2.AttachAccountToUserRequest.FromString,
            response_serializer=oauth__service__pb2.AttachAccountToUserResponse.SerializeToString,
        ),
        "DetachAccountFromUser": grpc.unary_unary_rpc_method_handler(
            servicer.DetachAccountFromUser,
            request_deserializer=oauth__service__pb2.DetachAccountFromUserRequest.FromString,
            response_serializer=oauth__service__pb2.DetachAccountFromUserResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("OAuth", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class OAuth:
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def GetProviderLoginURL(
        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,
            "/OAuth/GetProviderLoginURL",
            oauth__service__pb2.GetProviderLoginURLRequest.SerializeToString,
            oauth__service__pb2.GetProviderLoginURLResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Login(
        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,
            "/OAuth/Login",
            oauth__service__pb2.OAuthLoginRequest.SerializeToString,
            oauth__service__pb2.OAuthLoginResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetProviderLoginURLForAttach(
        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,
            "/OAuth/GetProviderLoginURLForAttach",
            oauth__service__pb2.GetProviderLoginURLForAttachRequest.SerializeToString,
            oauth__service__pb2.GetProviderLoginURLForAttachResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def AttachAccountToUser(
        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,
            "/OAuth/AttachAccountToUser",
            oauth__service__pb2.AttachAccountToUserRequest.SerializeToString,
            oauth__service__pb2.AttachAccountToUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def DetachAccountFromUser(
        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,
            "/OAuth/DetachAccountFromUser",
            oauth__service__pb2.DetachAccountFromUserRequest.SerializeToString,
            oauth__service__pb2.DetachAccountFromUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
