Skip to content

Update codegen #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion awsiot/greengrasscoreipc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,6 @@ class GreengrassCoreIPCClient(rpc.Client):
Client for the GreengrassCoreIPC service. When finished with the client,
you must call close() to free the client's native resources.
There is a new V2 client which should be preferred.
See the GreengrassCoreIPCClientV2 class in the clientv2 subpackage.
Expand Down
101 changes: 101 additions & 0 deletions awsiot/greengrasscoreipc/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ class MessageContext(rpc.Shape):
"""
MessageContext
The context is ignored if used in PublishMessage.
All attributes are None by default, and may be set by keyword in the constructor.
Keyword Args:
Expand Down Expand Up @@ -6888,6 +6890,10 @@ def _response_stream_type(cls):


class _CancelLocalDeploymentOperation(rpc.ClientOperation):
"""
Cancel a local deployment on the device.
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#CancelLocalDeployment'
Expand Down Expand Up @@ -6932,6 +6938,10 @@ def _response_stream_type(cls):


class _CreateLocalDeploymentOperation(rpc.ClientOperation):
"""
Creates a local deployment on the device. Also allows to remove existing components.
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#CreateLocalDeployment'
Expand All @@ -6954,6 +6964,10 @@ def _response_stream_type(cls):


class _DeferComponentUpdateOperation(rpc.ClientOperation):
"""
Defer the update of components by a given amount of time and check again after that.
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#DeferComponentUpdate'
Expand All @@ -6976,6 +6990,10 @@ def _response_stream_type(cls):


class _DeleteThingShadowOperation(rpc.ClientOperation):
"""
Deletes a device shadow document stored in the local shadow service
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#DeleteThingShadow'
Expand Down Expand Up @@ -7020,6 +7038,10 @@ def _response_stream_type(cls):


class _GetComponentDetailsOperation(rpc.ClientOperation):
"""
Gets the status and version of the component with the given component name
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#GetComponentDetails'
Expand All @@ -7042,6 +7064,10 @@ def _response_stream_type(cls):


class _GetConfigurationOperation(rpc.ClientOperation):
"""
Get value of a given key from the configuration
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#GetConfiguration'
Expand All @@ -7064,6 +7090,10 @@ def _response_stream_type(cls):


class _GetLocalDeploymentStatusOperation(rpc.ClientOperation):
"""
Get status of a local deployment with the given deploymentId
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#GetLocalDeploymentStatus'
Expand Down Expand Up @@ -7108,6 +7138,10 @@ def _response_stream_type(cls):


class _GetThingShadowOperation(rpc.ClientOperation):
"""
Retrieves a device shadow document stored by the local shadow service
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#GetThingShadow'
Expand Down Expand Up @@ -7152,6 +7186,10 @@ def _response_stream_type(cls):


class _ListLocalDeploymentsOperation(rpc.ClientOperation):
"""
Lists the last 5 local deployments along with their statuses
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#ListLocalDeployments'
Expand All @@ -7174,6 +7212,10 @@ def _response_stream_type(cls):


class _ListNamedShadowsForThingOperation(rpc.ClientOperation):
"""
Lists the named shadows for the specified thing
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#ListNamedShadowsForThing'
Expand Down Expand Up @@ -7218,6 +7260,10 @@ def _response_stream_type(cls):


class _PublishToIoTCoreOperation(rpc.ClientOperation):
"""
Publish an MQTT message to AWS IoT message broker
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#PublishToIoTCore'
Expand All @@ -7240,6 +7286,10 @@ def _response_stream_type(cls):


class _PublishToTopicOperation(rpc.ClientOperation):
"""
Publish to a custom topic.
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#PublishToTopic'
Expand Down Expand Up @@ -7284,6 +7334,10 @@ def _response_stream_type(cls):


class _RestartComponentOperation(rpc.ClientOperation):
"""
Restarts a component with the given name
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#RestartComponent'
Expand Down Expand Up @@ -7328,6 +7382,12 @@ def _response_stream_type(cls):


class _SendConfigurationValidityReportOperation(rpc.ClientOperation):
"""
This operation should be used in response to event received as part of SubscribeToValidateConfigurationUpdates
subscription. It is not necessary to send the report if the configuration is valid (GGC will wait for timeout
period and proceed). Sending the report with invalid config status will prevent GGC from applying the updates
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#SendConfigurationValidityReport'
Expand All @@ -7350,6 +7410,10 @@ def _response_stream_type(cls):


class _StopComponentOperation(rpc.ClientOperation):
"""
Stops a component with the given name
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#StopComponent'
Expand Down Expand Up @@ -7394,6 +7458,10 @@ def _response_stream_type(cls):


class _SubscribeToComponentUpdatesOperation(rpc.ClientOperation):
"""
Subscribe to receive notification if GGC is about to update any components
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#SubscribeToComponentUpdates'
Expand All @@ -7416,6 +7484,10 @@ def _response_stream_type(cls):


class _SubscribeToConfigurationUpdateOperation(rpc.ClientOperation):
"""
Subscribes to be notified when GGC updates the configuration for a given componentName and keyName.
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#SubscribeToConfigurationUpdate'
Expand All @@ -7438,6 +7510,10 @@ def _response_stream_type(cls):


class _SubscribeToIoTCoreOperation(rpc.ClientOperation):
"""
Subscribe to a topic in AWS IoT message broker.
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#SubscribeToIoTCore'
Expand All @@ -7460,6 +7536,10 @@ def _response_stream_type(cls):


class _SubscribeToTopicOperation(rpc.ClientOperation):
"""
Creates a subscription for a custom topic
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#SubscribeToTopic'
Expand All @@ -7482,6 +7562,13 @@ def _response_stream_type(cls):


class _SubscribeToValidateConfigurationUpdatesOperation(rpc.ClientOperation):
"""
Subscribes to be notified when GGC is about to update configuration for this component
GGC will wait for a timeout period before it proceeds with the update.
If the new configuration is not valid this component can use the SendConfigurationValidityReport
operation to indicate that
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#SubscribeToValidateConfigurationUpdates'
Expand All @@ -7504,6 +7591,11 @@ def _response_stream_type(cls):


class _UpdateConfigurationOperation(rpc.ClientOperation):
"""
Update this component's configuration by replacing the value of given keyName with the newValue.
If an oldValue is specified then update will only take effect id the current value matches the given oldValue
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#UpdateConfiguration'
Expand All @@ -7526,6 +7618,10 @@ def _response_stream_type(cls):


class _UpdateStateOperation(rpc.ClientOperation):
"""
Update status of this component
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#UpdateState'
Expand All @@ -7548,6 +7644,11 @@ def _response_stream_type(cls):


class _UpdateThingShadowOperation(rpc.ClientOperation):
"""
Updates a device shadow document stored in the local shadow service
The update is an upsert operation, with optimistic locking support
"""

@classmethod
def _model_name(cls):
return 'aws.greengrass#UpdateThingShadow'
Expand Down
4 changes: 3 additions & 1 deletion test/echotestrpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ def close(self): # type: (...) -> concurrent.futures.Future[None]

class EchoTestRPCClient(rpc.Client):
"""
Client for the EchoTestRPC service.
Client for the EchoTestRPC service. When finished with the client,
you must call close() to free the client's native resources.
Args:
connection: Connection that this client will use.
"""
Expand Down
Loading