# 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.mysterybox.v1 import payload_service_pb2 as nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/nebius.mysterybox.v1.PayloadService/Get',
                request_serializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.GetPayloadRequest.SerializeToString,
                response_deserializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.SecretPayload.FromString,
                )
        self.GetByKey = channel.unary_unary(
                '/nebius.mysterybox.v1.PayloadService/GetByKey',
                request_serializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.GetPayloadByKeyRequest.SerializeToString,
                response_deserializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.SecretPayloadEntry.FromString,
                )


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

    def Get(self, request, context):
        """Returns the secret's payload in its decrypted format.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetByKey(self, request, context):
        """Returns the secret's payload value by key in its decrypted format.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_PayloadServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.GetPayloadRequest.FromString,
                    response_serializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.SecretPayload.SerializeToString,
            ),
            'GetByKey': grpc.unary_unary_rpc_method_handler(
                    servicer.GetByKey,
                    request_deserializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.GetPayloadByKeyRequest.FromString,
                    response_serializer=nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.SecretPayloadEntry.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'nebius.mysterybox.v1.PayloadService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Get(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.mysterybox.v1.PayloadService/Get',
            nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.GetPayloadRequest.SerializeToString,
            nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.SecretPayload.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetByKey(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.mysterybox.v1.PayloadService/GetByKey',
            nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.GetPayloadByKeyRequest.SerializeToString,
            nebius_dot_mysterybox_dot_v1_dot_payload__service__pb2.SecretPayloadEntry.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
