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

import grpc

from api.v2 import (
    auth_gateway_service_pb2 as api_dot_v2_dot_auth__gateway__service__pb2,
)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Login = channel.unary_unary(
            "/api.v2.AuthGatewayService/Login",
            request_serializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLoginRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLoginResponse.FromString,
            _registered_method=True,
        )
        self.RefreshToken = channel.unary_unary(
            "/api.v2.AuthGatewayService/RefreshToken",
            request_serializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceRefreshTokenRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceRefreshTokenResponse.FromString,
            _registered_method=True,
        )
        self.Logout = channel.unary_unary(
            "/api.v2.AuthGatewayService/Logout",
            request_serializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLogoutRequest.SerializeToString,
            response_deserializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLogoutResponse.FromString,
            _registered_method=True,
        )


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

    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 RefreshToken(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 Logout(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_AuthGatewayServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Login": grpc.unary_unary_rpc_method_handler(
            servicer.Login,
            request_deserializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLoginRequest.FromString,
            response_serializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLoginResponse.SerializeToString,
        ),
        "RefreshToken": grpc.unary_unary_rpc_method_handler(
            servicer.RefreshToken,
            request_deserializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceRefreshTokenRequest.FromString,
            response_serializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceRefreshTokenResponse.SerializeToString,
        ),
        "Logout": grpc.unary_unary_rpc_method_handler(
            servicer.Logout,
            request_deserializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLogoutRequest.FromString,
            response_serializer=api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLogoutResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "api.v2.AuthGatewayService", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers(
        "api.v2.AuthGatewayService", rpc_method_handlers
    )


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

    @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,
            "/api.v2.AuthGatewayService/Login",
            api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLoginRequest.SerializeToString,
            api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLoginResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def RefreshToken(
        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,
            "/api.v2.AuthGatewayService/RefreshToken",
            api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceRefreshTokenRequest.SerializeToString,
            api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceRefreshTokenResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )

    @staticmethod
    def Logout(
        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,
            "/api.v2.AuthGatewayService/Logout",
            api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLogoutRequest.SerializeToString,
            api_dot_v2_dot_auth__gateway__service__pb2.AuthGatewayServiceLogoutResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True,
        )
