uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 1 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! |
| 2 | """Client and server classes corresponding to protobuf-defined services.""" |
| 3 | import grpc |
| 4 | |
| 5 | from dmi import hw_events_mgmt_service_pb2 as dmi_dot_hw__events__mgmt__service__pb2 |
| 6 | from dmi import hw_pb2 as dmi_dot_hw__pb2 |
| 7 | |
| 8 | |
| 9 | class NativeEventsManagementServiceStub(object): |
| 10 | """Missing associated documentation comment in .proto file.""" |
| 11 | |
| 12 | def __init__(self, channel): |
| 13 | """Constructor. |
| 14 | |
| 15 | Args: |
| 16 | channel: A grpc.Channel. |
| 17 | """ |
| 18 | self.ListEvents = channel.unary_unary( |
| 19 | '/dmi.NativeEventsManagementService/ListEvents', |
| 20 | request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString, |
| 21 | response_deserializer=dmi_dot_hw__events__mgmt__service__pb2.ListEventsResponse.FromString, |
| 22 | ) |
| 23 | self.UpdateEventsConfiguration = channel.unary_unary( |
| 24 | '/dmi.NativeEventsManagementService/UpdateEventsConfiguration', |
| 25 | request_serializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationRequest.SerializeToString, |
| 26 | response_deserializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationResponse.FromString, |
| 27 | ) |
| 28 | |
| 29 | |
| 30 | class NativeEventsManagementServiceServicer(object): |
| 31 | """Missing associated documentation comment in .proto file.""" |
| 32 | |
| 33 | def ListEvents(self, request, context): |
| 34 | """List the supported events for the passed device
|
| 35 | """ |
| 36 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 37 | context.set_details('Method not implemented!') |
| 38 | raise NotImplementedError('Method not implemented!') |
| 39 | |
| 40 | def UpdateEventsConfiguration(self, request, context): |
| 41 | """Updates the configuration of the list of events in the request
|
aghosh | c301dcd | 2020-09-03 16:55:34 +0100 | [diff] [blame] | 42 | The default behavior of the device is to report all the supported events
|
uwe ottrembka | 5ea5c0a | 2020-08-31 10:37:35 +0200 | [diff] [blame] | 43 | This configuration is persisted across reboots of the device or the device manager
|
| 44 | """ |
| 45 | context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 46 | context.set_details('Method not implemented!') |
| 47 | raise NotImplementedError('Method not implemented!') |
| 48 | |
| 49 | |
| 50 | def add_NativeEventsManagementServiceServicer_to_server(servicer, server): |
| 51 | rpc_method_handlers = { |
| 52 | 'ListEvents': grpc.unary_unary_rpc_method_handler( |
| 53 | servicer.ListEvents, |
| 54 | request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString, |
| 55 | response_serializer=dmi_dot_hw__events__mgmt__service__pb2.ListEventsResponse.SerializeToString, |
| 56 | ), |
| 57 | 'UpdateEventsConfiguration': grpc.unary_unary_rpc_method_handler( |
| 58 | servicer.UpdateEventsConfiguration, |
| 59 | request_deserializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationRequest.FromString, |
| 60 | response_serializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationResponse.SerializeToString, |
| 61 | ), |
| 62 | } |
| 63 | generic_handler = grpc.method_handlers_generic_handler( |
| 64 | 'dmi.NativeEventsManagementService', rpc_method_handlers) |
| 65 | server.add_generic_rpc_handlers((generic_handler,)) |
| 66 | |
| 67 | |
| 68 | # This class is part of an EXPERIMENTAL API. |
| 69 | class NativeEventsManagementService(object): |
| 70 | """Missing associated documentation comment in .proto file.""" |
| 71 | |
| 72 | @staticmethod |
| 73 | def ListEvents(request, |
| 74 | target, |
| 75 | options=(), |
| 76 | channel_credentials=None, |
| 77 | call_credentials=None, |
| 78 | insecure=False, |
| 79 | compression=None, |
| 80 | wait_for_ready=None, |
| 81 | timeout=None, |
| 82 | metadata=None): |
| 83 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeEventsManagementService/ListEvents', |
| 84 | dmi_dot_hw__pb2.HardwareID.SerializeToString, |
| 85 | dmi_dot_hw__events__mgmt__service__pb2.ListEventsResponse.FromString, |
| 86 | options, channel_credentials, |
| 87 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 88 | |
| 89 | @staticmethod |
| 90 | def UpdateEventsConfiguration(request, |
| 91 | target, |
| 92 | options=(), |
| 93 | channel_credentials=None, |
| 94 | call_credentials=None, |
| 95 | insecure=False, |
| 96 | compression=None, |
| 97 | wait_for_ready=None, |
| 98 | timeout=None, |
| 99 | metadata=None): |
| 100 | return grpc.experimental.unary_unary(request, target, '/dmi.NativeEventsManagementService/UpdateEventsConfiguration', |
| 101 | dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationRequest.SerializeToString, |
| 102 | dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationResponse.FromString, |
| 103 | options, channel_credentials, |
| 104 | insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |