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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from spaceone.api.notification.v1 import quota_pb2 as spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/spaceone.api.notification.v1.Quota/create',
                request_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.CreateQuotaRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.FromString,
                )
        self.update = channel.unary_unary(
                '/spaceone.api.notification.v1.Quota/update',
                request_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.UpdateQuotaRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.FromString,
                )
        self.delete = channel.unary_unary(
                '/spaceone.api.notification.v1.Quota/delete',
                request_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.get = channel.unary_unary(
                '/spaceone.api.notification.v1.Quota/get',
                request_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.FromString,
                )
        self.list = channel.unary_unary(
                '/spaceone.api.notification.v1.Quota/list',
                request_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotasInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.notification.v1.Quota/stat',
                request_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


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

    def create(self, request, context):
        """
        desc: Creates a new Quota limiting the use of a selected Protocol for a day or a month. If the parameter `limit` has no value, it will be deemed unlimited. If a Protocol has not set a Quota, the default Quota set in the Config will be applied.
        request_example: >-
        {
        "protocol_id": "protocol-123456789012",
        "limit": {
        "day": 5.0,
        "month": 7.0
        }
        }
        response_example: >-
        {
        "quota_id": "quota-123456789012",
        "protocol_id": "protocol-123456789012",
        "limit": {
        "day": 5.0,
        "month": 7.0
        },
        "domain_id": "domain-123456789012"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def update(self, request, context):
        """
        desc: Updates a specific Quota. You can make changes in Quota `limit`, managing the use of the Protocol.
        request_example: >-
        {
        "quota_id": "quota-123456789012",
        "limit": {
        "day": 10.0,
        "month": 15.0
        }
        }
        response_example: >-
        {
        "quota_id": "quota-123456789012",
        "protocol_id": "protocol-123456789012",
        "limit": {
        "day": 10.0,
        "month": 15.0
        },
        "domain_id": "domain-123456789012"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def delete(self, request, context):
        """
        desc: Deletes a specific Quota. The default Quota set in the Config will be applied to the Protocol you deleted the Quota of.
        request_example: >-
        {
        "quota_id": "quota-123456789012"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        desc: Gets a specific Quota. Prints detailed information about the Quota, including the `limit` and the Protocol limited by the Quota.
        request_example: >-
        {
        "quota_id": "quota-123456789012"
        }
        response_example: >-
        {
        "quota_id": "quota-123456789012",
        "protocol_id": "protocol-123456789012",
        "limit": {
        "day": 10.0,
        "month": 15.0
        },
        "domain_id": "domain-123456789012"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        desc: Gets a list of all Quotas. You can use a query to get a filtered list of Quotas.
        request_example: >-
        {
        "query": {}
        }
        response_example: >-
        {
        "results": [
        {
        "quota_id": "quota-123456789012",
        "protocol_id": "protocol-123456789012",
        "limit": {
        "day": 10.0,
        "month": 15.0
        },
        "domain_id": "domain-123456789012"
        },
        {
        "quota_id": "quota-987654321098",
        "protocol_id": "protocol-987654321098",
        "limit": {
        "day": 5.0,
        "month": 7.0
        },
        "domain_id": "domain-123456789012"
        }
        ],
        "total_count": 2
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stat(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_QuotaServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.CreateQuotaRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.UpdateQuotaRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotasInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.notification.v1.Quota', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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, '/spaceone.api.notification.v1.Quota/create',
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.CreateQuotaRequest.SerializeToString,
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.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, '/spaceone.api.notification.v1.Quota/update',
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.UpdateQuotaRequest.SerializeToString,
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.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, '/spaceone.api.notification.v1.Quota/delete',
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/spaceone.api.notification.v1.Quota/get',
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaRequest.SerializeToString,
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaInfo.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, '/spaceone.api.notification.v1.Quota/list',
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaQuery.SerializeToString,
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotasInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stat(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, '/spaceone.api.notification.v1.Quota/stat',
            spaceone_dot_api_dot_notification_dot_v1_dot_quota__pb2.QuotaStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
