blob: 82120236d394537a0651acc8e338c2ce7ce51e17 [file] [log] [blame]
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +02001# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2"""Client and server classes corresponding to protobuf-defined services."""
3import grpc
4
5from dmi import hw_events_mgmt_service_pb2 as dmi_dot_hw__events__mgmt__service__pb2
6from dmi import hw_pb2 as dmi_dot_hw__pb2
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +05307from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +02008
9
10class NativeEventsManagementServiceStub(object):
11 """Missing associated documentation comment in .proto file."""
12
13 def __init__(self, channel):
14 """Constructor.
15
16 Args:
17 channel: A grpc.Channel.
18 """
19 self.ListEvents = channel.unary_unary(
20 '/dmi.NativeEventsManagementService/ListEvents',
21 request_serializer=dmi_dot_hw__pb2.HardwareID.SerializeToString,
22 response_deserializer=dmi_dot_hw__events__mgmt__service__pb2.ListEventsResponse.FromString,
23 )
24 self.UpdateEventsConfiguration = channel.unary_unary(
25 '/dmi.NativeEventsManagementService/UpdateEventsConfiguration',
26 request_serializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationRequest.SerializeToString,
27 response_deserializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationResponse.FromString,
28 )
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053029 self.StreamEvents = channel.unary_stream(
30 '/dmi.NativeEventsManagementService/StreamEvents',
31 request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
32 response_deserializer=dmi_dot_hw__events__mgmt__service__pb2.Event.FromString,
33 )
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020034
35
36class NativeEventsManagementServiceServicer(object):
37 """Missing associated documentation comment in .proto file."""
38
39 def ListEvents(self, request, context):
40 """List the supported events for the passed device
41 """
42 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
43 context.set_details('Method not implemented!')
44 raise NotImplementedError('Method not implemented!')
45
46 def UpdateEventsConfiguration(self, request, context):
47 """Updates the configuration of the list of events in the request
aghoshc301dcd2020-09-03 16:55:34 +010048 The default behavior of the device is to report all the supported events
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020049 This configuration is persisted across reboots of the device or the device manager
50 """
51 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
52 context.set_details('Method not implemented!')
53 raise NotImplementedError('Method not implemented!')
54
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053055 def StreamEvents(self, request, context):
56 """Initiate the server streaming of the events
57 """
58 context.set_code(grpc.StatusCode.UNIMPLEMENTED)
59 context.set_details('Method not implemented!')
60 raise NotImplementedError('Method not implemented!')
61
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020062
63def add_NativeEventsManagementServiceServicer_to_server(servicer, server):
64 rpc_method_handlers = {
65 'ListEvents': grpc.unary_unary_rpc_method_handler(
66 servicer.ListEvents,
67 request_deserializer=dmi_dot_hw__pb2.HardwareID.FromString,
68 response_serializer=dmi_dot_hw__events__mgmt__service__pb2.ListEventsResponse.SerializeToString,
69 ),
70 'UpdateEventsConfiguration': grpc.unary_unary_rpc_method_handler(
71 servicer.UpdateEventsConfiguration,
72 request_deserializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationRequest.FromString,
73 response_serializer=dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationResponse.SerializeToString,
74 ),
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +053075 'StreamEvents': grpc.unary_stream_rpc_method_handler(
76 servicer.StreamEvents,
77 request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
78 response_serializer=dmi_dot_hw__events__mgmt__service__pb2.Event.SerializeToString,
79 ),
uwe ottrembka5ea5c0a2020-08-31 10:37:35 +020080 }
81 generic_handler = grpc.method_handlers_generic_handler(
82 'dmi.NativeEventsManagementService', rpc_method_handlers)
83 server.add_generic_rpc_handlers((generic_handler,))
84
85
86 # This class is part of an EXPERIMENTAL API.
87class NativeEventsManagementService(object):
88 """Missing associated documentation comment in .proto file."""
89
90 @staticmethod
91 def ListEvents(request,
92 target,
93 options=(),
94 channel_credentials=None,
95 call_credentials=None,
96 insecure=False,
97 compression=None,
98 wait_for_ready=None,
99 timeout=None,
100 metadata=None):
101 return grpc.experimental.unary_unary(request, target, '/dmi.NativeEventsManagementService/ListEvents',
102 dmi_dot_hw__pb2.HardwareID.SerializeToString,
103 dmi_dot_hw__events__mgmt__service__pb2.ListEventsResponse.FromString,
104 options, channel_credentials,
105 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
106
107 @staticmethod
108 def UpdateEventsConfiguration(request,
109 target,
110 options=(),
111 channel_credentials=None,
112 call_credentials=None,
113 insecure=False,
114 compression=None,
115 wait_for_ready=None,
116 timeout=None,
117 metadata=None):
118 return grpc.experimental.unary_unary(request, target, '/dmi.NativeEventsManagementService/UpdateEventsConfiguration',
119 dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationRequest.SerializeToString,
120 dmi_dot_hw__events__mgmt__service__pb2.EventsConfigurationResponse.FromString,
121 options, channel_credentials,
122 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
Chandrakanth Nalkudre Gowda68590a42021-04-22 15:19:21 +0530123
124 @staticmethod
125 def StreamEvents(request,
126 target,
127 options=(),
128 channel_credentials=None,
129 call_credentials=None,
130 insecure=False,
131 compression=None,
132 wait_for_ready=None,
133 timeout=None,
134 metadata=None):
135 return grpc.experimental.unary_stream(request, target, '/dmi.NativeEventsManagementService/StreamEvents',
136 google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
137 dmi_dot_hw__events__mgmt__service__pb2.Event.FromString,
138 options, channel_credentials,
139 insecure, call_credentials, compression, wait_for_ready, timeout, metadata)