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

from nebius.api.nebius.common.v1 import operation_pb2 as nebius_dot_common_dot_v1_dot_operation__pb2
from nebius.api.nebius.iam.v1 import access_key_pb2 as nebius_dot_iam_dot_v1_dot_access__key__pb2
from nebius.api.nebius.iam.v1 import access_key_service_pb2 as nebius_dot_iam_dot_v1_dot_access__key__service__pb2


class AccessKeyServiceStub(object):
    """Access keys API v1 is depricated. It's known to malfunction under certain conditions.
    Use Access keys API v2 instead. Access keys create by API v1 are available using Access keys API v2.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/Create',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.CreateAccessKeyRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.List = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/List',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysRequest.SerializeToString,
                response_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysResponse.FromString,
                )
        self.ListByAccount = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/ListByAccount',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysByAccountRequest.SerializeToString,
                response_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/Update',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.UpdateAccessKeyRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.GetById = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/GetById',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeyByIdRequest.SerializeToString,
                response_deserializer=nebius_dot_iam_dot_v1_dot_access__key__pb2.AccessKey.FromString,
                )
        self.GetByAwsId = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/GetByAwsId',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeyByAwsIdRequest.SerializeToString,
                response_deserializer=nebius_dot_iam_dot_v1_dot_access__key__pb2.AccessKey.FromString,
                )
        self.GetSecretOnce = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/GetSecretOnce',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeySecretOnceRequest.SerializeToString,
                response_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeySecretOnceResponse.FromString,
                )
        self.Activate = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/Activate',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ActivateAccessKeyRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Deactivate = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/Deactivate',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.DeactivateAccessKeyRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/nebius.iam.v1.AccessKeyService/Delete',
                request_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.DeleteAccessKeyRequest.SerializeToString,
                response_deserializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
                )


class AccessKeyServiceServicer(object):
    """Access keys API v1 is depricated. It's known to malfunction under certain conditions.
    Use Access keys API v2 instead. Access keys create by API v1 are available using Access keys API v2.
    """

    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 List(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 ListByAccount(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 Update(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 GetById(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 GetByAwsId(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 GetSecretOnce(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 Activate(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 Deactivate(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 Delete(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_AccessKeyServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.CreateAccessKeyRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysRequest.FromString,
                    response_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysResponse.SerializeToString,
            ),
            'ListByAccount': grpc.unary_unary_rpc_method_handler(
                    servicer.ListByAccount,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysByAccountRequest.FromString,
                    response_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.UpdateAccessKeyRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'GetById': grpc.unary_unary_rpc_method_handler(
                    servicer.GetById,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeyByIdRequest.FromString,
                    response_serializer=nebius_dot_iam_dot_v1_dot_access__key__pb2.AccessKey.SerializeToString,
            ),
            'GetByAwsId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetByAwsId,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeyByAwsIdRequest.FromString,
                    response_serializer=nebius_dot_iam_dot_v1_dot_access__key__pb2.AccessKey.SerializeToString,
            ),
            'GetSecretOnce': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSecretOnce,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeySecretOnceRequest.FromString,
                    response_serializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeySecretOnceResponse.SerializeToString,
            ),
            'Activate': grpc.unary_unary_rpc_method_handler(
                    servicer.Activate,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ActivateAccessKeyRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Deactivate': grpc.unary_unary_rpc_method_handler(
                    servicer.Deactivate,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.DeactivateAccessKeyRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=nebius_dot_iam_dot_v1_dot_access__key__service__pb2.DeleteAccessKeyRequest.FromString,
                    response_serializer=nebius_dot_common_dot_v1_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.iam.v1.AccessKeyService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AccessKeyService(object):
    """Access keys API v1 is depricated. It's known to malfunction under certain conditions.
    Use Access keys API v2 instead. Access keys create by API v1 are available using Access keys API v2.
    """

    @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, '/nebius.iam.v1.AccessKeyService/Create',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.CreateAccessKeyRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/nebius.iam.v1.AccessKeyService/List',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysRequest.SerializeToString,
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListByAccount(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, '/nebius.iam.v1.AccessKeyService/ListByAccount',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysByAccountRequest.SerializeToString,
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ListAccessKeysResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/nebius.iam.v1.AccessKeyService/Update',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.UpdateAccessKeyRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetById(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, '/nebius.iam.v1.AccessKeyService/GetById',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeyByIdRequest.SerializeToString,
            nebius_dot_iam_dot_v1_dot_access__key__pb2.AccessKey.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetByAwsId(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, '/nebius.iam.v1.AccessKeyService/GetByAwsId',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeyByAwsIdRequest.SerializeToString,
            nebius_dot_iam_dot_v1_dot_access__key__pb2.AccessKey.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSecretOnce(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, '/nebius.iam.v1.AccessKeyService/GetSecretOnce',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeySecretOnceRequest.SerializeToString,
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.GetAccessKeySecretOnceResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Activate(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, '/nebius.iam.v1.AccessKeyService/Activate',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.ActivateAccessKeyRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Deactivate(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, '/nebius.iam.v1.AccessKeyService/Deactivate',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.DeactivateAccessKeyRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/nebius.iam.v1.AccessKeyService/Delete',
            nebius_dot_iam_dot_v1_dot_access__key__service__pb2.DeleteAccessKeyRequest.SerializeToString,
            nebius_dot_common_dot_v1_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
