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

from chirpstack_api.api import gateway_pb2 as chirpstack__api_dot_api_dot_gateway__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class GatewayServiceStub(object):
    """GatewayService is the service providing API methods for managing gateways.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/api.GatewayService/Create',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.CreateGatewayRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Get = channel.unary_unary(
                '/api.GatewayService/Get',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/api.GatewayService/Update',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.UpdateGatewayRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Delete = channel.unary_unary(
                '/api.GatewayService/Delete',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.DeleteGatewayRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.List = channel.unary_unary(
                '/api.GatewayService/List',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.ListGatewaysRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.ListGatewaysResponse.FromString,
                )
        self.GenerateClientCertificate = channel.unary_unary(
                '/api.GatewayService/GenerateClientCertificate',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.GenerateGatewayClientCertificateRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.GenerateGatewayClientCertificateResponse.FromString,
                )
        self.GetMetrics = channel.unary_unary(
                '/api.GatewayService/GetMetrics',
                request_serializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayMetricsRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayMetricsResponse.FromString,
                )


class GatewayServiceServicer(object):
    """GatewayService is the service providing API methods for managing gateways.
    """

    def Create(self, request, context):
        """Create creates the given gateway.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get returns the gateway for the given Gateway ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

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

    def Delete(self, request, context):
        """Delete deletes the gateway matching the given Gateway ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Get the list of gateways.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GenerateClientCertificate(self, request, context):
        """Generate client-certificate for the gateway.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMetrics(self, request, context):
        """GetMetrics returns the gateway metrics.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_GatewayServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.CreateGatewayRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.UpdateGatewayRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.DeleteGatewayRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.ListGatewaysRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_gateway__pb2.ListGatewaysResponse.SerializeToString,
            ),
            'GenerateClientCertificate': grpc.unary_unary_rpc_method_handler(
                    servicer.GenerateClientCertificate,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.GenerateGatewayClientCertificateRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_gateway__pb2.GenerateGatewayClientCertificateResponse.SerializeToString,
            ),
            'GetMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetrics,
                    request_deserializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayMetricsRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayMetricsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'api.GatewayService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class GatewayService(object):
    """GatewayService is the service providing API methods for managing gateways.
    """

    @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, '/api.GatewayService/Create',
            chirpstack__api_dot_api_dot_gateway__pb2.CreateGatewayRequest.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, '/api.GatewayService/Get',
            chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayRequest.SerializeToString,
            chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayResponse.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, '/api.GatewayService/Update',
            chirpstack__api_dot_api_dot_gateway__pb2.UpdateGatewayRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.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, '/api.GatewayService/Delete',
            chirpstack__api_dot_api_dot_gateway__pb2.DeleteGatewayRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.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, '/api.GatewayService/List',
            chirpstack__api_dot_api_dot_gateway__pb2.ListGatewaysRequest.SerializeToString,
            chirpstack__api_dot_api_dot_gateway__pb2.ListGatewaysResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GenerateClientCertificate(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, '/api.GatewayService/GenerateClientCertificate',
            chirpstack__api_dot_api_dot_gateway__pb2.GenerateGatewayClientCertificateRequest.SerializeToString,
            chirpstack__api_dot_api_dot_gateway__pb2.GenerateGatewayClientCertificateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetMetrics(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, '/api.GatewayService/GetMetrics',
            chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayMetricsRequest.SerializeToString,
            chirpstack__api_dot_api_dot_gateway__pb2.GetGatewayMetricsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
