# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from capsule8.api.v0 import config_service_pb2 as capsule8_dot_api_dot_v0_dot_config__service__pb2


class ConfigServiceStub(object):
  """
  Capsule8 Config API

  The Config API is used by capsulators to get and set configurations

  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateConfig = channel.unary_unary(
        '/capsule8.api.v0.ConfigService/CreateConfig',
        request_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.CreateConfigRequest.SerializeToString,
        response_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.CreateConfigResponse.FromString,
        )
    self.GetConfig = channel.unary_unary(
        '/capsule8.api.v0.ConfigService/GetConfig',
        request_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.GetConfigRequest.SerializeToString,
        response_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.GetConfigResponse.FromString,
        )
    self.WatchConfig = channel.unary_stream(
        '/capsule8.api.v0.ConfigService/WatchConfig',
        request_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.WatchConfigRequest.SerializeToString,
        response_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.WatchConfigResponse.FromString,
        )
    self.ListConfigs = channel.unary_unary(
        '/capsule8.api.v0.ConfigService/ListConfigs',
        request_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.ListConfigsRequest.SerializeToString,
        response_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.ListConfigsResponse.FromString,
        )


class ConfigServiceServicer(object):
  """
  Capsule8 Config API

  The Config API is used by capsulators to get and set configurations

  """

  def CreateConfig(self, request, context):
    """Create a config
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetConfig(self, request, context):
    """Get a config
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WatchConfig(self, request, context):
    """Watch a config
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListConfigs(self, request, context):
    """List all available configs
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ConfigServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateConfig': grpc.unary_unary_rpc_method_handler(
          servicer.CreateConfig,
          request_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.CreateConfigRequest.FromString,
          response_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.CreateConfigResponse.SerializeToString,
      ),
      'GetConfig': grpc.unary_unary_rpc_method_handler(
          servicer.GetConfig,
          request_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.GetConfigRequest.FromString,
          response_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.GetConfigResponse.SerializeToString,
      ),
      'WatchConfig': grpc.unary_stream_rpc_method_handler(
          servicer.WatchConfig,
          request_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.WatchConfigRequest.FromString,
          response_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.WatchConfigResponse.SerializeToString,
      ),
      'ListConfigs': grpc.unary_unary_rpc_method_handler(
          servicer.ListConfigs,
          request_deserializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.ListConfigsRequest.FromString,
          response_serializer=capsule8_dot_api_dot_v0_dot_config__service__pb2.ListConfigsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'capsule8.api.v0.ConfigService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
