# Copyright 2020 StrongDM Inc
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import resources_pb2 as resources__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Create = channel.unary_unary(
        '/v1.Resources/Create',
        request_serializer=resources__pb2.ResourceCreateRequest.SerializeToString,
        response_deserializer=resources__pb2.ResourceCreateResponse.FromString,
        )
    self.Get = channel.unary_unary(
        '/v1.Resources/Get',
        request_serializer=resources__pb2.ResourceGetRequest.SerializeToString,
        response_deserializer=resources__pb2.ResourceGetResponse.FromString,
        )
    self.Update = channel.unary_unary(
        '/v1.Resources/Update',
        request_serializer=resources__pb2.ResourceUpdateRequest.SerializeToString,
        response_deserializer=resources__pb2.ResourceUpdateResponse.FromString,
        )
    self.Delete = channel.unary_unary(
        '/v1.Resources/Delete',
        request_serializer=resources__pb2.ResourceDeleteRequest.SerializeToString,
        response_deserializer=resources__pb2.ResourceDeleteResponse.FromString,
        )
    self.List = channel.unary_unary(
        '/v1.Resources/List',
        request_serializer=resources__pb2.ResourceListRequest.SerializeToString,
        response_deserializer=resources__pb2.ResourceListResponse.FromString,
        )


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

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

  def Get(self, request, context):
    """Get reads one Resource by ID.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Update(self, request, context):
    """Update patches a Resource by ID.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Delete(self, request, context):
    """Delete removes a Resource by ID.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def List(self, request, context):
    """List gets a list of Resources matching a given set of criteria.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ResourcesServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Create': grpc.unary_unary_rpc_method_handler(
          servicer.Create,
          request_deserializer=resources__pb2.ResourceCreateRequest.FromString,
          response_serializer=resources__pb2.ResourceCreateResponse.SerializeToString,
      ),
      'Get': grpc.unary_unary_rpc_method_handler(
          servicer.Get,
          request_deserializer=resources__pb2.ResourceGetRequest.FromString,
          response_serializer=resources__pb2.ResourceGetResponse.SerializeToString,
      ),
      'Update': grpc.unary_unary_rpc_method_handler(
          servicer.Update,
          request_deserializer=resources__pb2.ResourceUpdateRequest.FromString,
          response_serializer=resources__pb2.ResourceUpdateResponse.SerializeToString,
      ),
      'Delete': grpc.unary_unary_rpc_method_handler(
          servicer.Delete,
          request_deserializer=resources__pb2.ResourceDeleteRequest.FromString,
          response_serializer=resources__pb2.ResourceDeleteResponse.SerializeToString,
      ),
      'List': grpc.unary_unary_rpc_method_handler(
          servicer.List,
          request_deserializer=resources__pb2.ResourceListRequest.FromString,
          response_serializer=resources__pb2.ResourceListResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'v1.Resources', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
