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

import context_pb2 as context__pb2
import policy_pb2 as policy__pb2
import service_pb2 as service__pb2


class PolicyServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.PolicyAdd = channel.unary_unary(
        '/policy.PolicyService/PolicyAdd',
        request_serializer=policy__pb2.PolicyRule.SerializeToString,
        response_deserializer=policy__pb2.PolicyRuleState.FromString,
        )
    self.PolicyUpdate = channel.unary_unary(
        '/policy.PolicyService/PolicyUpdate',
        request_serializer=policy__pb2.PolicyRule.SerializeToString,
        response_deserializer=policy__pb2.PolicyRuleState.FromString,
        )
    self.PolicyDelete = channel.unary_unary(
        '/policy.PolicyService/PolicyDelete',
        request_serializer=policy__pb2.PolicyRule.SerializeToString,
        response_deserializer=policy__pb2.PolicyRuleState.FromString,
        )
    self.GetPolicy = channel.unary_unary(
        '/policy.PolicyService/GetPolicy',
        request_serializer=policy__pb2.PolicyRuleId.SerializeToString,
        response_deserializer=policy__pb2.PolicyRule.FromString,
        )
    self.GetPolicyByDeviceId = channel.unary_unary(
        '/policy.PolicyService/GetPolicyByDeviceId',
        request_serializer=context__pb2.DeviceId.SerializeToString,
        response_deserializer=policy__pb2.PolicyRuleList.FromString,
        )
    self.GetPolicyByServiceId = channel.unary_unary(
        '/policy.PolicyService/GetPolicyByServiceId',
        request_serializer=service__pb2.ServiceId.SerializeToString,
        response_deserializer=policy__pb2.PolicyRuleList.FromString,
        )


class PolicyServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def PolicyAdd(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PolicyUpdate(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PolicyDelete(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetPolicy(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetPolicyByDeviceId(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetPolicyByServiceId(self, request, context):
    # missing associated documentation comment in .proto file
    pass
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_PolicyServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'PolicyAdd': grpc.unary_unary_rpc_method_handler(
          servicer.PolicyAdd,
          request_deserializer=policy__pb2.PolicyRule.FromString,
          response_serializer=policy__pb2.PolicyRuleState.SerializeToString,
      ),
      'PolicyUpdate': grpc.unary_unary_rpc_method_handler(
          servicer.PolicyUpdate,
          request_deserializer=policy__pb2.PolicyRule.FromString,
          response_serializer=policy__pb2.PolicyRuleState.SerializeToString,
      ),
      'PolicyDelete': grpc.unary_unary_rpc_method_handler(
          servicer.PolicyDelete,
          request_deserializer=policy__pb2.PolicyRule.FromString,
          response_serializer=policy__pb2.PolicyRuleState.SerializeToString,
      ),
      'GetPolicy': grpc.unary_unary_rpc_method_handler(
          servicer.GetPolicy,
          request_deserializer=policy__pb2.PolicyRuleId.FromString,
          response_serializer=policy__pb2.PolicyRule.SerializeToString,
      ),
      'GetPolicyByDeviceId': grpc.unary_unary_rpc_method_handler(
          servicer.GetPolicyByDeviceId,
          request_deserializer=context__pb2.DeviceId.FromString,
          response_serializer=policy__pb2.PolicyRuleList.SerializeToString,
      ),
      'GetPolicyByServiceId': grpc.unary_unary_rpc_method_handler(
          servicer.GetPolicyByServiceId,
          request_deserializer=service__pb2.ServiceId.FromString,
          response_serializer=policy__pb2.PolicyRuleList.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'policy.PolicyService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
