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

from mgmt.v1alpha1 import account_hook_pb2 as mgmt_dot_v1alpha1_dot_account__hook__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAccountHooks = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/GetAccountHooks',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHooksRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHooksResponse.FromString,
                _registered_method=True)
        self.GetAccountHook = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/GetAccountHook',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHookRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHookResponse.FromString,
                _registered_method=True)
        self.CreateAccountHook = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/CreateAccountHook',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.CreateAccountHookRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.CreateAccountHookResponse.FromString,
                _registered_method=True)
        self.UpdateAccountHook = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/UpdateAccountHook',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.UpdateAccountHookRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.UpdateAccountHookResponse.FromString,
                _registered_method=True)
        self.DeleteAccountHook = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/DeleteAccountHook',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.DeleteAccountHookRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.DeleteAccountHookResponse.FromString,
                _registered_method=True)
        self.IsAccountHookNameAvailable = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/IsAccountHookNameAvailable',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.IsAccountHookNameAvailableRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.IsAccountHookNameAvailableResponse.FromString,
                _registered_method=True)
        self.SetAccountHookEnabled = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/SetAccountHookEnabled',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SetAccountHookEnabledRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SetAccountHookEnabledResponse.FromString,
                _registered_method=True)
        self.GetActiveAccountHooksByEvent = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/GetActiveAccountHooksByEvent',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetActiveAccountHooksByEventRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetActiveAccountHooksByEventResponse.FromString,
                _registered_method=True)
        self.GetSlackConnectionUrl = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/GetSlackConnectionUrl',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetSlackConnectionUrlRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetSlackConnectionUrlResponse.FromString,
                _registered_method=True)
        self.HandleSlackOAuthCallback = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/HandleSlackOAuthCallback',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.HandleSlackOAuthCallbackRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.HandleSlackOAuthCallbackResponse.FromString,
                _registered_method=True)
        self.TestSlackConnection = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/TestSlackConnection',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.TestSlackConnectionRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.TestSlackConnectionResponse.FromString,
                _registered_method=True)
        self.SendSlackMessage = channel.unary_unary(
                '/mgmt.v1alpha1.AccountHookService/SendSlackMessage',
                request_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SendSlackMessageRequest.SerializeToString,
                response_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SendSlackMessageResponse.FromString,
                _registered_method=True)


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

    def GetAccountHooks(self, request, context):
        """Retrieves all account hooks.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAccountHook(self, request, context):
        """Retrieves a specific account hook.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateAccountHook(self, request, context):
        """Creates a new account hook.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateAccountHook(self, request, context):
        """Updates an existing account hook.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteAccountHook(self, request, context):
        """Deletes an account hook.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IsAccountHookNameAvailable(self, request, context):
        """Checks if an account hook name is available.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetAccountHookEnabled(self, request, context):
        """Enables or disables an account hook.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetActiveAccountHooksByEvent(self, request, context):
        """Retrieves all active account hooks for a specific event.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSlackConnectionUrl(self, request, context):
        """Retrieves the Slack connection url that allows a user to connect their Slack workspace to Neosync.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def HandleSlackOAuthCallback(self, request, context):
        """Handles the Slack OAuth callback.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TestSlackConnection(self, request, context):
        """Tests the Slack connection by using the stored access token to initiate an auth test api call to slack.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SendSlackMessage(self, request, context):
        """For sending slack messages from the worker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AccountHookServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAccountHooks': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountHooks,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHooksRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHooksResponse.SerializeToString,
            ),
            'GetAccountHook': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAccountHook,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHookRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHookResponse.SerializeToString,
            ),
            'CreateAccountHook': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateAccountHook,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.CreateAccountHookRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.CreateAccountHookResponse.SerializeToString,
            ),
            'UpdateAccountHook': grpc.unary_unary_rpc_method_handler(
                    servicer.UpdateAccountHook,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.UpdateAccountHookRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.UpdateAccountHookResponse.SerializeToString,
            ),
            'DeleteAccountHook': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteAccountHook,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.DeleteAccountHookRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.DeleteAccountHookResponse.SerializeToString,
            ),
            'IsAccountHookNameAvailable': grpc.unary_unary_rpc_method_handler(
                    servicer.IsAccountHookNameAvailable,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.IsAccountHookNameAvailableRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.IsAccountHookNameAvailableResponse.SerializeToString,
            ),
            'SetAccountHookEnabled': grpc.unary_unary_rpc_method_handler(
                    servicer.SetAccountHookEnabled,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SetAccountHookEnabledRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SetAccountHookEnabledResponse.SerializeToString,
            ),
            'GetActiveAccountHooksByEvent': grpc.unary_unary_rpc_method_handler(
                    servicer.GetActiveAccountHooksByEvent,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetActiveAccountHooksByEventRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetActiveAccountHooksByEventResponse.SerializeToString,
            ),
            'GetSlackConnectionUrl': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSlackConnectionUrl,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetSlackConnectionUrlRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.GetSlackConnectionUrlResponse.SerializeToString,
            ),
            'HandleSlackOAuthCallback': grpc.unary_unary_rpc_method_handler(
                    servicer.HandleSlackOAuthCallback,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.HandleSlackOAuthCallbackRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.HandleSlackOAuthCallbackResponse.SerializeToString,
            ),
            'TestSlackConnection': grpc.unary_unary_rpc_method_handler(
                    servicer.TestSlackConnection,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.TestSlackConnectionRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.TestSlackConnectionResponse.SerializeToString,
            ),
            'SendSlackMessage': grpc.unary_unary_rpc_method_handler(
                    servicer.SendSlackMessage,
                    request_deserializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SendSlackMessageRequest.FromString,
                    response_serializer=mgmt_dot_v1alpha1_dot_account__hook__pb2.SendSlackMessageResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mgmt.v1alpha1.AccountHookService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mgmt.v1alpha1.AccountHookService', rpc_method_handlers)


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

    @staticmethod
    def GetAccountHooks(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,
            '/mgmt.v1alpha1.AccountHookService/GetAccountHooks',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHooksRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHooksResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAccountHook(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,
            '/mgmt.v1alpha1.AccountHookService/GetAccountHook',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHookRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetAccountHookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateAccountHook(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,
            '/mgmt.v1alpha1.AccountHookService/CreateAccountHook',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.CreateAccountHookRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.CreateAccountHookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateAccountHook(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,
            '/mgmt.v1alpha1.AccountHookService/UpdateAccountHook',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.UpdateAccountHookRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.UpdateAccountHookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteAccountHook(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,
            '/mgmt.v1alpha1.AccountHookService/DeleteAccountHook',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.DeleteAccountHookRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.DeleteAccountHookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IsAccountHookNameAvailable(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,
            '/mgmt.v1alpha1.AccountHookService/IsAccountHookNameAvailable',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.IsAccountHookNameAvailableRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.IsAccountHookNameAvailableResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetAccountHookEnabled(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,
            '/mgmt.v1alpha1.AccountHookService/SetAccountHookEnabled',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.SetAccountHookEnabledRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.SetAccountHookEnabledResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetActiveAccountHooksByEvent(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,
            '/mgmt.v1alpha1.AccountHookService/GetActiveAccountHooksByEvent',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetActiveAccountHooksByEventRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetActiveAccountHooksByEventResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSlackConnectionUrl(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,
            '/mgmt.v1alpha1.AccountHookService/GetSlackConnectionUrl',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetSlackConnectionUrlRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.GetSlackConnectionUrlResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HandleSlackOAuthCallback(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,
            '/mgmt.v1alpha1.AccountHookService/HandleSlackOAuthCallback',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.HandleSlackOAuthCallbackRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.HandleSlackOAuthCallbackResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TestSlackConnection(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,
            '/mgmt.v1alpha1.AccountHookService/TestSlackConnection',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.TestSlackConnectionRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.TestSlackConnectionResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SendSlackMessage(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,
            '/mgmt.v1alpha1.AccountHookService/SendSlackMessage',
            mgmt_dot_v1alpha1_dot_account__hook__pb2.SendSlackMessageRequest.SerializeToString,
            mgmt_dot_v1alpha1_dot_account__hook__pb2.SendSlackMessageResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
