# Copyright (c) 2020, NVIDIA CORPORATION.  All rights reserved.
#
# 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.

# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: nvidia/clara/platform/clara.proto

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

from nvidia_clara.grpc import models_pb2 as nvidia_dot_clara_dot_platform_dot_models__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.AddMetadata = channel.unary_unary(
        '/nvidia.clara.platform.Models/AddMetadata',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsAddMetadataRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsAddMetadataResponse.FromString,
        )
    self.CreateCatalog = channel.unary_unary(
        '/nvidia.clara.platform.Models/CreateCatalog',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateCatalogRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateCatalogResponse.FromString,
        )
    self.CreateInstance = channel.unary_unary(
        '/nvidia.clara.platform.Models/CreateInstance',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateInstanceRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateInstanceResponse.FromString,
        )
    self.DeleteCatalog = channel.unary_unary(
        '/nvidia.clara.platform.Models/DeleteCatalog',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteCatalogRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteCatalogResponse.FromString,
        )
    self.DeleteInstance = channel.unary_unary(
        '/nvidia.clara.platform.Models/DeleteInstance',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteInstanceRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteInstanceResponse.FromString,
        )
    self.DeleteModel = channel.unary_unary(
        '/nvidia.clara.platform.Models/DeleteModel',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteModelRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteModelResponse.FromString,
        )
    self.DownloadModel = channel.unary_stream(
        '/nvidia.clara.platform.Models/DownloadModel',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDownloadModelRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDownloadModelResponse.FromString,
        )
    self.ListCatalogs = channel.unary_stream(
        '/nvidia.clara.platform.Models/ListCatalogs',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListCatalogsRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListCatalogsResponse.FromString,
        )
    self.ListInstances = channel.unary_stream(
        '/nvidia.clara.platform.Models/ListInstances',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListInstancesRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListInstancesResponse.FromString,
        )
    self.ListModels = channel.unary_stream(
        '/nvidia.clara.platform.Models/ListModels',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListModelsRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListModelsResponse.FromString,
        )
    self.ReadCatalog = channel.unary_stream(
        '/nvidia.clara.platform.Models/ReadCatalog',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadCatalogRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadCatalogResponse.FromString,
        )
    self.ReadInstance = channel.unary_stream(
        '/nvidia.clara.platform.Models/ReadInstance',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadInstanceRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadInstanceResponse.FromString,
        )
    self.RemoveMetadata = channel.unary_unary(
        '/nvidia.clara.platform.Models/RemoveMetadata',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsRemoveMetadataRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsRemoveMetadataResponse.FromString,
        )
    self.UpdateCatalog = channel.stream_unary(
        '/nvidia.clara.platform.Models/UpdateCatalog',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateCatalogRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateCatalogResponse.FromString,
        )
    self.UpdateInstance = channel.stream_unary(
        '/nvidia.clara.platform.Models/UpdateInstance',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateInstanceRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateInstanceResponse.FromString,
        )
    self.UploadModel = channel.stream_unary(
        '/nvidia.clara.platform.Models/UploadModel',
        request_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUploadModelRequest.SerializeToString,
        response_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUploadModelResponse.FromString,
        )


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

  def AddMetadata(self, request, context):
    """Requests the addition of metadata to a model.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateCatalog(self, request, context):
    """Requests the creation of a model catalog from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateInstance(self, request, context):
    """Requests the creation of a model catalog instance from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteCatalog(self, request, context):
    """Requests the deletion of a model catalog from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteInstance(self, request, context):
    """Requests the deletion of a model catalog instance from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteModel(self, request, context):
    """Requests the deletion of a model from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DownloadModel(self, request, context):
    """Requests the download of an existing model from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListCatalogs(self, request, context):
    """Requests the list of all existing catalogs from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListInstances(self, request, context):
    """Requests a list of all existing model catalog instances from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListModels(self, request, context):
    """Requests a list of available models from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ReadCatalog(self, request, context):
    """Requests the contents of a model catalog from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ReadInstance(self, request, context):
    """Requests the contents of a model catalog instance from the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RemoveMetadata(self, request, context):
    """Requests the removal of metadata from a model.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateCatalog(self, request_iterator, context):
    """Requests the update of an existing model catalog in the model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateInstance(self, request_iterator, context):
    """Requests the update of an existing model catalog instance with a new set of models.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UploadModel(self, request_iterator, context):
    """Requests the uploads of a new model to model repository.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ModelsServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'AddMetadata': grpc.unary_unary_rpc_method_handler(
          servicer.AddMetadata,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsAddMetadataRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsAddMetadataResponse.SerializeToString,
      ),
      'CreateCatalog': grpc.unary_unary_rpc_method_handler(
          servicer.CreateCatalog,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateCatalogRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateCatalogResponse.SerializeToString,
      ),
      'CreateInstance': grpc.unary_unary_rpc_method_handler(
          servicer.CreateInstance,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateInstanceRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsCreateInstanceResponse.SerializeToString,
      ),
      'DeleteCatalog': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteCatalog,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteCatalogRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteCatalogResponse.SerializeToString,
      ),
      'DeleteInstance': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteInstance,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteInstanceRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteInstanceResponse.SerializeToString,
      ),
      'DeleteModel': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteModel,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteModelRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDeleteModelResponse.SerializeToString,
      ),
      'DownloadModel': grpc.unary_stream_rpc_method_handler(
          servicer.DownloadModel,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDownloadModelRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsDownloadModelResponse.SerializeToString,
      ),
      'ListCatalogs': grpc.unary_stream_rpc_method_handler(
          servicer.ListCatalogs,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListCatalogsRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListCatalogsResponse.SerializeToString,
      ),
      'ListInstances': grpc.unary_stream_rpc_method_handler(
          servicer.ListInstances,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListInstancesRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListInstancesResponse.SerializeToString,
      ),
      'ListModels': grpc.unary_stream_rpc_method_handler(
          servicer.ListModels,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListModelsRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsListModelsResponse.SerializeToString,
      ),
      'ReadCatalog': grpc.unary_stream_rpc_method_handler(
          servicer.ReadCatalog,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadCatalogRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadCatalogResponse.SerializeToString,
      ),
      'ReadInstance': grpc.unary_stream_rpc_method_handler(
          servicer.ReadInstance,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadInstanceRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsReadInstanceResponse.SerializeToString,
      ),
      'RemoveMetadata': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveMetadata,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsRemoveMetadataRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsRemoveMetadataResponse.SerializeToString,
      ),
      'UpdateCatalog': grpc.stream_unary_rpc_method_handler(
          servicer.UpdateCatalog,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateCatalogRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateCatalogResponse.SerializeToString,
      ),
      'UpdateInstance': grpc.stream_unary_rpc_method_handler(
          servicer.UpdateInstance,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateInstanceRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUpdateInstanceResponse.SerializeToString,
      ),
      'UploadModel': grpc.stream_unary_rpc_method_handler(
          servicer.UploadModel,
          request_deserializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUploadModelRequest.FromString,
          response_serializer=nvidia_dot_clara_dot_platform_dot_models__pb2.ModelsUploadModelResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'nvidia.clara.platform.Models', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
