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

import user_service_pb2 as user__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
            "/User/Create",
            request_serializer=user__service__pb2.CreateUserRequest.SerializeToString,
            response_deserializer=user__service__pb2.CreateUserResponse.FromString,
        )
        self.UpdatePassword = channel.unary_unary(
            "/User/UpdatePassword",
            request_serializer=user__service__pb2.UpdateUserPasswordRequest.SerializeToString,
            response_deserializer=user__service__pb2.UpdateUserPasswordResponse.FromString,
        )
        self.UpdateEmail = channel.unary_unary(
            "/User/UpdateEmail",
            request_serializer=user__service__pb2.UpdateUserEmailRequest.SerializeToString,
            response_deserializer=user__service__pb2.UpdateUserEmailResponse.FromString,
        )
        self.GetLoginHistory = channel.unary_unary(
            "/User/GetLoginHistory",
            request_serializer=user__service__pb2.GetUserLoginHistoryRequest.SerializeToString,
            response_deserializer=user__service__pb2.GetUserLoginHistoryResponse.FromString,
        )


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

    def Create(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 UpdatePassword(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 UpdateEmail(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 GetLoginHistory(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_UserServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Create": grpc.unary_unary_rpc_method_handler(
            servicer.Create,
            request_deserializer=user__service__pb2.CreateUserRequest.FromString,
            response_serializer=user__service__pb2.CreateUserResponse.SerializeToString,
        ),
        "UpdatePassword": grpc.unary_unary_rpc_method_handler(
            servicer.UpdatePassword,
            request_deserializer=user__service__pb2.UpdateUserPasswordRequest.FromString,
            response_serializer=user__service__pb2.UpdateUserPasswordResponse.SerializeToString,
        ),
        "UpdateEmail": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateEmail,
            request_deserializer=user__service__pb2.UpdateUserEmailRequest.FromString,
            response_serializer=user__service__pb2.UpdateUserEmailResponse.SerializeToString,
        ),
        "GetLoginHistory": grpc.unary_unary_rpc_method_handler(
            servicer.GetLoginHistory,
            request_deserializer=user__service__pb2.GetUserLoginHistoryRequest.FromString,
            response_serializer=user__service__pb2.GetUserLoginHistoryResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("User", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Create(
        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,
            "/User/Create",
            user__service__pb2.CreateUserRequest.SerializeToString,
            user__service__pb2.CreateUserResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdatePassword(
        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,
            "/User/UpdatePassword",
            user__service__pb2.UpdateUserPasswordRequest.SerializeToString,
            user__service__pb2.UpdateUserPasswordResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def UpdateEmail(
        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,
            "/User/UpdateEmail",
            user__service__pb2.UpdateUserEmailRequest.SerializeToString,
            user__service__pb2.UpdateUserEmailResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetLoginHistory(
        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,
            "/User/GetLoginHistory",
            user__service__pb2.GetUserLoginHistoryRequest.SerializeToString,
            user__service__pb2.GetUserLoginHistoryResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
