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

from yandex.cloud.lockbox.v1 import payload_pb2 as yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__pb2
from yandex.cloud.lockbox.v1 import payload_service_pb2 as yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__service__pb2


class PayloadServiceStub(object):
    """Set of methods to access payload of secrets.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/yandex.cloud.lockbox.v1.PayloadService/Get',
                request_serializer=yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__service__pb2.GetPayloadRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__pb2.Payload.FromString,
                )


class PayloadServiceServicer(object):
    """Set of methods to access payload of secrets.
    """

    def Get(self, request, context):
        """Returns the payload of the specified secret.

        To get the list of all available secrets, make a [SecretService.List] request.
        """
        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=yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__service__pb2.GetPayloadRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__pb2.Payload.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.lockbox.v1.PayloadService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class PayloadService(object):
    """Set of methods to access payload of secrets.
    """

    @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, '/yandex.cloud.lockbox.v1.PayloadService/Get',
            yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__service__pb2.GetPayloadRequest.SerializeToString,
            yandex_dot_cloud_dot_lockbox_dot_v1_dot_payload__pb2.Payload.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
