8
8
import concurrent .futures
9
9
10
10
11
+ class AuthorizeClientDeviceActionOperation (model ._AuthorizeClientDeviceActionOperation ):
12
+ """
13
+ AuthorizeClientDeviceActionOperation
14
+
15
+ Create with GreengrassCoreIPCClient.new_authorize_client_device_action()
16
+ """
17
+
18
+ def activate (self , request : model .AuthorizeClientDeviceActionRequest ): # type: (...) -> concurrent.futures.Future[None]
19
+ """
20
+ Activate this operation by sending the initial AuthorizeClientDeviceActionRequest message.
21
+
22
+ Returns a Future which completes with a result of None if the
23
+ request is successfully written to the wire, or an exception if
24
+ the request fails to send.
25
+ """
26
+ return self ._activate (request )
27
+
28
+ def get_response (self ): # type: (...) -> concurrent.futures.Future[model.AuthorizeClientDeviceActionResponse]
29
+ """
30
+ Returns a Future which completes with a result of AuthorizeClientDeviceActionResponse,
31
+ when the initial response is received, or an exception.
32
+ """
33
+ return self ._get_response ()
34
+
35
+ def close (self ): # type: (...) -> concurrent.futures.Future[None]
36
+ """
37
+ Close the operation, whether or not it has completed.
38
+
39
+ Returns a Future which completes with a result of None
40
+ when the operation has closed.
41
+ """
42
+ return super ().close ()
43
+
44
+
11
45
class CreateDebugPasswordOperation (model ._CreateDebugPasswordOperation ):
12
46
"""
13
47
CreateDebugPasswordOperation
@@ -144,6 +178,40 @@ def close(self): # type: (...) -> concurrent.futures.Future[None]
144
178
return super ().close ()
145
179
146
180
181
+ class GetClientDeviceAuthTokenOperation (model ._GetClientDeviceAuthTokenOperation ):
182
+ """
183
+ GetClientDeviceAuthTokenOperation
184
+
185
+ Create with GreengrassCoreIPCClient.new_get_client_device_auth_token()
186
+ """
187
+
188
+ def activate (self , request : model .GetClientDeviceAuthTokenRequest ): # type: (...) -> concurrent.futures.Future[None]
189
+ """
190
+ Activate this operation by sending the initial GetClientDeviceAuthTokenRequest message.
191
+
192
+ Returns a Future which completes with a result of None if the
193
+ request is successfully written to the wire, or an exception if
194
+ the request fails to send.
195
+ """
196
+ return self ._activate (request )
197
+
198
+ def get_response (self ): # type: (...) -> concurrent.futures.Future[model.GetClientDeviceAuthTokenResponse]
199
+ """
200
+ Returns a Future which completes with a result of GetClientDeviceAuthTokenResponse,
201
+ when the initial response is received, or an exception.
202
+ """
203
+ return self ._get_response ()
204
+
205
+ def close (self ): # type: (...) -> concurrent.futures.Future[None]
206
+ """
207
+ Close the operation, whether or not it has completed.
208
+
209
+ Returns a Future which completes with a result of None
210
+ when the operation has closed.
211
+ """
212
+ return super ().close ()
213
+
214
+
147
215
class GetComponentDetailsOperation (model ._GetComponentDetailsOperation ):
148
216
"""
149
217
GetComponentDetailsOperation
@@ -654,6 +722,69 @@ def close(self): # type: (...) -> concurrent.futures.Future[None]
654
722
return super ().close ()
655
723
656
724
725
+ class SubscribeToCertificateUpdatesStreamHandler (rpc .StreamResponseHandler ):
726
+ """
727
+ Event handler for SubscribeToCertificateUpdatesOperation
728
+
729
+ Inherit from this class and override methods to handle
730
+ stream events during a SubscribeToCertificateUpdatesOperation.
731
+ """
732
+
733
+ def on_stream_event (self , event : model .CertificateUpdateEvent ) -> None :
734
+ """
735
+ Invoked when a CertificateUpdateEvent is received.
736
+ """
737
+ pass
738
+
739
+ def on_stream_error (self , error : Exception ) -> bool :
740
+ """
741
+ Invoked when an error occurs on the operation stream.
742
+
743
+ Return True if operation should close as a result of this error,
744
+ """
745
+ return True
746
+
747
+ def on_stream_closed (self ) -> None :
748
+ """
749
+ Invoked when the stream for this operation is closed.
750
+ """
751
+ pass
752
+
753
+
754
+ class SubscribeToCertificateUpdatesOperation (model ._SubscribeToCertificateUpdatesOperation ):
755
+ """
756
+ SubscribeToCertificateUpdatesOperation
757
+
758
+ Create with GreengrassCoreIPCClient.new_subscribe_to_certificate_updates()
759
+ """
760
+
761
+ def activate (self , request : model .SubscribeToCertificateUpdatesRequest ): # type: (...) -> concurrent.futures.Future[None]
762
+ """
763
+ Activate this operation by sending the initial SubscribeToCertificateUpdatesRequest message.
764
+
765
+ Returns a Future which completes with a result of None if the
766
+ request is successfully written to the wire, or an exception if
767
+ the request fails to send.
768
+ """
769
+ return self ._activate (request )
770
+
771
+ def get_response (self ): # type: (...) -> concurrent.futures.Future[model.SubscribeToCertificateUpdatesResponse]
772
+ """
773
+ Returns a Future which completes with a result of SubscribeToCertificateUpdatesResponse,
774
+ when the initial response is received, or an exception.
775
+ """
776
+ return self ._get_response ()
777
+
778
+ def close (self ): # type: (...) -> concurrent.futures.Future[None]
779
+ """
780
+ Close the operation, whether or not it has completed.
781
+
782
+ Returns a Future which completes with a result of None
783
+ when the operation has closed.
784
+ """
785
+ return super ().close ()
786
+
787
+
657
788
class SubscribeToComponentUpdatesStreamHandler (rpc .StreamResponseHandler ):
658
789
"""
659
790
Event handler for SubscribeToComponentUpdatesOperation
@@ -1105,10 +1236,44 @@ def close(self): # type: (...) -> concurrent.futures.Future[None]
1105
1236
return super ().close ()
1106
1237
1107
1238
1239
+ class VerifyClientDeviceIdentityOperation (model ._VerifyClientDeviceIdentityOperation ):
1240
+ """
1241
+ VerifyClientDeviceIdentityOperation
1242
+
1243
+ Create with GreengrassCoreIPCClient.new_verify_client_device_identity()
1244
+ """
1245
+
1246
+ def activate (self , request : model .VerifyClientDeviceIdentityRequest ): # type: (...) -> concurrent.futures.Future[None]
1247
+ """
1248
+ Activate this operation by sending the initial VerifyClientDeviceIdentityRequest message.
1249
+
1250
+ Returns a Future which completes with a result of None if the
1251
+ request is successfully written to the wire, or an exception if
1252
+ the request fails to send.
1253
+ """
1254
+ return self ._activate (request )
1255
+
1256
+ def get_response (self ): # type: (...) -> concurrent.futures.Future[model.VerifyClientDeviceIdentityResponse]
1257
+ """
1258
+ Returns a Future which completes with a result of VerifyClientDeviceIdentityResponse,
1259
+ when the initial response is received, or an exception.
1260
+ """
1261
+ return self ._get_response ()
1262
+
1263
+ def close (self ): # type: (...) -> concurrent.futures.Future[None]
1264
+ """
1265
+ Close the operation, whether or not it has completed.
1266
+
1267
+ Returns a Future which completes with a result of None
1268
+ when the operation has closed.
1269
+ """
1270
+ return super ().close ()
1271
+
1272
+
1108
1273
class GreengrassCoreIPCClient (rpc .Client ):
1109
1274
"""
1110
1275
Client for the GreengrassCoreIPC service.
1111
- There is a new V2 client available for testing in developer preview .
1276
+ There is a new V2 client which should be preferred .
1112
1277
See the GreengrassCoreIPCClientV2 class in the clientv2 subpackage.
1113
1278
1114
1279
Args:
@@ -1118,6 +1283,16 @@ class GreengrassCoreIPCClient(rpc.Client):
1118
1283
def __init__ (self , connection : rpc .Connection ):
1119
1284
super ().__init__ (connection , model .SHAPE_INDEX )
1120
1285
1286
+ def new_authorize_client_device_action (self ) -> AuthorizeClientDeviceActionOperation :
1287
+ """
1288
+ Create a new AuthorizeClientDeviceActionOperation.
1289
+
1290
+ This operation will not send or receive any data until activate()
1291
+ is called. Call activate() when you're ready for callbacks and
1292
+ events to fire.
1293
+ """
1294
+ return self ._new_operation (AuthorizeClientDeviceActionOperation )
1295
+
1121
1296
def new_create_debug_password (self ) -> CreateDebugPasswordOperation :
1122
1297
"""
1123
1298
Create a new CreateDebugPasswordOperation.
@@ -1158,6 +1333,16 @@ def new_delete_thing_shadow(self) -> DeleteThingShadowOperation:
1158
1333
"""
1159
1334
return self ._new_operation (DeleteThingShadowOperation )
1160
1335
1336
+ def new_get_client_device_auth_token (self ) -> GetClientDeviceAuthTokenOperation :
1337
+ """
1338
+ Create a new GetClientDeviceAuthTokenOperation.
1339
+
1340
+ This operation will not send or receive any data until activate()
1341
+ is called. Call activate() when you're ready for callbacks and
1342
+ events to fire.
1343
+ """
1344
+ return self ._new_operation (GetClientDeviceAuthTokenOperation )
1345
+
1161
1346
def new_get_component_details (self ) -> GetComponentDetailsOperation :
1162
1347
"""
1163
1348
Create a new GetComponentDetailsOperation.
@@ -1308,6 +1493,20 @@ def new_stop_component(self) -> StopComponentOperation:
1308
1493
"""
1309
1494
return self ._new_operation (StopComponentOperation )
1310
1495
1496
+ def new_subscribe_to_certificate_updates (self , stream_handler : SubscribeToCertificateUpdatesStreamHandler ) -> SubscribeToCertificateUpdatesOperation :
1497
+ """
1498
+ Create a new SubscribeToCertificateUpdatesOperation.
1499
+
1500
+ This operation will not send or receive any data until activate()
1501
+ is called. Call activate() when you're ready for callbacks and
1502
+ events to fire.
1503
+
1504
+ Args:
1505
+ stream_handler: Methods on this object will be called as
1506
+ stream events happen on this operation.
1507
+ """
1508
+ return self ._new_operation (SubscribeToCertificateUpdatesOperation , stream_handler )
1509
+
1311
1510
def new_subscribe_to_component_updates (self , stream_handler : SubscribeToComponentUpdatesStreamHandler ) -> SubscribeToComponentUpdatesOperation :
1312
1511
"""
1313
1512
Create a new SubscribeToComponentUpdatesOperation.
@@ -1417,3 +1616,13 @@ def new_validate_authorization_token(self) -> ValidateAuthorizationTokenOperatio
1417
1616
events to fire.
1418
1617
"""
1419
1618
return self ._new_operation (ValidateAuthorizationTokenOperation )
1619
+
1620
+ def new_verify_client_device_identity (self ) -> VerifyClientDeviceIdentityOperation :
1621
+ """
1622
+ Create a new VerifyClientDeviceIdentityOperation.
1623
+
1624
+ This operation will not send or receive any data until activate()
1625
+ is called. Call activate() when you're ready for callbacks and
1626
+ events to fire.
1627
+ """
1628
+ return self ._new_operation (VerifyClientDeviceIdentityOperation )
0 commit comments