Skip to content

Commit 50332fa

Browse files
authored
Update codegen (#573)
1 parent 29fdb46 commit 50332fa

File tree

4 files changed

+208
-50
lines changed

4 files changed

+208
-50
lines changed

awsiot/greengrasscoreipc/client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,6 @@ class GreengrassCoreIPCClient(rpc.Client):
13431343
Client for the GreengrassCoreIPC service. When finished with the client,
13441344
you must call close() to free the client's native resources.
13451345
1346-
13471346
There is a new V2 client which should be preferred.
13481347
See the GreengrassCoreIPCClientV2 class in the clientv2 subpackage.
13491348

awsiot/greengrasscoreipc/model.py

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ class MessageContext(rpc.Shape):
290290
"""
291291
MessageContext
292292
293+
The context is ignored if used in PublishMessage.
294+
293295
All attributes are None by default, and may be set by keyword in the constructor.
294296
295297
Keyword Args:
@@ -6888,6 +6890,10 @@ def _response_stream_type(cls):
68886890

68896891

68906892
class _CancelLocalDeploymentOperation(rpc.ClientOperation):
6893+
"""
6894+
Cancel a local deployment on the device.
6895+
"""
6896+
68916897
@classmethod
68926898
def _model_name(cls):
68936899
return 'aws.greengrass#CancelLocalDeployment'
@@ -6932,6 +6938,10 @@ def _response_stream_type(cls):
69326938

69336939

69346940
class _CreateLocalDeploymentOperation(rpc.ClientOperation):
6941+
"""
6942+
Creates a local deployment on the device. Also allows to remove existing components.
6943+
"""
6944+
69356945
@classmethod
69366946
def _model_name(cls):
69376947
return 'aws.greengrass#CreateLocalDeployment'
@@ -6954,6 +6964,10 @@ def _response_stream_type(cls):
69546964

69556965

69566966
class _DeferComponentUpdateOperation(rpc.ClientOperation):
6967+
"""
6968+
Defer the update of components by a given amount of time and check again after that.
6969+
"""
6970+
69576971
@classmethod
69586972
def _model_name(cls):
69596973
return 'aws.greengrass#DeferComponentUpdate'
@@ -6976,6 +6990,10 @@ def _response_stream_type(cls):
69766990

69776991

69786992
class _DeleteThingShadowOperation(rpc.ClientOperation):
6993+
"""
6994+
Deletes a device shadow document stored in the local shadow service
6995+
"""
6996+
69796997
@classmethod
69806998
def _model_name(cls):
69816999
return 'aws.greengrass#DeleteThingShadow'
@@ -7020,6 +7038,10 @@ def _response_stream_type(cls):
70207038

70217039

70227040
class _GetComponentDetailsOperation(rpc.ClientOperation):
7041+
"""
7042+
Gets the status and version of the component with the given component name
7043+
"""
7044+
70237045
@classmethod
70247046
def _model_name(cls):
70257047
return 'aws.greengrass#GetComponentDetails'
@@ -7042,6 +7064,10 @@ def _response_stream_type(cls):
70427064

70437065

70447066
class _GetConfigurationOperation(rpc.ClientOperation):
7067+
"""
7068+
Get value of a given key from the configuration
7069+
"""
7070+
70457071
@classmethod
70467072
def _model_name(cls):
70477073
return 'aws.greengrass#GetConfiguration'
@@ -7064,6 +7090,10 @@ def _response_stream_type(cls):
70647090

70657091

70667092
class _GetLocalDeploymentStatusOperation(rpc.ClientOperation):
7093+
"""
7094+
Get status of a local deployment with the given deploymentId
7095+
"""
7096+
70677097
@classmethod
70687098
def _model_name(cls):
70697099
return 'aws.greengrass#GetLocalDeploymentStatus'
@@ -7108,6 +7138,10 @@ def _response_stream_type(cls):
71087138

71097139

71107140
class _GetThingShadowOperation(rpc.ClientOperation):
7141+
"""
7142+
Retrieves a device shadow document stored by the local shadow service
7143+
"""
7144+
71117145
@classmethod
71127146
def _model_name(cls):
71137147
return 'aws.greengrass#GetThingShadow'
@@ -7152,6 +7186,10 @@ def _response_stream_type(cls):
71527186

71537187

71547188
class _ListLocalDeploymentsOperation(rpc.ClientOperation):
7189+
"""
7190+
Lists the last 5 local deployments along with their statuses
7191+
"""
7192+
71557193
@classmethod
71567194
def _model_name(cls):
71577195
return 'aws.greengrass#ListLocalDeployments'
@@ -7174,6 +7212,10 @@ def _response_stream_type(cls):
71747212

71757213

71767214
class _ListNamedShadowsForThingOperation(rpc.ClientOperation):
7215+
"""
7216+
Lists the named shadows for the specified thing
7217+
"""
7218+
71777219
@classmethod
71787220
def _model_name(cls):
71797221
return 'aws.greengrass#ListNamedShadowsForThing'
@@ -7218,6 +7260,10 @@ def _response_stream_type(cls):
72187260

72197261

72207262
class _PublishToIoTCoreOperation(rpc.ClientOperation):
7263+
"""
7264+
Publish an MQTT message to AWS IoT message broker
7265+
"""
7266+
72217267
@classmethod
72227268
def _model_name(cls):
72237269
return 'aws.greengrass#PublishToIoTCore'
@@ -7240,6 +7286,10 @@ def _response_stream_type(cls):
72407286

72417287

72427288
class _PublishToTopicOperation(rpc.ClientOperation):
7289+
"""
7290+
Publish to a custom topic.
7291+
"""
7292+
72437293
@classmethod
72447294
def _model_name(cls):
72457295
return 'aws.greengrass#PublishToTopic'
@@ -7284,6 +7334,10 @@ def _response_stream_type(cls):
72847334

72857335

72867336
class _RestartComponentOperation(rpc.ClientOperation):
7337+
"""
7338+
Restarts a component with the given name
7339+
"""
7340+
72877341
@classmethod
72887342
def _model_name(cls):
72897343
return 'aws.greengrass#RestartComponent'
@@ -7328,6 +7382,12 @@ def _response_stream_type(cls):
73287382

73297383

73307384
class _SendConfigurationValidityReportOperation(rpc.ClientOperation):
7385+
"""
7386+
This operation should be used in response to event received as part of SubscribeToValidateConfigurationUpdates
7387+
subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
7388+
period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
7389+
"""
7390+
73317391
@classmethod
73327392
def _model_name(cls):
73337393
return 'aws.greengrass#SendConfigurationValidityReport'
@@ -7350,6 +7410,10 @@ def _response_stream_type(cls):
73507410

73517411

73527412
class _StopComponentOperation(rpc.ClientOperation):
7413+
"""
7414+
Stops a component with the given name
7415+
"""
7416+
73537417
@classmethod
73547418
def _model_name(cls):
73557419
return 'aws.greengrass#StopComponent'
@@ -7394,6 +7458,10 @@ def _response_stream_type(cls):
73947458

73957459

73967460
class _SubscribeToComponentUpdatesOperation(rpc.ClientOperation):
7461+
"""
7462+
Subscribe to receive notification if GGC is about to update any components
7463+
"""
7464+
73977465
@classmethod
73987466
def _model_name(cls):
73997467
return 'aws.greengrass#SubscribeToComponentUpdates'
@@ -7416,6 +7484,10 @@ def _response_stream_type(cls):
74167484

74177485

74187486
class _SubscribeToConfigurationUpdateOperation(rpc.ClientOperation):
7487+
"""
7488+
Subscribes to be notified when GGC updates the configuration for a given componentName and keyName.
7489+
"""
7490+
74197491
@classmethod
74207492
def _model_name(cls):
74217493
return 'aws.greengrass#SubscribeToConfigurationUpdate'
@@ -7438,6 +7510,10 @@ def _response_stream_type(cls):
74387510

74397511

74407512
class _SubscribeToIoTCoreOperation(rpc.ClientOperation):
7513+
"""
7514+
Subscribe to a topic in AWS IoT message broker.
7515+
"""
7516+
74417517
@classmethod
74427518
def _model_name(cls):
74437519
return 'aws.greengrass#SubscribeToIoTCore'
@@ -7460,6 +7536,10 @@ def _response_stream_type(cls):
74607536

74617537

74627538
class _SubscribeToTopicOperation(rpc.ClientOperation):
7539+
"""
7540+
Creates a subscription for a custom topic
7541+
"""
7542+
74637543
@classmethod
74647544
def _model_name(cls):
74657545
return 'aws.greengrass#SubscribeToTopic'
@@ -7482,6 +7562,13 @@ def _response_stream_type(cls):
74827562

74837563

74847564
class _SubscribeToValidateConfigurationUpdatesOperation(rpc.ClientOperation):
7565+
"""
7566+
Subscribes to be notified when GGC is about to update configuration for this component
7567+
GGC will wait for a timeout period before it proceeds with the update.
7568+
If the new configuration is not valid this component can use the SendConfigurationValidityReport
7569+
operation to indicate that
7570+
"""
7571+
74857572
@classmethod
74867573
def _model_name(cls):
74877574
return 'aws.greengrass#SubscribeToValidateConfigurationUpdates'
@@ -7504,6 +7591,11 @@ def _response_stream_type(cls):
75047591

75057592

75067593
class _UpdateConfigurationOperation(rpc.ClientOperation):
7594+
"""
7595+
Update this component's configuration by replacing the value of given keyName with the newValue.
7596+
If an oldValue is specified then update will only take effect id the current value matches the given oldValue
7597+
"""
7598+
75077599
@classmethod
75087600
def _model_name(cls):
75097601
return 'aws.greengrass#UpdateConfiguration'
@@ -7526,6 +7618,10 @@ def _response_stream_type(cls):
75267618

75277619

75287620
class _UpdateStateOperation(rpc.ClientOperation):
7621+
"""
7622+
Update status of this component
7623+
"""
7624+
75297625
@classmethod
75307626
def _model_name(cls):
75317627
return 'aws.greengrass#UpdateState'
@@ -7548,6 +7644,11 @@ def _response_stream_type(cls):
75487644

75497645

75507646
class _UpdateThingShadowOperation(rpc.ClientOperation):
7647+
"""
7648+
Updates a device shadow document stored in the local shadow service
7649+
The update is an upsert operation, with optimistic locking support
7650+
"""
7651+
75517652
@classmethod
75527653
def _model_name(cls):
75537654
return 'aws.greengrass#UpdateThingShadow'

test/echotestrpc/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ def close(self): # type: (...) -> concurrent.futures.Future[None]
296296

297297
class EchoTestRPCClient(rpc.Client):
298298
"""
299-
Client for the EchoTestRPC service.
299+
Client for the EchoTestRPC service. When finished with the client,
300+
you must call close() to free the client's native resources.
301+
300302
Args:
301303
connection: Connection that this client will use.
302304
"""

0 commit comments

Comments
 (0)