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

import ansys.api.mapdl.v0.C_StreamGrpc_pb2 as C__StreamGrpc__pb2
import ansys.api.mapdl.v0.ansys_kernel_pb2 as ansys__kernel__pb2


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

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

    Args:
      channel: A grpc.Channel.
    """
    self.Open = channel.unary_unary(
        '/ansys.api.grpcstream.v0.C_StreamGrpcService/Open',
        request_serializer=C__StreamGrpc__pb2.OpenRequest.SerializeToString,
        response_deserializer=C__StreamGrpc__pb2.OpenResponse.FromString,
        )
    self.Close = channel.unary_unary(
        '/ansys.api.grpcstream.v0.C_StreamGrpcService/Close',
        request_serializer=C__StreamGrpc__pb2.CloseRequest.SerializeToString,
        response_deserializer=C__StreamGrpc__pb2.CloseResponse.FromString,
        )
    self.Seek = channel.unary_unary(
        '/ansys.api.grpcstream.v0.C_StreamGrpcService/Seek',
        request_serializer=C__StreamGrpc__pb2.SeekRequest.SerializeToString,
        response_deserializer=C__StreamGrpc__pb2.SeekResponse.FromString,
        )
    self.Tell = channel.unary_unary(
        '/ansys.api.grpcstream.v0.C_StreamGrpcService/Tell',
        request_serializer=C__StreamGrpc__pb2.TellRequest.SerializeToString,
        response_deserializer=C__StreamGrpc__pb2.TellResponse.FromString,
        )
    self.Read = channel.unary_stream(
        '/ansys.api.grpcstream.v0.C_StreamGrpcService/Read',
        request_serializer=C__StreamGrpc__pb2.ReadRequest.SerializeToString,
        response_deserializer=ansys__kernel__pb2.Chunk.FromString,
        )
    self.Write = channel.stream_unary(
        '/ansys.api.grpcstream.v0.C_StreamGrpcService/Write',
        request_serializer=ansys__kernel__pb2.Chunk.SerializeToString,
        response_deserializer=C__StreamGrpc__pb2.WriteResponse.FromString,
        )


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

  def Open(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 Close(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 Seek(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 Tell(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 Read(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 Write(self, request_iterator, 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_C_StreamGrpcServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Open': grpc.unary_unary_rpc_method_handler(
          servicer.Open,
          request_deserializer=C__StreamGrpc__pb2.OpenRequest.FromString,
          response_serializer=C__StreamGrpc__pb2.OpenResponse.SerializeToString,
      ),
      'Close': grpc.unary_unary_rpc_method_handler(
          servicer.Close,
          request_deserializer=C__StreamGrpc__pb2.CloseRequest.FromString,
          response_serializer=C__StreamGrpc__pb2.CloseResponse.SerializeToString,
      ),
      'Seek': grpc.unary_unary_rpc_method_handler(
          servicer.Seek,
          request_deserializer=C__StreamGrpc__pb2.SeekRequest.FromString,
          response_serializer=C__StreamGrpc__pb2.SeekResponse.SerializeToString,
      ),
      'Tell': grpc.unary_unary_rpc_method_handler(
          servicer.Tell,
          request_deserializer=C__StreamGrpc__pb2.TellRequest.FromString,
          response_serializer=C__StreamGrpc__pb2.TellResponse.SerializeToString,
      ),
      'Read': grpc.unary_stream_rpc_method_handler(
          servicer.Read,
          request_deserializer=C__StreamGrpc__pb2.ReadRequest.FromString,
          response_serializer=ansys__kernel__pb2.Chunk.SerializeToString,
      ),
      'Write': grpc.stream_unary_rpc_method_handler(
          servicer.Write,
          request_deserializer=ansys__kernel__pb2.Chunk.FromString,
          response_serializer=C__StreamGrpc__pb2.WriteResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ansys.api.grpcstream.v0.C_StreamGrpcService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
