# 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.mdb.greenplum.v1 import hba_rule_service_pb2 as yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2
from yandex.cloud.operation import operation_pb2 as yandex_dot_cloud_dot_operation_dot_operation__pb2


class HBARuleServiceStub(object):
    """A set of methods for managing Greenplum clusters.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.List = channel.unary_unary(
                '/yandex.cloud.mdb.greenplum.v1.HBARuleService/List',
                request_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesResponse.FromString,
                )
        self.ListAtRevision = channel.unary_unary(
                '/yandex.cloud.mdb.greenplum.v1.HBARuleService/ListAtRevision',
                request_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesAtRevisionRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesResponse.FromString,
                )
        self.Create = channel.unary_unary(
                '/yandex.cloud.mdb.greenplum.v1.HBARuleService/Create',
                request_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.CreateHBARuleRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Update = channel.unary_unary(
                '/yandex.cloud.mdb.greenplum.v1.HBARuleService/Update',
                request_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.UpdateHBARuleRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.Delete = channel.unary_unary(
                '/yandex.cloud.mdb.greenplum.v1.HBARuleService/Delete',
                request_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.DeleteHBARuleRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )
        self.BatchUpdate = channel.unary_unary(
                '/yandex.cloud.mdb.greenplum.v1.HBARuleService/BatchUpdate',
                request_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.BatchUpdateHBARulesRequest.SerializeToString,
                response_deserializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
                )


class HBARuleServiceServicer(object):
    """A set of methods for managing Greenplum clusters.
    """

    def List(self, request, context):
        """Retrieves a list of HBA rules for Greenplum clusters.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListAtRevision(self, request, context):
        """Retrieves a list of HBA rules for Greenplum clusters for particular revision.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Create(self, request, context):
        """Create single HBA rule for the specified Greenplum cluster to the end of HBA rules list.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Update specified HBA rule for the specified Greenplum cluster without changind it order.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete specified HBA rule for the specified Greenplum cluster.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BatchUpdate(self, request, context):
        """Modifies all HBA rules for the specified Greenplum cluster.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_HBARuleServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesResponse.SerializeToString,
            ),
            'ListAtRevision': grpc.unary_unary_rpc_method_handler(
                    servicer.ListAtRevision,
                    request_deserializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesAtRevisionRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesResponse.SerializeToString,
            ),
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.CreateHBARuleRequest.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_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.UpdateHBARuleRequest.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_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.DeleteHBARuleRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
            'BatchUpdate': grpc.unary_unary_rpc_method_handler(
                    servicer.BatchUpdate,
                    request_deserializer=yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.BatchUpdateHBARulesRequest.FromString,
                    response_serializer=yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'yandex.cloud.mdb.greenplum.v1.HBARuleService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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.mdb.greenplum.v1.HBARuleService/List',
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesRequest.SerializeToString,
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListAtRevision(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.mdb.greenplum.v1.HBARuleService/ListAtRevision',
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesAtRevisionRequest.SerializeToString,
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.ListHBARulesResponse.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.mdb.greenplum.v1.HBARuleService/Create',
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.CreateHBARuleRequest.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.mdb.greenplum.v1.HBARuleService/Update',
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.UpdateHBARuleRequest.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.mdb.greenplum.v1.HBARuleService/Delete',
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.DeleteHBARuleRequest.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 BatchUpdate(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.mdb.greenplum.v1.HBARuleService/BatchUpdate',
            yandex_dot_cloud_dot_mdb_dot_greenplum_dot_v1_dot_hba__rule__service__pb2.BatchUpdateHBARulesRequest.SerializeToString,
            yandex_dot_cloud_dot_operation_dot_operation__pb2.Operation.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
