mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Several improvement and adjustments to the Python documentation - applied autopep8 - add summary example - use references to reference other classes and methods
82 lines
3.1 KiB
Python
82 lines
3.1 KiB
Python
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
import grpc
|
|
|
|
import Definitions_pb2 as Definitions__pb2
|
|
import Grid_pb2 as Grid__pb2
|
|
|
|
|
|
class GridStub(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.GetCellCenters = channel.unary_stream(
|
|
'/rips.Grid/GetCellCenters',
|
|
request_serializer=Grid__pb2.GridRequest.SerializeToString,
|
|
response_deserializer=Definitions__pb2.CellCenters.FromString,
|
|
)
|
|
self.GetCellCorners = channel.unary_stream(
|
|
'/rips.Grid/GetCellCorners',
|
|
request_serializer=Grid__pb2.GridRequest.SerializeToString,
|
|
response_deserializer=Definitions__pb2.CellCornersArray.FromString,
|
|
)
|
|
self.GetDimensions = channel.unary_unary(
|
|
'/rips.Grid/GetDimensions',
|
|
request_serializer=Grid__pb2.GridRequest.SerializeToString,
|
|
response_deserializer=Grid__pb2.GridDimensions.FromString,
|
|
)
|
|
|
|
|
|
class GridServicer(object):
|
|
# missing associated documentation comment in .proto file
|
|
pass
|
|
|
|
def GetCellCenters(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 GetCellCorners(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 GetDimensions(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_GridServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'GetCellCenters': grpc.unary_stream_rpc_method_handler(
|
|
servicer.GetCellCenters,
|
|
request_deserializer=Grid__pb2.GridRequest.FromString,
|
|
response_serializer=Definitions__pb2.CellCenters.SerializeToString,
|
|
),
|
|
'GetCellCorners': grpc.unary_stream_rpc_method_handler(
|
|
servicer.GetCellCorners,
|
|
request_deserializer=Grid__pb2.GridRequest.FromString,
|
|
response_serializer=Definitions__pb2.CellCornersArray.SerializeToString,
|
|
),
|
|
'GetDimensions': grpc.unary_unary_rpc_method_handler(
|
|
servicer.GetDimensions,
|
|
request_deserializer=Grid__pb2.GridRequest.FromString,
|
|
response_serializer=Grid__pb2.GridDimensions.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'rips.Grid', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|