# 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.iot.broker.v1 import broker_pb2 as yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__pb2
from yandex.cloud.iot.broker.v1 import broker_service_pb2 as yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class BrokerServiceStub(object):
    """A set of methods for managing broker.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/Get',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.GetBrokerRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__pb2.Broker.FromString,
                )
        self.List = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/List',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokersRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokersResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/Create',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.CreateBrokerRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Update = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/Update',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.UpdateBrokerRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/Delete',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ListCertificates = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/ListCertificates',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerCertificatesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerCertificatesResponse.FromString,
                )
        self.AddCertificate = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/AddCertificate',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.AddBrokerCertificateRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.DeleteCertificate = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/DeleteCertificate',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerCertificateRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ListPasswords = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/ListPasswords',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerPasswordsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerPasswordsResponse.FromString,
                )
        self.AddPassword = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/AddPassword',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.AddBrokerPasswordRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.DeletePassword = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/DeletePassword',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerPasswordRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.ListOperations = channel.unary_unary(
                '/yandex.cloud.iot.broker.v1.BrokerService/ListOperations',
                request_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerOperationsRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerOperationsResponse.FromString,
                )


class BrokerServiceServicer(object):
    """A set of methods for managing broker.
    """

    def Get(self, request, context):
        """Returns the specified broker.

        To get the list of available brokers, make a [List] request.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Retrieves the list of brokers in the specified folder.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Creates a broker in the specified folder.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Updates the specified broker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deletes the specified broker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListCertificates(self, request, context):
        """Retrieves the list of broker certificates for the specified broker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddCertificate(self, request, context):
        """Adds a certificate.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteCertificate(self, request, context):
        """Deletes the specified broker certificate.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListPasswords(self, request, context):
        """Retrieves the list of passwords for the specified broker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddPassword(self, request, context):
        """Adds password for the specified broker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeletePassword(self, request, context):
        """Deletes the specified password.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListOperations(self, request, context):
        """Lists operations for the specified broker.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BrokerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.GetBrokerRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__pb2.Broker.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokersRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokersResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.CreateBrokerRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.UpdateBrokerRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListCertificates': grpc.unary_unary_rpc_method_handler(
                    servicer.ListCertificates,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerCertificatesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerCertificatesResponse.SerializeToString,
            ),
            'AddCertificate': grpc.unary_unary_rpc_method_handler(
                    servicer.AddCertificate,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.AddBrokerCertificateRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'DeleteCertificate': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteCertificate,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerCertificateRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListPasswords': grpc.unary_unary_rpc_method_handler(
                    servicer.ListPasswords,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerPasswordsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerPasswordsResponse.SerializeToString,
            ),
            'AddPassword': grpc.unary_unary_rpc_method_handler(
                    servicer.AddPassword,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.AddBrokerPasswordRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'DeletePassword': grpc.unary_unary_rpc_method_handler(
                    servicer.DeletePassword,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerPasswordRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'ListOperations': grpc.unary_unary_rpc_method_handler(
                    servicer.ListOperations,
                    request_deserializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerOperationsRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerOperationsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.iot.broker.v1.BrokerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class BrokerService(object):
    """A set of methods for managing broker.
    """

    @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.iot.broker.v1.BrokerService/Get',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.GetBrokerRequest.SerializeToString,
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__pb2.Broker.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, '/yandex.cloud.iot.broker.v1.BrokerService/List',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokersRequest.SerializeToString,
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokersResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/yandex.cloud.iot.broker.v1.BrokerService/Create',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.CreateBrokerRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.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, '/yandex.cloud.iot.broker.v1.BrokerService/Update',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.UpdateBrokerRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_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, '/yandex.cloud.iot.broker.v1.BrokerService/Delete',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListCertificates(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.iot.broker.v1.BrokerService/ListCertificates',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerCertificatesRequest.SerializeToString,
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerCertificatesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddCertificate(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.iot.broker.v1.BrokerService/AddCertificate',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.AddBrokerCertificateRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteCertificate(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.iot.broker.v1.BrokerService/DeleteCertificate',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerCertificateRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListPasswords(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.iot.broker.v1.BrokerService/ListPasswords',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerPasswordsRequest.SerializeToString,
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerPasswordsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddPassword(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.iot.broker.v1.BrokerService/AddPassword',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.AddBrokerPasswordRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeletePassword(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.iot.broker.v1.BrokerService/DeletePassword',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.DeleteBrokerPasswordRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListOperations(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.iot.broker.v1.BrokerService/ListOperations',
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerOperationsRequest.SerializeToString,
            yandex_dot_cloud_dot_iot_dot_broker_dot_v1_dot_broker__service__pb2.ListBrokerOperationsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
