diff --git a/awsiot/greengrasscoreipc/client.py b/awsiot/greengrasscoreipc/client.py index 56438d9b..f49d3d77 100644 --- a/awsiot/greengrasscoreipc/client.py +++ b/awsiot/greengrasscoreipc/client.py @@ -71,16 +71,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class PublishToTopicOperation(model._PublishToTopicOperation): +class PublishToIoTCoreOperation(model._PublishToIoTCoreOperation): """ - PublishToTopicOperation + PublishToIoTCoreOperation - Create with GreengrassCoreIPCClient.new_publish_to_topic() + Create with GreengrassCoreIPCClient.new_publish_to_iot_core() """ - def activate(self, request: model.PublishToTopicRequest) -> concurrent.futures.Future: + def activate(self, request: model.PublishToIoTCoreRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial PublishToTopicRequest message. + Activate this operation by sending the initial PublishToIoTCoreRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -90,7 +90,7 @@ def activate(self, request: model.PublishToTopicRequest) -> concurrent.futures.F def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of PublishToTopicResponse, + Returns a Future which completes with a result of PublishToIoTCoreResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -105,16 +105,45 @@ def close(self) -> concurrent.futures.Future: return super().close() -class PublishToIoTCoreOperation(model._PublishToIoTCoreOperation): +class SubscribeToConfigurationUpdateStreamHandler(rpc.StreamResponseHandler): """ - PublishToIoTCoreOperation + Event handler for SubscribeToConfigurationUpdateOperation - Create with GreengrassCoreIPCClient.new_publish_to_iot_core() + Inherit from this class and override methods to handle + stream events during a SubscribeToConfigurationUpdateOperation. """ - def activate(self, request: model.PublishToIoTCoreRequest) -> concurrent.futures.Future: + def on_stream_event(self, event: model.ConfigurationUpdateEvents) -> None: """ - Activate this operation by sending the initial PublishToIoTCoreRequest message. + Invoked when a ConfigurationUpdateEvents is received. + """ + pass + + def on_stream_error(self, error: Exception) -> bool: + """ + Invoked when an error occurs on the operation stream. + + Return True if operation should close as a result of this error, + """ + return True + + def on_stream_closed(self) -> None: + """ + Invoked when the stream for this operation is closed. + """ + pass + + +class SubscribeToConfigurationUpdateOperation(model._SubscribeToConfigurationUpdateOperation): + """ + SubscribeToConfigurationUpdateOperation + + Create with GreengrassCoreIPCClient.new_subscribe_to_configuration_update() + """ + + def activate(self, request: model.SubscribeToConfigurationUpdateRequest) -> concurrent.futures.Future: + """ + Activate this operation by sending the initial SubscribeToConfigurationUpdateRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -124,7 +153,7 @@ def activate(self, request: model.PublishToIoTCoreRequest) -> concurrent.futures def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of PublishToIoTCoreResponse, + Returns a Future which completes with a result of SubscribeToConfigurationUpdateResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -139,17 +168,85 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SubscribeToConfigurationUpdateStreamHandler(rpc.StreamResponseHandler): +class DeleteThingShadowOperation(model._DeleteThingShadowOperation): """ - Event handler for SubscribeToConfigurationUpdateOperation + DeleteThingShadowOperation + + Create with GreengrassCoreIPCClient.new_delete_thing_shadow() + """ + + def activate(self, request: model.DeleteThingShadowRequest) -> concurrent.futures.Future: + """ + Activate this operation by sending the initial DeleteThingShadowRequest message. + + Returns a Future which completes with a result of None if the + request is successfully written to the wire, or an exception if + the request fails to send. + """ + return self._activate(request) + + def get_response(self) -> concurrent.futures.Future: + """ + Returns a Future which completes with a result of DeleteThingShadowResponse, + when the initial response is received, or an exception. + """ + return self._get_response() + + def close(self) -> concurrent.futures.Future: + """ + Close the operation, whether or not it has completed. + + Returns a Future which completes with a result of None + when the operation has closed. + """ + return super().close() + + +class DeferComponentUpdateOperation(model._DeferComponentUpdateOperation): + """ + DeferComponentUpdateOperation + + Create with GreengrassCoreIPCClient.new_defer_component_update() + """ + + def activate(self, request: model.DeferComponentUpdateRequest) -> concurrent.futures.Future: + """ + Activate this operation by sending the initial DeferComponentUpdateRequest message. + + Returns a Future which completes with a result of None if the + request is successfully written to the wire, or an exception if + the request fails to send. + """ + return self._activate(request) + + def get_response(self) -> concurrent.futures.Future: + """ + Returns a Future which completes with a result of DeferComponentUpdateResponse, + when the initial response is received, or an exception. + """ + return self._get_response() + + def close(self) -> concurrent.futures.Future: + """ + Close the operation, whether or not it has completed. + + Returns a Future which completes with a result of None + when the operation has closed. + """ + return super().close() + + +class SubscribeToValidateConfigurationUpdatesStreamHandler(rpc.StreamResponseHandler): + """ + Event handler for SubscribeToValidateConfigurationUpdatesOperation Inherit from this class and override methods to handle - stream events during a SubscribeToConfigurationUpdateOperation. + stream events during a SubscribeToValidateConfigurationUpdatesOperation. """ - def on_stream_event(self, event: model.ConfigurationUpdateEvents) -> None: + def on_stream_event(self, event: model.ValidateConfigurationUpdateEvents) -> None: """ - Invoked when a ConfigurationUpdateEvents is received. + Invoked when a ValidateConfigurationUpdateEvents is received. """ pass @@ -168,16 +265,16 @@ def on_stream_closed(self) -> None: pass -class SubscribeToConfigurationUpdateOperation(model._SubscribeToConfigurationUpdateOperation): +class SubscribeToValidateConfigurationUpdatesOperation(model._SubscribeToValidateConfigurationUpdatesOperation): """ - SubscribeToConfigurationUpdateOperation + SubscribeToValidateConfigurationUpdatesOperation - Create with GreengrassCoreIPCClient.new_subscribe_to_configuration_update() + Create with GreengrassCoreIPCClient.new_subscribe_to_validate_configuration_updates() """ - def activate(self, request: model.SubscribeToConfigurationUpdateRequest) -> concurrent.futures.Future: + def activate(self, request: model.SubscribeToValidateConfigurationUpdatesRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SubscribeToConfigurationUpdateRequest message. + Activate this operation by sending the initial SubscribeToValidateConfigurationUpdatesRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -187,7 +284,7 @@ def activate(self, request: model.SubscribeToConfigurationUpdateRequest) -> conc def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of SubscribeToConfigurationUpdateResponse, + Returns a Future which completes with a result of SubscribeToValidateConfigurationUpdatesResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -202,16 +299,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class ListComponentsOperation(model._ListComponentsOperation): +class GetConfigurationOperation(model._GetConfigurationOperation): """ - ListComponentsOperation + GetConfigurationOperation - Create with GreengrassCoreIPCClient.new_list_components() + Create with GreengrassCoreIPCClient.new_get_configuration() """ - def activate(self, request: model.ListComponentsRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetConfigurationRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial ListComponentsRequest message. + Activate this operation by sending the initial GetConfigurationRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -221,7 +318,7 @@ def activate(self, request: model.ListComponentsRequest) -> concurrent.futures.F def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of ListComponentsResponse, + Returns a Future which completes with a result of GetConfigurationResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -236,16 +333,45 @@ def close(self) -> concurrent.futures.Future: return super().close() -class CreateDebugPasswordOperation(model._CreateDebugPasswordOperation): +class SubscribeToTopicStreamHandler(rpc.StreamResponseHandler): """ - CreateDebugPasswordOperation + Event handler for SubscribeToTopicOperation - Create with GreengrassCoreIPCClient.new_create_debug_password() + Inherit from this class and override methods to handle + stream events during a SubscribeToTopicOperation. """ - def activate(self, request: model.CreateDebugPasswordRequest) -> concurrent.futures.Future: + def on_stream_event(self, event: model.SubscriptionResponseMessage) -> None: """ - Activate this operation by sending the initial CreateDebugPasswordRequest message. + Invoked when a SubscriptionResponseMessage is received. + """ + pass + + def on_stream_error(self, error: Exception) -> bool: + """ + Invoked when an error occurs on the operation stream. + + Return True if operation should close as a result of this error, + """ + return True + + def on_stream_closed(self) -> None: + """ + Invoked when the stream for this operation is closed. + """ + pass + + +class SubscribeToTopicOperation(model._SubscribeToTopicOperation): + """ + SubscribeToTopicOperation + + Create with GreengrassCoreIPCClient.new_subscribe_to_topic() + """ + + def activate(self, request: model.SubscribeToTopicRequest) -> concurrent.futures.Future: + """ + Activate this operation by sending the initial SubscribeToTopicRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -255,7 +381,7 @@ def activate(self, request: model.CreateDebugPasswordRequest) -> concurrent.futu def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of CreateDebugPasswordResponse, + Returns a Future which completes with a result of SubscribeToTopicResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -270,16 +396,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class DeferComponentUpdateOperation(model._DeferComponentUpdateOperation): +class GetComponentDetailsOperation(model._GetComponentDetailsOperation): """ - DeferComponentUpdateOperation + GetComponentDetailsOperation - Create with GreengrassCoreIPCClient.new_defer_component_update() + Create with GreengrassCoreIPCClient.new_get_component_details() """ - def activate(self, request: model.DeferComponentUpdateRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetComponentDetailsRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial DeferComponentUpdateRequest message. + Activate this operation by sending the initial GetComponentDetailsRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -289,7 +415,7 @@ def activate(self, request: model.DeferComponentUpdateRequest) -> concurrent.fut def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of DeferComponentUpdateResponse, + Returns a Future which completes with a result of GetComponentDetailsResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -304,16 +430,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SendConfigurationValidityReportOperation(model._SendConfigurationValidityReportOperation): +class PublishToTopicOperation(model._PublishToTopicOperation): """ - SendConfigurationValidityReportOperation + PublishToTopicOperation - Create with GreengrassCoreIPCClient.new_send_configuration_validity_report() + Create with GreengrassCoreIPCClient.new_publish_to_topic() """ - def activate(self, request: model.SendConfigurationValidityReportRequest) -> concurrent.futures.Future: + def activate(self, request: model.PublishToTopicRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SendConfigurationValidityReportRequest message. + Activate this operation by sending the initial PublishToTopicRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -323,7 +449,7 @@ def activate(self, request: model.SendConfigurationValidityReportRequest) -> con def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of SendConfigurationValidityReportResponse, + Returns a Future which completes with a result of PublishToTopicResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -338,16 +464,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class UpdateConfigurationOperation(model._UpdateConfigurationOperation): +class ListComponentsOperation(model._ListComponentsOperation): """ - UpdateConfigurationOperation + ListComponentsOperation - Create with GreengrassCoreIPCClient.new_update_configuration() + Create with GreengrassCoreIPCClient.new_list_components() """ - def activate(self, request: model.UpdateConfigurationRequest) -> concurrent.futures.Future: + def activate(self, request: model.ListComponentsRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial UpdateConfigurationRequest message. + Activate this operation by sending the initial ListComponentsRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -357,7 +483,7 @@ def activate(self, request: model.UpdateConfigurationRequest) -> concurrent.futu def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of UpdateConfigurationResponse, + Returns a Future which completes with a result of ListComponentsResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -372,45 +498,50 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SubscribeToValidateConfigurationUpdatesStreamHandler(rpc.StreamResponseHandler): +class CreateDebugPasswordOperation(model._CreateDebugPasswordOperation): """ - Event handler for SubscribeToValidateConfigurationUpdatesOperation + CreateDebugPasswordOperation - Inherit from this class and override methods to handle - stream events during a SubscribeToValidateConfigurationUpdatesOperation. + Create with GreengrassCoreIPCClient.new_create_debug_password() """ - def on_stream_event(self, event: model.ValidateConfigurationUpdateEvents) -> None: - """ - Invoked when a ValidateConfigurationUpdateEvents is received. + def activate(self, request: model.CreateDebugPasswordRequest) -> concurrent.futures.Future: """ - pass + Activate this operation by sending the initial CreateDebugPasswordRequest message. - def on_stream_error(self, error: Exception) -> bool: + Returns a Future which completes with a result of None if the + request is successfully written to the wire, or an exception if + the request fails to send. """ - Invoked when an error occurs on the operation stream. + return self._activate(request) - Return True if operation should close as a result of this error, + def get_response(self) -> concurrent.futures.Future: """ - return True + Returns a Future which completes with a result of CreateDebugPasswordResponse, + when the initial response is received, or an exception. + """ + return self._get_response() - def on_stream_closed(self) -> None: + def close(self) -> concurrent.futures.Future: """ - Invoked when the stream for this operation is closed. + Close the operation, whether or not it has completed. + + Returns a Future which completes with a result of None + when the operation has closed. """ - pass + return super().close() -class SubscribeToValidateConfigurationUpdatesOperation(model._SubscribeToValidateConfigurationUpdatesOperation): +class GetThingShadowOperation(model._GetThingShadowOperation): """ - SubscribeToValidateConfigurationUpdatesOperation + GetThingShadowOperation - Create with GreengrassCoreIPCClient.new_subscribe_to_validate_configuration_updates() + Create with GreengrassCoreIPCClient.new_get_thing_shadow() """ - def activate(self, request: model.SubscribeToValidateConfigurationUpdatesRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetThingShadowRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SubscribeToValidateConfigurationUpdatesRequest message. + Activate this operation by sending the initial GetThingShadowRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -420,7 +551,7 @@ def activate(self, request: model.SubscribeToValidateConfigurationUpdatesRequest def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of SubscribeToValidateConfigurationUpdatesResponse, + Returns a Future which completes with a result of GetThingShadowResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -435,16 +566,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class ValidateAuthorizationTokenOperation(model._ValidateAuthorizationTokenOperation): +class SendConfigurationValidityReportOperation(model._SendConfigurationValidityReportOperation): """ - ValidateAuthorizationTokenOperation + SendConfigurationValidityReportOperation - Create with GreengrassCoreIPCClient.new_validate_authorization_token() + Create with GreengrassCoreIPCClient.new_send_configuration_validity_report() """ - def activate(self, request: model.ValidateAuthorizationTokenRequest) -> concurrent.futures.Future: + def activate(self, request: model.SendConfigurationValidityReportRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial ValidateAuthorizationTokenRequest message. + Activate this operation by sending the initial SendConfigurationValidityReportRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -454,7 +585,7 @@ def activate(self, request: model.ValidateAuthorizationTokenRequest) -> concurre def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of ValidateAuthorizationTokenResponse, + Returns a Future which completes with a result of SendConfigurationValidityReportResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -469,16 +600,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class RestartComponentOperation(model._RestartComponentOperation): +class UpdateThingShadowOperation(model._UpdateThingShadowOperation): """ - RestartComponentOperation + UpdateThingShadowOperation - Create with GreengrassCoreIPCClient.new_restart_component() + Create with GreengrassCoreIPCClient.new_update_thing_shadow() """ - def activate(self, request: model.RestartComponentRequest) -> concurrent.futures.Future: + def activate(self, request: model.UpdateThingShadowRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial RestartComponentRequest message. + Activate this operation by sending the initial UpdateThingShadowRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -488,7 +619,7 @@ def activate(self, request: model.RestartComponentRequest) -> concurrent.futures def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of RestartComponentResponse, + Returns a Future which completes with a result of UpdateThingShadowResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -503,16 +634,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetLocalDeploymentStatusOperation(model._GetLocalDeploymentStatusOperation): +class UpdateConfigurationOperation(model._UpdateConfigurationOperation): """ - GetLocalDeploymentStatusOperation + UpdateConfigurationOperation - Create with GreengrassCoreIPCClient.new_get_local_deployment_status() + Create with GreengrassCoreIPCClient.new_update_configuration() """ - def activate(self, request: model.GetLocalDeploymentStatusRequest) -> concurrent.futures.Future: + def activate(self, request: model.UpdateConfigurationRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetLocalDeploymentStatusRequest message. + Activate this operation by sending the initial UpdateConfigurationRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -522,7 +653,7 @@ def activate(self, request: model.GetLocalDeploymentStatusRequest) -> concurrent def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of GetLocalDeploymentStatusResponse, + Returns a Future which completes with a result of UpdateConfigurationResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -537,16 +668,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetSecretValueOperation(model._GetSecretValueOperation): +class ValidateAuthorizationTokenOperation(model._ValidateAuthorizationTokenOperation): """ - GetSecretValueOperation + ValidateAuthorizationTokenOperation - Create with GreengrassCoreIPCClient.new_get_secret_value() + Create with GreengrassCoreIPCClient.new_validate_authorization_token() """ - def activate(self, request: model.GetSecretValueRequest) -> concurrent.futures.Future: + def activate(self, request: model.ValidateAuthorizationTokenRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetSecretValueRequest message. + Activate this operation by sending the initial ValidateAuthorizationTokenRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -556,7 +687,7 @@ def activate(self, request: model.GetSecretValueRequest) -> concurrent.futures.F def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of GetSecretValueResponse, + Returns a Future which completes with a result of ValidateAuthorizationTokenResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -571,16 +702,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class UpdateStateOperation(model._UpdateStateOperation): +class RestartComponentOperation(model._RestartComponentOperation): """ - UpdateStateOperation + RestartComponentOperation - Create with GreengrassCoreIPCClient.new_update_state() + Create with GreengrassCoreIPCClient.new_restart_component() """ - def activate(self, request: model.UpdateStateRequest) -> concurrent.futures.Future: + def activate(self, request: model.RestartComponentRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial UpdateStateRequest message. + Activate this operation by sending the initial RestartComponentRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -590,7 +721,7 @@ def activate(self, request: model.UpdateStateRequest) -> concurrent.futures.Futu def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of UpdateStateResponse, + Returns a Future which completes with a result of RestartComponentResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -605,16 +736,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetConfigurationOperation(model._GetConfigurationOperation): +class GetLocalDeploymentStatusOperation(model._GetLocalDeploymentStatusOperation): """ - GetConfigurationOperation + GetLocalDeploymentStatusOperation - Create with GreengrassCoreIPCClient.new_get_configuration() + Create with GreengrassCoreIPCClient.new_get_local_deployment_status() """ - def activate(self, request: model.GetConfigurationRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetLocalDeploymentStatusRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetConfigurationRequest message. + Activate this operation by sending the initial GetLocalDeploymentStatusRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -624,7 +755,7 @@ def activate(self, request: model.GetConfigurationRequest) -> concurrent.futures def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of GetConfigurationResponse, + Returns a Future which completes with a result of GetLocalDeploymentStatusResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -639,45 +770,50 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SubscribeToTopicStreamHandler(rpc.StreamResponseHandler): +class GetSecretValueOperation(model._GetSecretValueOperation): """ - Event handler for SubscribeToTopicOperation + GetSecretValueOperation - Inherit from this class and override methods to handle - stream events during a SubscribeToTopicOperation. + Create with GreengrassCoreIPCClient.new_get_secret_value() """ - def on_stream_event(self, event: model.SubscriptionResponseMessage) -> None: - """ - Invoked when a SubscriptionResponseMessage is received. + def activate(self, request: model.GetSecretValueRequest) -> concurrent.futures.Future: """ - pass + Activate this operation by sending the initial GetSecretValueRequest message. - def on_stream_error(self, error: Exception) -> bool: + Returns a Future which completes with a result of None if the + request is successfully written to the wire, or an exception if + the request fails to send. """ - Invoked when an error occurs on the operation stream. + return self._activate(request) - Return True if operation should close as a result of this error, + def get_response(self) -> concurrent.futures.Future: """ - return True + Returns a Future which completes with a result of GetSecretValueResponse, + when the initial response is received, or an exception. + """ + return self._get_response() - def on_stream_closed(self) -> None: + def close(self) -> concurrent.futures.Future: """ - Invoked when the stream for this operation is closed. + Close the operation, whether or not it has completed. + + Returns a Future which completes with a result of None + when the operation has closed. """ - pass + return super().close() -class SubscribeToTopicOperation(model._SubscribeToTopicOperation): +class UpdateStateOperation(model._UpdateStateOperation): """ - SubscribeToTopicOperation + UpdateStateOperation - Create with GreengrassCoreIPCClient.new_subscribe_to_topic() + Create with GreengrassCoreIPCClient.new_update_state() """ - def activate(self, request: model.SubscribeToTopicRequest) -> concurrent.futures.Future: + def activate(self, request: model.UpdateStateRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SubscribeToTopicRequest message. + Activate this operation by sending the initial UpdateStateRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -687,7 +823,7 @@ def activate(self, request: model.SubscribeToTopicRequest) -> concurrent.futures def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of SubscribeToTopicResponse, + Returns a Future which completes with a result of UpdateStateResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -702,16 +838,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetComponentDetailsOperation(model._GetComponentDetailsOperation): +class ListNamedShadowsForThingOperation(model._ListNamedShadowsForThingOperation): """ - GetComponentDetailsOperation + ListNamedShadowsForThingOperation - Create with GreengrassCoreIPCClient.new_get_component_details() + Create with GreengrassCoreIPCClient.new_list_named_shadows_for_thing() """ - def activate(self, request: model.GetComponentDetailsRequest) -> concurrent.futures.Future: + def activate(self, request: model.ListNamedShadowsForThingRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetComponentDetailsRequest message. + Activate this operation by sending the initial ListNamedShadowsForThingRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -721,7 +857,7 @@ def activate(self, request: model.GetComponentDetailsRequest) -> concurrent.futu def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of GetComponentDetailsResponse, + Returns a Future which completes with a result of ListNamedShadowsForThingResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -926,29 +1062,53 @@ def new_subscribe_to_iot_core(self, stream_handler: SubscribeToIoTCoreStreamHand """ return self._new_operation(SubscribeToIoTCoreOperation, stream_handler) - def new_publish_to_topic(self) -> PublishToTopicOperation: + def new_publish_to_iot_core(self) -> PublishToIoTCoreOperation: """ - Create a new PublishToTopicOperation. + Create a new PublishToIoTCoreOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and events to fire. """ - return self._new_operation(PublishToTopicOperation) + return self._new_operation(PublishToIoTCoreOperation) - def new_publish_to_iot_core(self) -> PublishToIoTCoreOperation: + def new_subscribe_to_configuration_update(self, stream_handler: SubscribeToConfigurationUpdateStreamHandler) -> SubscribeToConfigurationUpdateOperation: """ - Create a new PublishToIoTCoreOperation. + Create a new SubscribeToConfigurationUpdateOperation. + + This operation will not send or receive any data until activate() + is called. Call activate() when you're ready for callbacks and + events to fire. + + Args: + stream_handler: Methods on this object will be called as + stream events happen on this operation. + """ + return self._new_operation(SubscribeToConfigurationUpdateOperation, stream_handler) + + def new_delete_thing_shadow(self) -> DeleteThingShadowOperation: + """ + Create a new DeleteThingShadowOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and events to fire. """ - return self._new_operation(PublishToIoTCoreOperation) + return self._new_operation(DeleteThingShadowOperation) - def new_subscribe_to_configuration_update(self, stream_handler: SubscribeToConfigurationUpdateStreamHandler) -> SubscribeToConfigurationUpdateOperation: + def new_defer_component_update(self) -> DeferComponentUpdateOperation: """ - Create a new SubscribeToConfigurationUpdateOperation. + Create a new DeferComponentUpdateOperation. + + This operation will not send or receive any data until activate() + is called. Call activate() when you're ready for callbacks and + events to fire. + """ + return self._new_operation(DeferComponentUpdateOperation) + + def new_subscribe_to_validate_configuration_updates(self, stream_handler: SubscribeToValidateConfigurationUpdatesStreamHandler) -> SubscribeToValidateConfigurationUpdatesOperation: + """ + Create a new SubscribeToValidateConfigurationUpdatesOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and @@ -958,7 +1118,51 @@ def new_subscribe_to_configuration_update(self, stream_handler: SubscribeToConfi stream_handler: Methods on this object will be called as stream events happen on this operation. """ - return self._new_operation(SubscribeToConfigurationUpdateOperation, stream_handler) + return self._new_operation(SubscribeToValidateConfigurationUpdatesOperation, stream_handler) + + def new_get_configuration(self) -> GetConfigurationOperation: + """ + Create a new GetConfigurationOperation. + + This operation will not send or receive any data until activate() + is called. Call activate() when you're ready for callbacks and + events to fire. + """ + return self._new_operation(GetConfigurationOperation) + + def new_subscribe_to_topic(self, stream_handler: SubscribeToTopicStreamHandler) -> SubscribeToTopicOperation: + """ + Create a new SubscribeToTopicOperation. + + This operation will not send or receive any data until activate() + is called. Call activate() when you're ready for callbacks and + events to fire. + + Args: + stream_handler: Methods on this object will be called as + stream events happen on this operation. + """ + return self._new_operation(SubscribeToTopicOperation, stream_handler) + + def new_get_component_details(self) -> GetComponentDetailsOperation: + """ + Create a new GetComponentDetailsOperation. + + This operation will not send or receive any data until activate() + is called. Call activate() when you're ready for callbacks and + events to fire. + """ + return self._new_operation(GetComponentDetailsOperation) + + def new_publish_to_topic(self) -> PublishToTopicOperation: + """ + Create a new PublishToTopicOperation. + + This operation will not send or receive any data until activate() + is called. Call activate() when you're ready for callbacks and + events to fire. + """ + return self._new_operation(PublishToTopicOperation) def new_list_components(self) -> ListComponentsOperation: """ @@ -980,15 +1184,15 @@ def new_create_debug_password(self) -> CreateDebugPasswordOperation: """ return self._new_operation(CreateDebugPasswordOperation) - def new_defer_component_update(self) -> DeferComponentUpdateOperation: + def new_get_thing_shadow(self) -> GetThingShadowOperation: """ - Create a new DeferComponentUpdateOperation. + Create a new GetThingShadowOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and events to fire. """ - return self._new_operation(DeferComponentUpdateOperation) + return self._new_operation(GetThingShadowOperation) def new_send_configuration_validity_report(self) -> SendConfigurationValidityReportOperation: """ @@ -1000,29 +1204,25 @@ def new_send_configuration_validity_report(self) -> SendConfigurationValidityRep """ return self._new_operation(SendConfigurationValidityReportOperation) - def new_update_configuration(self) -> UpdateConfigurationOperation: + def new_update_thing_shadow(self) -> UpdateThingShadowOperation: """ - Create a new UpdateConfigurationOperation. + Create a new UpdateThingShadowOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and events to fire. """ - return self._new_operation(UpdateConfigurationOperation) + return self._new_operation(UpdateThingShadowOperation) - def new_subscribe_to_validate_configuration_updates(self, stream_handler: SubscribeToValidateConfigurationUpdatesStreamHandler) -> SubscribeToValidateConfigurationUpdatesOperation: + def new_update_configuration(self) -> UpdateConfigurationOperation: """ - Create a new SubscribeToValidateConfigurationUpdatesOperation. + Create a new UpdateConfigurationOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and events to fire. - - Args: - stream_handler: Methods on this object will be called as - stream events happen on this operation. """ - return self._new_operation(SubscribeToValidateConfigurationUpdatesOperation, stream_handler) + return self._new_operation(UpdateConfigurationOperation) def new_validate_authorization_token(self) -> ValidateAuthorizationTokenOperation: """ @@ -1074,39 +1274,15 @@ def new_update_state(self) -> UpdateStateOperation: """ return self._new_operation(UpdateStateOperation) - def new_get_configuration(self) -> GetConfigurationOperation: - """ - Create a new GetConfigurationOperation. - - This operation will not send or receive any data until activate() - is called. Call activate() when you're ready for callbacks and - events to fire. - """ - return self._new_operation(GetConfigurationOperation) - - def new_subscribe_to_topic(self, stream_handler: SubscribeToTopicStreamHandler) -> SubscribeToTopicOperation: - """ - Create a new SubscribeToTopicOperation. - - This operation will not send or receive any data until activate() - is called. Call activate() when you're ready for callbacks and - events to fire. - - Args: - stream_handler: Methods on this object will be called as - stream events happen on this operation. - """ - return self._new_operation(SubscribeToTopicOperation, stream_handler) - - def new_get_component_details(self) -> GetComponentDetailsOperation: + def new_list_named_shadows_for_thing(self) -> ListNamedShadowsForThingOperation: """ - Create a new GetComponentDetailsOperation. + Create a new ListNamedShadowsForThingOperation. This operation will not send or receive any data until activate() is called. Call activate() when you're ready for callbacks and events to fire. """ - return self._new_operation(GetComponentDetailsOperation) + return self._new_operation(ListNamedShadowsForThingOperation) def new_subscribe_to_component_updates(self, stream_handler: SubscribeToComponentUpdatesStreamHandler) -> SubscribeToComponentUpdatesOperation: """ diff --git a/awsiot/greengrasscoreipc/model.py b/awsiot/greengrasscoreipc/model.py index a7eeb7d7..181fa9ae 100644 --- a/awsiot/greengrasscoreipc/model.py +++ b/awsiot/greengrasscoreipc/model.py @@ -180,6 +180,26 @@ def __eq__(self, other): return False +class DeploymentStatus: + """ + DeploymentStatus enum + """ + + QUEUED = 'QUEUED' + IN_PROGRESS = 'IN_PROGRESS' + SUCCEEDED = 'SUCCEEDED' + FAILED = 'FAILED' + + +class ConfigurationValidityStatus: + """ + ConfigurationValidityStatus enum + """ + + ACCEPTED = 'ACCEPTED' + REJECTED = 'REJECTED' + + class LifecycleState: """ LifecycleState enum @@ -195,59 +215,40 @@ class LifecycleState: STOPPING = 'STOPPING' -class DeploymentStatus: - """ - DeploymentStatus enum - """ - - QUEUED = 'QUEUED' - IN_PROGRESS = 'IN_PROGRESS' - SUCCEEDED = 'SUCCEEDED' - FAILED = 'FAILED' - - -class ValidateConfigurationUpdateEvent(rpc.Shape): +class BinaryMessage(rpc.Shape): """ - ValidateConfigurationUpdateEvent + BinaryMessage All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - configuration: - deployment_id: + message: Attributes: - configuration: - deployment_id: + message: """ def __init__(self, *, - configuration: typing.Optional[typing.Dict[str, typing.Any]] = None, - deployment_id: typing.Optional[str] = None): + message: typing.Optional[bytes] = None): super().__init__() - self.configuration = configuration # type: typing.Optional[typing.Dict[str, typing.Any]] - self.deployment_id = deployment_id # type: typing.Optional[str] + self.message = message # type: typing.Optional[bytes] def _to_payload(self): payload = {} - if self.configuration is not None: - payload['configuration'] = self.configuration - if self.deployment_id is not None: - payload['deploymentId'] = self.deployment_id + if self.message is not None: + payload['message'] = base64.b64encode(self.message).decode() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'configuration' in payload: - new.configuration = payload['configuration'] - if 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] + if 'message' in payload: + new.message = base64.b64decode(payload['message']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateConfigurationUpdateEvent' + return 'aws.greengrass#BinaryMessage' def __repr__(self): attrs = [] @@ -262,57 +263,40 @@ def __eq__(self, other): return False -class ConfigurationValidityStatus: - """ - ConfigurationValidityStatus enum - """ - - ACCEPTED = 'ACCEPTED' - REJECTED = 'REJECTED' - - -class ConfigurationUpdateEvent(rpc.Shape): +class JsonMessage(rpc.Shape): """ - ConfigurationUpdateEvent + JsonMessage All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_name: - key_path: + message: Attributes: - component_name: - key_path: + message: """ def __init__(self, *, - component_name: typing.Optional[str] = None, - key_path: typing.Optional[typing.List[str]] = None): + message: typing.Optional[typing.Dict[str, typing.Any]] = None): super().__init__() - self.component_name = component_name # type: typing.Optional[str] - self.key_path = key_path # type: typing.Optional[typing.List[str]] + self.message = message # type: typing.Optional[typing.Dict[str, typing.Any]] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name - if self.key_path is not None: - payload['keyPath'] = self.key_path + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] - if 'keyPath' in payload: - new.key_path = payload['keyPath'] + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ConfigurationUpdateEvent' + return 'aws.greengrass#JsonMessage' def __repr__(self): attrs = [] @@ -327,40 +311,48 @@ def __eq__(self, other): return False -class BinaryMessage(rpc.Shape): +class ValidateConfigurationUpdateEvent(rpc.Shape): """ - BinaryMessage + ValidateConfigurationUpdateEvent All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + configuration: + deployment_id: Attributes: - message: + configuration: + deployment_id: """ def __init__(self, *, - message: typing.Optional[bytes] = None): + configuration: typing.Optional[typing.Dict[str, typing.Any]] = None, + deployment_id: typing.Optional[str] = None): super().__init__() - self.message = message # type: typing.Optional[bytes] + self.configuration = configuration # type: typing.Optional[typing.Dict[str, typing.Any]] + self.deployment_id = deployment_id # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = base64.b64encode(self.message).decode() + if self.configuration is not None: + payload['configuration'] = self.configuration + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = base64.b64decode(payload['message']) + if 'configuration' in payload: + new.configuration = payload['configuration'] + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#BinaryMessage' + return 'aws.greengrass#ValidateConfigurationUpdateEvent' def __repr__(self): attrs = [] @@ -375,40 +367,48 @@ def __eq__(self, other): return False -class JsonMessage(rpc.Shape): +class ConfigurationUpdateEvent(rpc.Shape): """ - JsonMessage + ConfigurationUpdateEvent All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + component_name: + key_path: Attributes: - message: + component_name: + key_path: """ def __init__(self, *, - message: typing.Optional[typing.Dict[str, typing.Any]] = None): + component_name: typing.Optional[str] = None, + key_path: typing.Optional[typing.List[str]] = None): super().__init__() - self.message = message # type: typing.Optional[typing.Dict[str, typing.Any]] + self.component_name = component_name # type: typing.Optional[str] + self.key_path = key_path # type: typing.Optional[typing.List[str]] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.component_name is not None: + payload['componentName'] = self.component_name + if self.key_path is not None: + payload['keyPath'] = self.key_path return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'componentName' in payload: + new.component_name = payload['componentName'] + if 'keyPath' in payload: + new.key_path = payload['keyPath'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#JsonMessage' + return 'aws.greengrass#ConfigurationUpdateEvent' def __repr__(self): attrs = [] @@ -537,64 +537,59 @@ def __eq__(self, other): return False -class ComponentDetails(rpc.Shape): +class ReportedLifecycleState: + """ + ReportedLifecycleState enum """ - ComponentDetails - All attributes are None by default, and may be set by keyword in the constructor. + RUNNING = 'RUNNING' + ERRORED = 'ERRORED' + + +class SecretValue(rpc.Shape): + """ + MQTTMessage is a "tagged union" class. + + When sending, only one of the attributes may be set. + When receiving, only one of the attributes will be set. + All other attributes will be None. Keyword Args: - component_name: - version: - state: LifecycleState enum value - configuration: + secret_string: + secret_binary: Attributes: - component_name: - version: - state: LifecycleState enum value - configuration: + secret_string: + secret_binary: """ def __init__(self, *, - component_name: typing.Optional[str] = None, - version: typing.Optional[str] = None, - state: typing.Optional[str] = None, - configuration: typing.Optional[typing.Dict[str, typing.Any]] = None): + secret_string: typing.Optional[str] = None, + secret_binary: typing.Optional[bytes] = None): super().__init__() - self.component_name = component_name # type: typing.Optional[str] - self.version = version # type: typing.Optional[str] - self.state = state # type: typing.Optional[str] - self.configuration = configuration # type: typing.Optional[typing.Dict[str, typing.Any]] + self.secret_string = secret_string # type: typing.Optional[str] + self.secret_binary = secret_binary # type: typing.Optional[bytes] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name - if self.version is not None: - payload['version'] = self.version - if self.state is not None: - payload['state'] = self.state - if self.configuration is not None: - payload['configuration'] = self.configuration + if self.secret_string is not None: + payload['secretString'] = self.secret_string + if self.secret_binary is not None: + payload['secretBinary'] = base64.b64encode(self.secret_binary).decode() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] - if 'version' in payload: - new.version = payload['version'] - if 'state' in payload: - new.state = payload['state'] - if 'configuration' in payload: - new.configuration = payload['configuration'] + if 'secretString' in payload: + new.secret_string = payload['secretString'] + if 'secretBinary' in payload: + new.secret_binary = base64.b64decode(payload['secretBinary']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#ComponentDetails' + return 'aws.greengrass#SecretValue' def __repr__(self): attrs = [] @@ -609,37 +604,166 @@ def __eq__(self, other): return False -class SubscriptionResponseMessage(rpc.Shape): +class LocalDeployment(rpc.Shape): """ - ComponentDetails is a "tagged union" class. + LocalDeployment - When sending, only one of the attributes may be set. - When receiving, only one of the attributes will be set. - All other attributes will be None. + All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - json_message: - binary_message: + deployment_id: + status: DeploymentStatus enum value Attributes: - json_message: - binary_message: + deployment_id: + status: DeploymentStatus enum value """ def __init__(self, *, - json_message: typing.Optional[JsonMessage] = None, - binary_message: typing.Optional[BinaryMessage] = None): + deployment_id: typing.Optional[str] = None, + status: typing.Optional[str] = None): super().__init__() - self.json_message = json_message # type: typing.Optional[JsonMessage] - self.binary_message = binary_message # type: typing.Optional[BinaryMessage] + self.deployment_id = deployment_id # type: typing.Optional[str] + self.status = status # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.json_message is not None: - payload['jsonMessage'] = self.json_message._to_payload() - if self.binary_message is not None: - payload['binaryMessage'] = self.binary_message._to_payload() - return payload + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id + if self.status is not None: + payload['status'] = self.status + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] + if 'status' in payload: + new.status = payload['status'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#LocalDeployment' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class RequestStatus: + """ + RequestStatus enum + """ + + SUCCEEDED = 'SUCCEEDED' + FAILED = 'FAILED' + + +class ConfigurationValidityReport(rpc.Shape): + """ + ConfigurationValidityReport + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + status: ConfigurationValidityStatus enum value + deployment_id: + message: + + Attributes: + status: ConfigurationValidityStatus enum value + deployment_id: + message: + """ + + def __init__(self, *, + status: typing.Optional[str] = None, + deployment_id: typing.Optional[str] = None, + message: typing.Optional[str] = None): + super().__init__() + self.status = status # type: typing.Optional[str] + self.deployment_id = deployment_id # type: typing.Optional[str] + self.message = message # type: typing.Optional[str] + + def _to_payload(self): + payload = {} + if self.status is not None: + payload['status'] = self.status + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id + if self.message is not None: + payload['message'] = self.message + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'status' in payload: + new.status = payload['status'] + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] + if 'message' in payload: + new.message = payload['message'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#ConfigurationValidityReport' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class PublishMessage(rpc.Shape): + """ + ConfigurationValidityReport is a "tagged union" class. + + When sending, only one of the attributes may be set. + When receiving, only one of the attributes will be set. + All other attributes will be None. + + Keyword Args: + json_message: + binary_message: + + Attributes: + json_message: + binary_message: + """ + + def __init__(self, *, + json_message: typing.Optional[JsonMessage] = None, + binary_message: typing.Optional[BinaryMessage] = None): + super().__init__() + self.json_message = json_message # type: typing.Optional[JsonMessage] + self.binary_message = binary_message # type: typing.Optional[BinaryMessage] + + def _to_payload(self): + payload = {} + if self.json_message is not None: + payload['jsonMessage'] = self.json_message._to_payload() + if self.binary_message is not None: + payload['binaryMessage'] = self.binary_message._to_payload() + return payload @classmethod def _from_payload(cls, payload): @@ -652,7 +776,542 @@ def _from_payload(cls, payload): @classmethod def _model_name(cls): - return 'aws.greengrass#SubscriptionResponseMessage' + return 'aws.greengrass#PublishMessage' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class ComponentDetails(rpc.Shape): + """ + ComponentDetails + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + component_name: + version: + state: LifecycleState enum value + configuration: + + Attributes: + component_name: + version: + state: LifecycleState enum value + configuration: + """ + + def __init__(self, *, + component_name: typing.Optional[str] = None, + version: typing.Optional[str] = None, + state: typing.Optional[str] = None, + configuration: typing.Optional[typing.Dict[str, typing.Any]] = None): + super().__init__() + self.component_name = component_name # type: typing.Optional[str] + self.version = version # type: typing.Optional[str] + self.state = state # type: typing.Optional[str] + self.configuration = configuration # type: typing.Optional[typing.Dict[str, typing.Any]] + + def _to_payload(self): + payload = {} + if self.component_name is not None: + payload['componentName'] = self.component_name + if self.version is not None: + payload['version'] = self.version + if self.state is not None: + payload['state'] = self.state + if self.configuration is not None: + payload['configuration'] = self.configuration + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'componentName' in payload: + new.component_name = payload['componentName'] + if 'version' in payload: + new.version = payload['version'] + if 'state' in payload: + new.state = payload['state'] + if 'configuration' in payload: + new.configuration = payload['configuration'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#ComponentDetails' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class SubscriptionResponseMessage(rpc.Shape): + """ + ComponentDetails is a "tagged union" class. + + When sending, only one of the attributes may be set. + When receiving, only one of the attributes will be set. + All other attributes will be None. + + Keyword Args: + json_message: + binary_message: + + Attributes: + json_message: + binary_message: + """ + + def __init__(self, *, + json_message: typing.Optional[JsonMessage] = None, + binary_message: typing.Optional[BinaryMessage] = None): + super().__init__() + self.json_message = json_message # type: typing.Optional[JsonMessage] + self.binary_message = binary_message # type: typing.Optional[BinaryMessage] + + def _to_payload(self): + payload = {} + if self.json_message is not None: + payload['jsonMessage'] = self.json_message._to_payload() + if self.binary_message is not None: + payload['binaryMessage'] = self.binary_message._to_payload() + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'jsonMessage' in payload: + new.json_message = JsonMessage._from_payload(payload['jsonMessage']) + if 'binaryMessage' in payload: + new.binary_message = BinaryMessage._from_payload(payload['binaryMessage']) + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#SubscriptionResponseMessage' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class ValidateConfigurationUpdateEvents(rpc.Shape): + """ + ComponentDetails is a "tagged union" class. + + When sending, only one of the attributes may be set. + When receiving, only one of the attributes will be set. + All other attributes will be None. + + Keyword Args: + validate_configuration_update_event: + + Attributes: + validate_configuration_update_event: + """ + + def __init__(self, *, + validate_configuration_update_event: typing.Optional[ValidateConfigurationUpdateEvent] = None): + super().__init__() + self.validate_configuration_update_event = validate_configuration_update_event # type: typing.Optional[ValidateConfigurationUpdateEvent] + + def _to_payload(self): + payload = {} + if self.validate_configuration_update_event is not None: + payload['validateConfigurationUpdateEvent'] = self.validate_configuration_update_event._to_payload() + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'validateConfigurationUpdateEvent' in payload: + new.validate_configuration_update_event = ValidateConfigurationUpdateEvent._from_payload(payload['validateConfigurationUpdateEvent']) + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#ValidateConfigurationUpdateEvents' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class ConfigurationUpdateEvents(rpc.Shape): + """ + ComponentDetails is a "tagged union" class. + + When sending, only one of the attributes may be set. + When receiving, only one of the attributes will be set. + All other attributes will be None. + + Keyword Args: + configuration_update_event: + + Attributes: + configuration_update_event: + """ + + def __init__(self, *, + configuration_update_event: typing.Optional[ConfigurationUpdateEvent] = None): + super().__init__() + self.configuration_update_event = configuration_update_event # type: typing.Optional[ConfigurationUpdateEvent] + + def _to_payload(self): + payload = {} + if self.configuration_update_event is not None: + payload['configurationUpdateEvent'] = self.configuration_update_event._to_payload() + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'configurationUpdateEvent' in payload: + new.configuration_update_event = ConfigurationUpdateEvent._from_payload(payload['configurationUpdateEvent']) + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#ConfigurationUpdateEvents' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class IoTCoreMessage(rpc.Shape): + """ + ComponentDetails is a "tagged union" class. + + When sending, only one of the attributes may be set. + When receiving, only one of the attributes will be set. + All other attributes will be None. + + Keyword Args: + message: + + Attributes: + message: + """ + + def __init__(self, *, + message: typing.Optional[MQTTMessage] = None): + super().__init__() + self.message = message # type: typing.Optional[MQTTMessage] + + def _to_payload(self): + payload = {} + if self.message is not None: + payload['message'] = self.message._to_payload() + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'message' in payload: + new.message = MQTTMessage._from_payload(payload['message']) + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#IoTCoreMessage' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class QOS: + """ + QOS enum + """ + + AT_MOST_ONCE = '0' + AT_LEAST_ONCE = '1' + + +class InvalidArtifactsDirectoryPathError(GreengrassCoreIPCError): + """ + InvalidArtifactsDirectoryPathError + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + message: + + Attributes: + message: + """ + + def __init__(self, *, + message: typing.Optional[str] = None): + super().__init__() + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'client' + + def _to_payload(self): + payload = {} + if self.message is not None: + payload['message'] = self.message + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'message' in payload: + new.message = payload['message'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#InvalidArtifactsDirectoryPathError' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class InvalidRecipeDirectoryPathError(GreengrassCoreIPCError): + """ + InvalidRecipeDirectoryPathError + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + message: + + Attributes: + message: + """ + + def __init__(self, *, + message: typing.Optional[str] = None): + super().__init__() + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'client' + + def _to_payload(self): + payload = {} + if self.message is not None: + payload['message'] = self.message + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'message' in payload: + new.message = payload['message'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#InvalidRecipeDirectoryPathError' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class CreateLocalDeploymentResponse(rpc.Shape): + """ + CreateLocalDeploymentResponse + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + deployment_id: + + Attributes: + deployment_id: + """ + + def __init__(self, *, + deployment_id: typing.Optional[str] = None): + super().__init__() + self.deployment_id = deployment_id # type: typing.Optional[str] + + def _to_payload(self): + payload = {} + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#CreateLocalDeploymentResponse' + + def __repr__(self): + attrs = [] + for attr, val in self.__dict__.items(): + if val is not None: + attrs.append('%s=%r' % (attr, val)) + return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) + + def __eq__(self, other): + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False + + +class CreateLocalDeploymentRequest(rpc.Shape): + """ + CreateLocalDeploymentRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + group_name: + root_component_versions_to_add: + root_components_to_remove: + component_to_configuration: + component_to_run_with_info: + recipe_directory_path: + artifacts_directory_path: + + Attributes: + group_name: + root_component_versions_to_add: + root_components_to_remove: + component_to_configuration: + component_to_run_with_info: + recipe_directory_path: + artifacts_directory_path: + """ + + def __init__(self, *, + group_name: typing.Optional[str] = None, + root_component_versions_to_add: typing.Optional[typing.Dict[str, str]] = None, + root_components_to_remove: typing.Optional[typing.List[str]] = None, + component_to_configuration: typing.Optional[typing.Dict[str, typing.Dict[str, typing.Any]]] = None, + component_to_run_with_info: typing.Optional[typing.Dict[str, RunWithInfo]] = None, + recipe_directory_path: typing.Optional[str] = None, + artifacts_directory_path: typing.Optional[str] = None): + super().__init__() + self.group_name = group_name # type: typing.Optional[str] + self.root_component_versions_to_add = root_component_versions_to_add # type: typing.Optional[typing.Dict[str, str]] + self.root_components_to_remove = root_components_to_remove # type: typing.Optional[typing.List[str]] + self.component_to_configuration = component_to_configuration # type: typing.Optional[typing.Dict[str, typing.Dict[str, typing.Any]]] + self.component_to_run_with_info = component_to_run_with_info # type: typing.Optional[typing.Dict[str, RunWithInfo]] + self.recipe_directory_path = recipe_directory_path # type: typing.Optional[str] + self.artifacts_directory_path = artifacts_directory_path # type: typing.Optional[str] + + def _to_payload(self): + payload = {} + if self.group_name is not None: + payload['groupName'] = self.group_name + if self.root_component_versions_to_add is not None: + payload['rootComponentVersionsToAdd'] = self.root_component_versions_to_add + if self.root_components_to_remove is not None: + payload['rootComponentsToRemove'] = self.root_components_to_remove + if self.component_to_configuration is not None: + payload['componentToConfiguration'] = self.component_to_configuration + if self.component_to_run_with_info is not None: + payload['componentToRunWithInfo'] = {k: v._to_payload() for k, v in self.component_to_run_with_info.items()} + if self.recipe_directory_path is not None: + payload['recipeDirectoryPath'] = self.recipe_directory_path + if self.artifacts_directory_path is not None: + payload['artifactsDirectoryPath'] = self.artifacts_directory_path + return payload + + @classmethod + def _from_payload(cls, payload): + new = cls() + if 'groupName' in payload: + new.group_name = payload['groupName'] + if 'rootComponentVersionsToAdd' in payload: + new.root_component_versions_to_add = payload['rootComponentVersionsToAdd'] + if 'rootComponentsToRemove' in payload: + new.root_components_to_remove = payload['rootComponentsToRemove'] + if 'componentToConfiguration' in payload: + new.component_to_configuration = payload['componentToConfiguration'] + if 'componentToRunWithInfo' in payload: + new.component_to_run_with_info = {k: RunWithInfo._from_payload(v) for k,v in payload['componentToRunWithInfo'].items()} + if 'recipeDirectoryPath' in payload: + new.recipe_directory_path = payload['recipeDirectoryPath'] + if 'artifactsDirectoryPath' in payload: + new.artifacts_directory_path = payload['artifactsDirectoryPath'] + return new + + @classmethod + def _model_name(cls): + return 'aws.greengrass#CreateLocalDeploymentRequest' def __repr__(self): attrs = [] @@ -667,59 +1326,48 @@ def __eq__(self, other): return False -class ReportedLifecycleState: - """ - ReportedLifecycleState enum - """ - - RUNNING = 'RUNNING' - ERRORED = 'ERRORED' - - -class SecretValue(rpc.Shape): +class StopComponentResponse(rpc.Shape): """ - ComponentDetails is a "tagged union" class. + StopComponentResponse - When sending, only one of the attributes may be set. - When receiving, only one of the attributes will be set. - All other attributes will be None. + All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - secret_string: - secret_binary: + stop_status: RequestStatus enum value + message: Attributes: - secret_string: - secret_binary: + stop_status: RequestStatus enum value + message: """ def __init__(self, *, - secret_string: typing.Optional[str] = None, - secret_binary: typing.Optional[bytes] = None): + stop_status: typing.Optional[str] = None, + message: typing.Optional[str] = None): super().__init__() - self.secret_string = secret_string # type: typing.Optional[str] - self.secret_binary = secret_binary # type: typing.Optional[bytes] + self.stop_status = stop_status # type: typing.Optional[str] + self.message = message # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.secret_string is not None: - payload['secretString'] = self.secret_string - if self.secret_binary is not None: - payload['secretBinary'] = base64.b64encode(self.secret_binary).decode() + if self.stop_status is not None: + payload['stopStatus'] = self.stop_status + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'secretString' in payload: - new.secret_string = payload['secretString'] - if 'secretBinary' in payload: - new.secret_binary = base64.b64decode(payload['secretBinary']) + if 'stopStatus' in payload: + new.stop_status = payload['stopStatus'] + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SecretValue' + return 'aws.greengrass#StopComponentResponse' def __repr__(self): attrs = [] @@ -734,48 +1382,40 @@ def __eq__(self, other): return False -class LocalDeployment(rpc.Shape): +class StopComponentRequest(rpc.Shape): """ - LocalDeployment + StopComponentRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - deployment_id: - status: DeploymentStatus enum value + component_name: Attributes: - deployment_id: - status: DeploymentStatus enum value + component_name: """ def __init__(self, *, - deployment_id: typing.Optional[str] = None, - status: typing.Optional[str] = None): + component_name: typing.Optional[str] = None): super().__init__() - self.deployment_id = deployment_id # type: typing.Optional[str] - self.status = status # type: typing.Optional[str] + self.component_name = component_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.deployment_id is not None: - payload['deploymentId'] = self.deployment_id - if self.status is not None: - payload['status'] = self.status + if self.component_name is not None: + payload['componentName'] = self.component_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] - if 'status' in payload: - new.status = payload['status'] + if 'componentName' in payload: + new.component_name = payload['componentName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#LocalDeployment' + return 'aws.greengrass#StopComponentRequest' def __repr__(self): attrs = [] @@ -790,51 +1430,40 @@ def __eq__(self, other): return False -class RequestStatus: - """ - RequestStatus enum - """ - - SUCCEEDED = 'SUCCEEDED' - FAILED = 'FAILED' - - -class ValidateConfigurationUpdateEvents(rpc.Shape): +class ListLocalDeploymentsResponse(rpc.Shape): """ - LocalDeployment is a "tagged union" class. + ListLocalDeploymentsResponse - When sending, only one of the attributes may be set. - When receiving, only one of the attributes will be set. - All other attributes will be None. + All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - validate_configuration_update_event: + local_deployments: Attributes: - validate_configuration_update_event: + local_deployments: """ def __init__(self, *, - validate_configuration_update_event: typing.Optional[ValidateConfigurationUpdateEvent] = None): + local_deployments: typing.Optional[typing.List[LocalDeployment]] = None): super().__init__() - self.validate_configuration_update_event = validate_configuration_update_event # type: typing.Optional[ValidateConfigurationUpdateEvent] + self.local_deployments = local_deployments # type: typing.Optional[typing.List[LocalDeployment]] def _to_payload(self): payload = {} - if self.validate_configuration_update_event is not None: - payload['validateConfigurationUpdateEvent'] = self.validate_configuration_update_event._to_payload() + if self.local_deployments is not None: + payload['localDeployments'] = [i._to_payload() for i in self.local_deployments] return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'validateConfigurationUpdateEvent' in payload: - new.validate_configuration_update_event = ValidateConfigurationUpdateEvent._from_payload(payload['validateConfigurationUpdateEvent']) + if 'localDeployments' in payload: + new.local_deployments = [LocalDeployment._from_payload(i) for i in payload['localDeployments']] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateConfigurationUpdateEvents' + return 'aws.greengrass#ListLocalDeploymentsResponse' def __repr__(self): attrs = [] @@ -849,56 +1478,26 @@ def __eq__(self, other): return False -class ConfigurationValidityReport(rpc.Shape): +class ListLocalDeploymentsRequest(rpc.Shape): """ - ConfigurationValidityReport - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - status: ConfigurationValidityStatus enum value - deployment_id: - message: - - Attributes: - status: ConfigurationValidityStatus enum value - deployment_id: - message: + ListLocalDeploymentsRequest """ - def __init__(self, *, - status: typing.Optional[str] = None, - deployment_id: typing.Optional[str] = None, - message: typing.Optional[str] = None): + def __init__(self): super().__init__() - self.status = status # type: typing.Optional[str] - self.deployment_id = deployment_id # type: typing.Optional[str] - self.message = message # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.status is not None: - payload['status'] = self.status - if self.deployment_id is not None: - payload['deploymentId'] = self.deployment_id - if self.message is not None: - payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'status' in payload: - new.status = payload['status'] - if 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] - if 'message' in payload: - new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ConfigurationValidityReport' + return 'aws.greengrass#ListLocalDeploymentsRequest' def __repr__(self): attrs = [] @@ -913,42 +1512,26 @@ def __eq__(self, other): return False -class ConfigurationUpdateEvents(rpc.Shape): +class SubscribeToComponentUpdatesResponse(rpc.Shape): """ - ConfigurationValidityReport is a "tagged union" class. - - When sending, only one of the attributes may be set. - When receiving, only one of the attributes will be set. - All other attributes will be None. - - Keyword Args: - configuration_update_event: - - Attributes: - configuration_update_event: + SubscribeToComponentUpdatesResponse """ - def __init__(self, *, - configuration_update_event: typing.Optional[ConfigurationUpdateEvent] = None): + def __init__(self): super().__init__() - self.configuration_update_event = configuration_update_event # type: typing.Optional[ConfigurationUpdateEvent] def _to_payload(self): payload = {} - if self.configuration_update_event is not None: - payload['configurationUpdateEvent'] = self.configuration_update_event._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'configurationUpdateEvent' in payload: - new.configuration_update_event = ConfigurationUpdateEvent._from_payload(payload['configurationUpdateEvent']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#ConfigurationUpdateEvents' + return 'aws.greengrass#SubscribeToComponentUpdatesResponse' def __repr__(self): attrs = [] @@ -963,50 +1546,26 @@ def __eq__(self, other): return False -class PublishMessage(rpc.Shape): +class SubscribeToComponentUpdatesRequest(rpc.Shape): """ - ConfigurationValidityReport is a "tagged union" class. - - When sending, only one of the attributes may be set. - When receiving, only one of the attributes will be set. - All other attributes will be None. - - Keyword Args: - json_message: - binary_message: - - Attributes: - json_message: - binary_message: + SubscribeToComponentUpdatesRequest """ - def __init__(self, *, - json_message: typing.Optional[JsonMessage] = None, - binary_message: typing.Optional[BinaryMessage] = None): + def __init__(self): super().__init__() - self.json_message = json_message # type: typing.Optional[JsonMessage] - self.binary_message = binary_message # type: typing.Optional[BinaryMessage] def _to_payload(self): payload = {} - if self.json_message is not None: - payload['jsonMessage'] = self.json_message._to_payload() - if self.binary_message is not None: - payload['binaryMessage'] = self.binary_message._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'jsonMessage' in payload: - new.json_message = JsonMessage._from_payload(payload['jsonMessage']) - if 'binaryMessage' in payload: - new.binary_message = BinaryMessage._from_payload(payload['binaryMessage']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#PublishMessage' + return 'aws.greengrass#SubscribeToComponentUpdatesRequest' def __repr__(self): attrs = [] @@ -1021,42 +1580,56 @@ def __eq__(self, other): return False -class IoTCoreMessage(rpc.Shape): +class ListNamedShadowsForThingResponse(rpc.Shape): """ - ConfigurationValidityReport is a "tagged union" class. + ListNamedShadowsForThingResponse - When sending, only one of the attributes may be set. - When receiving, only one of the attributes will be set. - All other attributes will be None. + All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + results: + timestamp: + next_token: Attributes: - message: + results: + timestamp: + next_token: """ def __init__(self, *, - message: typing.Optional[MQTTMessage] = None): + results: typing.Optional[typing.List[str]] = None, + timestamp: typing.Optional[datetime.datetime] = None, + next_token: typing.Optional[str] = None): super().__init__() - self.message = message # type: typing.Optional[MQTTMessage] + self.results = results # type: typing.Optional[typing.List[str]] + self.timestamp = timestamp # type: typing.Optional[datetime.datetime] + self.next_token = next_token # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message._to_payload() + if self.results is not None: + payload['results'] = self.results + if self.timestamp is not None: + payload['timestamp'] = self.timestamp.timestamp() + if self.next_token is not None: + payload['nextToken'] = self.next_token return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = MQTTMessage._from_payload(payload['message']) + if 'results' in payload: + new.results = payload['results'] + if 'timestamp' in payload: + new.timestamp = datetime.datetime.fromtimestamp(payload['timestamp'], datetime.timezone.utc) + if 'nextToken' in payload: + new.next_token = payload['nextToken'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#IoTCoreMessage' + return 'aws.greengrass#ListNamedShadowsForThingResponse' def __repr__(self): attrs = [] @@ -1066,57 +1639,61 @@ def __repr__(self): return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) def __eq__(self, other): - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - -class QOS: - """ - QOS enum - """ - - AT_MOST_ONCE = '0' - AT_LEAST_ONCE = '1' + if isinstance(other, self.__class__): + return self.__dict__ == other.__dict__ + return False -class InvalidArtifactsDirectoryPathError(GreengrassCoreIPCError): +class ListNamedShadowsForThingRequest(rpc.Shape): """ - InvalidArtifactsDirectoryPathError + ListNamedShadowsForThingRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + thing_name: + next_token: + page_size: Attributes: - message: + thing_name: + next_token: + page_size: """ def __init__(self, *, - message: typing.Optional[str] = None): + thing_name: typing.Optional[str] = None, + next_token: typing.Optional[str] = None, + page_size: typing.Optional[int] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' + self.thing_name = thing_name # type: typing.Optional[str] + self.next_token = next_token # type: typing.Optional[str] + self.page_size = page_size # type: typing.Optional[int] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.thing_name is not None: + payload['thingName'] = self.thing_name + if self.next_token is not None: + payload['nextToken'] = self.next_token + if self.page_size is not None: + payload['pageSize'] = self.page_size return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'thingName' in payload: + new.thing_name = payload['thingName'] + if 'nextToken' in payload: + new.next_token = payload['nextToken'] + if 'pageSize' in payload: + new.page_size = int(payload['pageSize']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#InvalidArtifactsDirectoryPathError' + return 'aws.greengrass#ListNamedShadowsForThingRequest' def __repr__(self): attrs = [] @@ -1131,43 +1708,26 @@ def __eq__(self, other): return False -class InvalidRecipeDirectoryPathError(GreengrassCoreIPCError): +class UpdateStateResponse(rpc.Shape): """ - InvalidRecipeDirectoryPathError - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - message: - - Attributes: - message: + UpdateStateResponse """ - def __init__(self, *, - message: typing.Optional[str] = None): + def __init__(self): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#InvalidRecipeDirectoryPathError' + return 'aws.greengrass#UpdateStateResponse' def __repr__(self): attrs = [] @@ -1182,40 +1742,40 @@ def __eq__(self, other): return False -class CreateLocalDeploymentResponse(rpc.Shape): +class UpdateStateRequest(rpc.Shape): """ - CreateLocalDeploymentResponse + UpdateStateRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - deployment_id: + state: ReportedLifecycleState enum value Attributes: - deployment_id: + state: ReportedLifecycleState enum value """ def __init__(self, *, - deployment_id: typing.Optional[str] = None): + state: typing.Optional[str] = None): super().__init__() - self.deployment_id = deployment_id # type: typing.Optional[str] + self.state = state # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.deployment_id is not None: - payload['deploymentId'] = self.deployment_id + if self.state is not None: + payload['state'] = self.state return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] + if 'state' in payload: + new.state = payload['state'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#CreateLocalDeploymentResponse' + return 'aws.greengrass#UpdateStateRequest' def __repr__(self): attrs = [] @@ -1230,88 +1790,64 @@ def __eq__(self, other): return False -class CreateLocalDeploymentRequest(rpc.Shape): +class GetSecretValueResponse(rpc.Shape): """ - CreateLocalDeploymentRequest + GetSecretValueResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - group_name: - root_component_versions_to_add: - root_components_to_remove: - component_to_configuration: - component_to_run_with_info: - recipe_directory_path: - artifacts_directory_path: + secret_id: + version_id: + version_stage: + secret_value: Attributes: - group_name: - root_component_versions_to_add: - root_components_to_remove: - component_to_configuration: - component_to_run_with_info: - recipe_directory_path: - artifacts_directory_path: + secret_id: + version_id: + version_stage: + secret_value: """ def __init__(self, *, - group_name: typing.Optional[str] = None, - root_component_versions_to_add: typing.Optional[typing.Dict[str, str]] = None, - root_components_to_remove: typing.Optional[typing.List[str]] = None, - component_to_configuration: typing.Optional[typing.Dict[str, typing.Dict[str, typing.Any]]] = None, - component_to_run_with_info: typing.Optional[typing.Dict[str, RunWithInfo]] = None, - recipe_directory_path: typing.Optional[str] = None, - artifacts_directory_path: typing.Optional[str] = None): + secret_id: typing.Optional[str] = None, + version_id: typing.Optional[str] = None, + version_stage: typing.Optional[typing.List[str]] = None, + secret_value: typing.Optional[SecretValue] = None): super().__init__() - self.group_name = group_name # type: typing.Optional[str] - self.root_component_versions_to_add = root_component_versions_to_add # type: typing.Optional[typing.Dict[str, str]] - self.root_components_to_remove = root_components_to_remove # type: typing.Optional[typing.List[str]] - self.component_to_configuration = component_to_configuration # type: typing.Optional[typing.Dict[str, typing.Dict[str, typing.Any]]] - self.component_to_run_with_info = component_to_run_with_info # type: typing.Optional[typing.Dict[str, RunWithInfo]] - self.recipe_directory_path = recipe_directory_path # type: typing.Optional[str] - self.artifacts_directory_path = artifacts_directory_path # type: typing.Optional[str] + self.secret_id = secret_id # type: typing.Optional[str] + self.version_id = version_id # type: typing.Optional[str] + self.version_stage = version_stage # type: typing.Optional[typing.List[str]] + self.secret_value = secret_value # type: typing.Optional[SecretValue] def _to_payload(self): payload = {} - if self.group_name is not None: - payload['groupName'] = self.group_name - if self.root_component_versions_to_add is not None: - payload['rootComponentVersionsToAdd'] = self.root_component_versions_to_add - if self.root_components_to_remove is not None: - payload['rootComponentsToRemove'] = self.root_components_to_remove - if self.component_to_configuration is not None: - payload['componentToConfiguration'] = self.component_to_configuration - if self.component_to_run_with_info is not None: - payload['componentToRunWithInfo'] = {k: v._to_payload() for k, v in self.component_to_run_with_info.items()} - if self.recipe_directory_path is not None: - payload['recipeDirectoryPath'] = self.recipe_directory_path - if self.artifacts_directory_path is not None: - payload['artifactsDirectoryPath'] = self.artifacts_directory_path + if self.secret_id is not None: + payload['secretId'] = self.secret_id + if self.version_id is not None: + payload['versionId'] = self.version_id + if self.version_stage is not None: + payload['versionStage'] = self.version_stage + if self.secret_value is not None: + payload['secretValue'] = self.secret_value._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'groupName' in payload: - new.group_name = payload['groupName'] - if 'rootComponentVersionsToAdd' in payload: - new.root_component_versions_to_add = payload['rootComponentVersionsToAdd'] - if 'rootComponentsToRemove' in payload: - new.root_components_to_remove = payload['rootComponentsToRemove'] - if 'componentToConfiguration' in payload: - new.component_to_configuration = payload['componentToConfiguration'] - if 'componentToRunWithInfo' in payload: - new.component_to_run_with_info = {k: RunWithInfo._from_payload(v) for k,v in payload['componentToRunWithInfo'].items()} - if 'recipeDirectoryPath' in payload: - new.recipe_directory_path = payload['recipeDirectoryPath'] - if 'artifactsDirectoryPath' in payload: - new.artifacts_directory_path = payload['artifactsDirectoryPath'] + if 'secretId' in payload: + new.secret_id = payload['secretId'] + if 'versionId' in payload: + new.version_id = payload['versionId'] + if 'versionStage' in payload: + new.version_stage = payload['versionStage'] + if 'secretValue' in payload: + new.secret_value = SecretValue._from_payload(payload['secretValue']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#CreateLocalDeploymentRequest' + return 'aws.greengrass#GetSecretValueResponse' def __repr__(self): attrs = [] @@ -1326,48 +1862,56 @@ def __eq__(self, other): return False -class StopComponentResponse(rpc.Shape): +class GetSecretValueRequest(rpc.Shape): """ - StopComponentResponse + GetSecretValueRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - stop_status: RequestStatus enum value - message: + secret_id: + version_id: + version_stage: Attributes: - stop_status: RequestStatus enum value - message: + secret_id: + version_id: + version_stage: """ def __init__(self, *, - stop_status: typing.Optional[str] = None, - message: typing.Optional[str] = None): + secret_id: typing.Optional[str] = None, + version_id: typing.Optional[str] = None, + version_stage: typing.Optional[str] = None): super().__init__() - self.stop_status = stop_status # type: typing.Optional[str] - self.message = message # type: typing.Optional[str] + self.secret_id = secret_id # type: typing.Optional[str] + self.version_id = version_id # type: typing.Optional[str] + self.version_stage = version_stage # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.stop_status is not None: - payload['stopStatus'] = self.stop_status - if self.message is not None: - payload['message'] = self.message + if self.secret_id is not None: + payload['secretId'] = self.secret_id + if self.version_id is not None: + payload['versionId'] = self.version_id + if self.version_stage is not None: + payload['versionStage'] = self.version_stage return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'stopStatus' in payload: - new.stop_status = payload['stopStatus'] - if 'message' in payload: - new.message = payload['message'] + if 'secretId' in payload: + new.secret_id = payload['secretId'] + if 'versionId' in payload: + new.version_id = payload['versionId'] + if 'versionStage' in payload: + new.version_stage = payload['versionStage'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#StopComponentResponse' + return 'aws.greengrass#GetSecretValueRequest' def __repr__(self): attrs = [] @@ -1382,40 +1926,40 @@ def __eq__(self, other): return False -class StopComponentRequest(rpc.Shape): +class GetLocalDeploymentStatusResponse(rpc.Shape): """ - StopComponentRequest + GetLocalDeploymentStatusResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_name: + deployment: Attributes: - component_name: + deployment: """ def __init__(self, *, - component_name: typing.Optional[str] = None): + deployment: typing.Optional[LocalDeployment] = None): super().__init__() - self.component_name = component_name # type: typing.Optional[str] + self.deployment = deployment # type: typing.Optional[LocalDeployment] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name + if self.deployment is not None: + payload['deployment'] = self.deployment._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] + if 'deployment' in payload: + new.deployment = LocalDeployment._from_payload(payload['deployment']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#StopComponentRequest' + return 'aws.greengrass#GetLocalDeploymentStatusResponse' def __repr__(self): attrs = [] @@ -1430,40 +1974,40 @@ def __eq__(self, other): return False -class ListLocalDeploymentsResponse(rpc.Shape): +class GetLocalDeploymentStatusRequest(rpc.Shape): """ - ListLocalDeploymentsResponse + GetLocalDeploymentStatusRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - local_deployments: + deployment_id: Attributes: - local_deployments: + deployment_id: """ def __init__(self, *, - local_deployments: typing.Optional[typing.List[LocalDeployment]] = None): + deployment_id: typing.Optional[str] = None): super().__init__() - self.local_deployments = local_deployments # type: typing.Optional[typing.List[LocalDeployment]] + self.deployment_id = deployment_id # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.local_deployments is not None: - payload['localDeployments'] = [i._to_payload() for i in self.local_deployments] + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'localDeployments' in payload: - new.local_deployments = [LocalDeployment._from_payload(i) for i in payload['localDeployments']] + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ListLocalDeploymentsResponse' + return 'aws.greengrass#GetLocalDeploymentStatusRequest' def __repr__(self): attrs = [] @@ -1478,26 +2022,43 @@ def __eq__(self, other): return False -class ListLocalDeploymentsRequest(rpc.Shape): +class ComponentNotFoundError(GreengrassCoreIPCError): """ - ListLocalDeploymentsRequest + ComponentNotFoundError + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + message: + + Attributes: + message: """ - def __init__(self): + def __init__(self, *, + message: typing.Optional[str] = None): super().__init__() + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'client' def _to_payload(self): payload = {} + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ListLocalDeploymentsRequest' + return 'aws.greengrass#ComponentNotFoundError' def __repr__(self): attrs = [] @@ -1512,26 +2073,48 @@ def __eq__(self, other): return False -class SubscribeToComponentUpdatesResponse(rpc.Shape): +class RestartComponentResponse(rpc.Shape): """ - SubscribeToComponentUpdatesResponse + RestartComponentResponse + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + restart_status: RequestStatus enum value + message: + + Attributes: + restart_status: RequestStatus enum value + message: """ - def __init__(self): + def __init__(self, *, + restart_status: typing.Optional[str] = None, + message: typing.Optional[str] = None): super().__init__() + self.restart_status = restart_status # type: typing.Optional[str] + self.message = message # type: typing.Optional[str] def _to_payload(self): payload = {} + if self.restart_status is not None: + payload['restartStatus'] = self.restart_status + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'restartStatus' in payload: + new.restart_status = payload['restartStatus'] + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToComponentUpdatesResponse' + return 'aws.greengrass#RestartComponentResponse' def __repr__(self): attrs = [] @@ -1546,26 +2129,40 @@ def __eq__(self, other): return False -class SubscribeToComponentUpdatesRequest(rpc.Shape): +class RestartComponentRequest(rpc.Shape): """ - SubscribeToComponentUpdatesRequest + RestartComponentRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + component_name: + + Attributes: + component_name: """ - def __init__(self): + def __init__(self, *, + component_name: typing.Optional[str] = None): super().__init__() + self.component_name = component_name # type: typing.Optional[str] def _to_payload(self): payload = {} + if self.component_name is not None: + payload['componentName'] = self.component_name return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'componentName' in payload: + new.component_name = payload['componentName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToComponentUpdatesRequest' + return 'aws.greengrass#RestartComponentRequest' def __repr__(self): attrs = [] @@ -1580,40 +2177,43 @@ def __eq__(self, other): return False -class GetComponentDetailsResponse(rpc.Shape): +class InvalidTokenError(GreengrassCoreIPCError): """ - GetComponentDetailsResponse + InvalidTokenError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_details: + message: Attributes: - component_details: + message: """ def __init__(self, *, - component_details: typing.Optional[ComponentDetails] = None): + message: typing.Optional[str] = None): super().__init__() - self.component_details = component_details # type: typing.Optional[ComponentDetails] + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'server' def _to_payload(self): payload = {} - if self.component_details is not None: - payload['componentDetails'] = self.component_details._to_payload() + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentDetails' in payload: - new.component_details = ComponentDetails._from_payload(payload['componentDetails']) + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetComponentDetailsResponse' + return 'aws.greengrass#InvalidTokenError' def __repr__(self): attrs = [] @@ -1628,40 +2228,40 @@ def __eq__(self, other): return False -class GetComponentDetailsRequest(rpc.Shape): +class ValidateAuthorizationTokenResponse(rpc.Shape): """ - GetComponentDetailsRequest + ValidateAuthorizationTokenResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_name: + is_valid: Attributes: - component_name: + is_valid: """ def __init__(self, *, - component_name: typing.Optional[str] = None): + is_valid: typing.Optional[bool] = None): super().__init__() - self.component_name = component_name # type: typing.Optional[str] + self.is_valid = is_valid # type: typing.Optional[bool] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name + if self.is_valid is not None: + payload['isValid'] = self.is_valid return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] + if 'isValid' in payload: + new.is_valid = payload['isValid'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetComponentDetailsRequest' + return 'aws.greengrass#ValidateAuthorizationTokenResponse' def __repr__(self): attrs = [] @@ -1676,40 +2276,40 @@ def __eq__(self, other): return False -class SubscribeToTopicResponse(rpc.Shape): +class ValidateAuthorizationTokenRequest(rpc.Shape): """ - SubscribeToTopicResponse + ValidateAuthorizationTokenRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - topic_name: + token: Attributes: - topic_name: + token: """ def __init__(self, *, - topic_name: typing.Optional[str] = None): + token: typing.Optional[str] = None): super().__init__() - self.topic_name = topic_name # type: typing.Optional[str] + self.token = token # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.topic_name is not None: - payload['topicName'] = self.topic_name + if self.token is not None: + payload['token'] = self.token return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'topicName' in payload: - new.topic_name = payload['topicName'] + if 'token' in payload: + new.token = payload['token'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToTopicResponse' + return 'aws.greengrass#ValidateAuthorizationTokenRequest' def __repr__(self): attrs = [] @@ -1724,40 +2324,43 @@ def __eq__(self, other): return False -class SubscribeToTopicRequest(rpc.Shape): +class FailedUpdateConditionCheckError(GreengrassCoreIPCError): """ - SubscribeToTopicRequest + FailedUpdateConditionCheckError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - topic: + message: Attributes: - topic: + message: """ def __init__(self, *, - topic: typing.Optional[str] = None): + message: typing.Optional[str] = None): super().__init__() - self.topic = topic # type: typing.Optional[str] + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'client' def _to_payload(self): payload = {} - if self.topic is not None: - payload['topic'] = self.topic + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'topic' in payload: - new.topic = payload['topic'] + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToTopicRequest' + return 'aws.greengrass#FailedUpdateConditionCheckError' def __repr__(self): attrs = [] @@ -1772,48 +2375,26 @@ def __eq__(self, other): return False -class GetConfigurationResponse(rpc.Shape): +class UpdateConfigurationResponse(rpc.Shape): """ - GetConfigurationResponse - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - component_name: - value: - - Attributes: - component_name: - value: + UpdateConfigurationResponse """ - def __init__(self, *, - component_name: typing.Optional[str] = None, - value: typing.Optional[typing.Dict[str, typing.Any]] = None): + def __init__(self): super().__init__() - self.component_name = component_name # type: typing.Optional[str] - self.value = value # type: typing.Optional[typing.Dict[str, typing.Any]] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name - if self.value is not None: - payload['value'] = self.value return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] - if 'value' in payload: - new.value = payload['value'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetConfigurationResponse' + return 'aws.greengrass#UpdateConfigurationResponse' def __repr__(self): attrs = [] @@ -1828,48 +2409,56 @@ def __eq__(self, other): return False -class GetConfigurationRequest(rpc.Shape): +class UpdateConfigurationRequest(rpc.Shape): """ - GetConfigurationRequest + UpdateConfigurationRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_name: key_path: + timestamp: + value_to_merge: Attributes: - component_name: key_path: + timestamp: + value_to_merge: """ def __init__(self, *, - component_name: typing.Optional[str] = None, - key_path: typing.Optional[typing.List[str]] = None): + key_path: typing.Optional[typing.List[str]] = None, + timestamp: typing.Optional[datetime.datetime] = None, + value_to_merge: typing.Optional[typing.Dict[str, typing.Any]] = None): super().__init__() - self.component_name = component_name # type: typing.Optional[str] self.key_path = key_path # type: typing.Optional[typing.List[str]] + self.timestamp = timestamp # type: typing.Optional[datetime.datetime] + self.value_to_merge = value_to_merge # type: typing.Optional[typing.Dict[str, typing.Any]] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name if self.key_path is not None: payload['keyPath'] = self.key_path + if self.timestamp is not None: + payload['timestamp'] = self.timestamp.timestamp() + if self.value_to_merge is not None: + payload['valueToMerge'] = self.value_to_merge return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] if 'keyPath' in payload: new.key_path = payload['keyPath'] + if 'timestamp' in payload: + new.timestamp = datetime.datetime.fromtimestamp(payload['timestamp'], datetime.timezone.utc) + if 'valueToMerge' in payload: + new.value_to_merge = payload['valueToMerge'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetConfigurationRequest' + return 'aws.greengrass#UpdateConfigurationRequest' def __repr__(self): attrs = [] @@ -1884,26 +2473,43 @@ def __eq__(self, other): return False -class UpdateStateResponse(rpc.Shape): +class ConflictError(GreengrassCoreIPCError): """ - UpdateStateResponse + ConflictError + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + message: + + Attributes: + message: """ - def __init__(self): + def __init__(self, *, + message: typing.Optional[str] = None): super().__init__() + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'client' def _to_payload(self): payload = {} + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateStateResponse' + return 'aws.greengrass#ConflictError' def __repr__(self): attrs = [] @@ -1918,40 +2524,40 @@ def __eq__(self, other): return False -class UpdateStateRequest(rpc.Shape): +class UpdateThingShadowResponse(rpc.Shape): """ - UpdateStateRequest + UpdateThingShadowResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - state: ReportedLifecycleState enum value + payload: Attributes: - state: ReportedLifecycleState enum value + payload: """ def __init__(self, *, - state: typing.Optional[str] = None): + payload: typing.Optional[bytes] = None): super().__init__() - self.state = state # type: typing.Optional[str] + self.payload = payload # type: typing.Optional[bytes] def _to_payload(self): payload = {} - if self.state is not None: - payload['state'] = self.state + if self.payload is not None: + payload['payload'] = base64.b64encode(self.payload).decode() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'state' in payload: - new.state = payload['state'] + if 'payload' in payload: + new.payload = base64.b64decode(payload['payload']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateStateRequest' + return 'aws.greengrass#UpdateThingShadowResponse' def __repr__(self): attrs = [] @@ -1966,64 +2572,56 @@ def __eq__(self, other): return False -class GetSecretValueResponse(rpc.Shape): +class UpdateThingShadowRequest(rpc.Shape): """ - GetSecretValueResponse + UpdateThingShadowRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - secret_id: - version_id: - version_stage: - secret_value: + thing_name: + shadow_name: + payload: Attributes: - secret_id: - version_id: - version_stage: - secret_value: + thing_name: + shadow_name: + payload: """ def __init__(self, *, - secret_id: typing.Optional[str] = None, - version_id: typing.Optional[str] = None, - version_stage: typing.Optional[typing.List[str]] = None, - secret_value: typing.Optional[SecretValue] = None): + thing_name: typing.Optional[str] = None, + shadow_name: typing.Optional[str] = None, + payload: typing.Optional[bytes] = None): super().__init__() - self.secret_id = secret_id # type: typing.Optional[str] - self.version_id = version_id # type: typing.Optional[str] - self.version_stage = version_stage # type: typing.Optional[typing.List[str]] - self.secret_value = secret_value # type: typing.Optional[SecretValue] + self.thing_name = thing_name # type: typing.Optional[str] + self.shadow_name = shadow_name # type: typing.Optional[str] + self.payload = payload # type: typing.Optional[bytes] def _to_payload(self): payload = {} - if self.secret_id is not None: - payload['secretId'] = self.secret_id - if self.version_id is not None: - payload['versionId'] = self.version_id - if self.version_stage is not None: - payload['versionStage'] = self.version_stage - if self.secret_value is not None: - payload['secretValue'] = self.secret_value._to_payload() + if self.thing_name is not None: + payload['thingName'] = self.thing_name + if self.shadow_name is not None: + payload['shadowName'] = self.shadow_name + if self.payload is not None: + payload['payload'] = base64.b64encode(self.payload).decode() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'secretId' in payload: - new.secret_id = payload['secretId'] - if 'versionId' in payload: - new.version_id = payload['versionId'] - if 'versionStage' in payload: - new.version_stage = payload['versionStage'] - if 'secretValue' in payload: - new.secret_value = SecretValue._from_payload(payload['secretValue']) + if 'thingName' in payload: + new.thing_name = payload['thingName'] + if 'shadowName' in payload: + new.shadow_name = payload['shadowName'] + if 'payload' in payload: + new.payload = base64.b64decode(payload['payload']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetSecretValueResponse' + return 'aws.greengrass#UpdateThingShadowRequest' def __repr__(self): attrs = [] @@ -2038,56 +2636,26 @@ def __eq__(self, other): return False -class GetSecretValueRequest(rpc.Shape): +class SendConfigurationValidityReportResponse(rpc.Shape): """ - GetSecretValueRequest - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - secret_id: - version_id: - version_stage: - - Attributes: - secret_id: - version_id: - version_stage: + SendConfigurationValidityReportResponse """ - def __init__(self, *, - secret_id: typing.Optional[str] = None, - version_id: typing.Optional[str] = None, - version_stage: typing.Optional[str] = None): + def __init__(self): super().__init__() - self.secret_id = secret_id # type: typing.Optional[str] - self.version_id = version_id # type: typing.Optional[str] - self.version_stage = version_stage # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.secret_id is not None: - payload['secretId'] = self.secret_id - if self.version_id is not None: - payload['versionId'] = self.version_id - if self.version_stage is not None: - payload['versionStage'] = self.version_stage return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'secretId' in payload: - new.secret_id = payload['secretId'] - if 'versionId' in payload: - new.version_id = payload['versionId'] - if 'versionStage' in payload: - new.version_stage = payload['versionStage'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetSecretValueRequest' + return 'aws.greengrass#SendConfigurationValidityReportResponse' def __repr__(self): attrs = [] @@ -2102,40 +2670,40 @@ def __eq__(self, other): return False -class GetLocalDeploymentStatusResponse(rpc.Shape): +class SendConfigurationValidityReportRequest(rpc.Shape): """ - GetLocalDeploymentStatusResponse + SendConfigurationValidityReportRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - deployment: + configuration_validity_report: Attributes: - deployment: + configuration_validity_report: """ def __init__(self, *, - deployment: typing.Optional[LocalDeployment] = None): + configuration_validity_report: typing.Optional[ConfigurationValidityReport] = None): super().__init__() - self.deployment = deployment # type: typing.Optional[LocalDeployment] + self.configuration_validity_report = configuration_validity_report # type: typing.Optional[ConfigurationValidityReport] def _to_payload(self): payload = {} - if self.deployment is not None: - payload['deployment'] = self.deployment._to_payload() + if self.configuration_validity_report is not None: + payload['configurationValidityReport'] = self.configuration_validity_report._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'deployment' in payload: - new.deployment = LocalDeployment._from_payload(payload['deployment']) + if 'configurationValidityReport' in payload: + new.configuration_validity_report = ConfigurationValidityReport._from_payload(payload['configurationValidityReport']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetLocalDeploymentStatusResponse' + return 'aws.greengrass#SendConfigurationValidityReportRequest' def __repr__(self): attrs = [] @@ -2150,40 +2718,40 @@ def __eq__(self, other): return False -class GetLocalDeploymentStatusRequest(rpc.Shape): +class GetThingShadowResponse(rpc.Shape): """ - GetLocalDeploymentStatusRequest + GetThingShadowResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - deployment_id: + payload: Attributes: - deployment_id: + payload: """ def __init__(self, *, - deployment_id: typing.Optional[str] = None): + payload: typing.Optional[bytes] = None): super().__init__() - self.deployment_id = deployment_id # type: typing.Optional[str] + self.payload = payload # type: typing.Optional[bytes] def _to_payload(self): payload = {} - if self.deployment_id is not None: - payload['deploymentId'] = self.deployment_id + if self.payload is not None: + payload['payload'] = base64.b64encode(self.payload).decode() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] + if 'payload' in payload: + new.payload = base64.b64decode(payload['payload']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetLocalDeploymentStatusRequest' + return 'aws.greengrass#GetThingShadowResponse' def __repr__(self): attrs = [] @@ -2198,43 +2766,48 @@ def __eq__(self, other): return False -class ComponentNotFoundError(GreengrassCoreIPCError): +class GetThingShadowRequest(rpc.Shape): """ - ComponentNotFoundError + GetThingShadowRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + thing_name: + shadow_name: Attributes: - message: + thing_name: + shadow_name: """ def __init__(self, *, - message: typing.Optional[str] = None): + thing_name: typing.Optional[str] = None, + shadow_name: typing.Optional[str] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' + self.thing_name = thing_name # type: typing.Optional[str] + self.shadow_name = shadow_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.thing_name is not None: + payload['thingName'] = self.thing_name + if self.shadow_name is not None: + payload['shadowName'] = self.shadow_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'thingName' in payload: + new.thing_name = payload['thingName'] + if 'shadowName' in payload: + new.shadow_name = payload['shadowName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ComponentNotFoundError' + return 'aws.greengrass#GetThingShadowRequest' def __repr__(self): attrs = [] @@ -2249,48 +2822,72 @@ def __eq__(self, other): return False -class RestartComponentResponse(rpc.Shape): +class CreateDebugPasswordResponse(rpc.Shape): """ - RestartComponentResponse + CreateDebugPasswordResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - restart_status: RequestStatus enum value - message: + password: + username: + password_expiration: + certificate_sha256_hash: + certificate_sha1_hash: Attributes: - restart_status: RequestStatus enum value - message: + password: + username: + password_expiration: + certificate_sha256_hash: + certificate_sha1_hash: """ def __init__(self, *, - restart_status: typing.Optional[str] = None, - message: typing.Optional[str] = None): + password: typing.Optional[str] = None, + username: typing.Optional[str] = None, + password_expiration: typing.Optional[datetime.datetime] = None, + certificate_sha256_hash: typing.Optional[str] = None, + certificate_sha1_hash: typing.Optional[str] = None): super().__init__() - self.restart_status = restart_status # type: typing.Optional[str] - self.message = message # type: typing.Optional[str] + self.password = password # type: typing.Optional[str] + self.username = username # type: typing.Optional[str] + self.password_expiration = password_expiration # type: typing.Optional[datetime.datetime] + self.certificate_sha256_hash = certificate_sha256_hash # type: typing.Optional[str] + self.certificate_sha1_hash = certificate_sha1_hash # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.restart_status is not None: - payload['restartStatus'] = self.restart_status - if self.message is not None: - payload['message'] = self.message + if self.password is not None: + payload['password'] = self.password + if self.username is not None: + payload['username'] = self.username + if self.password_expiration is not None: + payload['passwordExpiration'] = self.password_expiration.timestamp() + if self.certificate_sha256_hash is not None: + payload['certificateSHA256Hash'] = self.certificate_sha256_hash + if self.certificate_sha1_hash is not None: + payload['certificateSHA1Hash'] = self.certificate_sha1_hash return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'restartStatus' in payload: - new.restart_status = payload['restartStatus'] - if 'message' in payload: - new.message = payload['message'] + if 'password' in payload: + new.password = payload['password'] + if 'username' in payload: + new.username = payload['username'] + if 'passwordExpiration' in payload: + new.password_expiration = datetime.datetime.fromtimestamp(payload['passwordExpiration'], datetime.timezone.utc) + if 'certificateSHA256Hash' in payload: + new.certificate_sha256_hash = payload['certificateSHA256Hash'] + if 'certificateSHA1Hash' in payload: + new.certificate_sha1_hash = payload['certificateSHA1Hash'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#RestartComponentResponse' + return 'aws.greengrass#CreateDebugPasswordResponse' def __repr__(self): attrs = [] @@ -2305,40 +2902,26 @@ def __eq__(self, other): return False -class RestartComponentRequest(rpc.Shape): +class CreateDebugPasswordRequest(rpc.Shape): """ - RestartComponentRequest - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - component_name: - - Attributes: - component_name: + CreateDebugPasswordRequest """ - def __init__(self, *, - component_name: typing.Optional[str] = None): + def __init__(self): super().__init__() - self.component_name = component_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.component_name is not None: - payload['componentName'] = self.component_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'componentName' in payload: - new.component_name = payload['componentName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#RestartComponentRequest' + return 'aws.greengrass#CreateDebugPasswordRequest' def __repr__(self): attrs = [] @@ -2353,43 +2936,40 @@ def __eq__(self, other): return False -class InvalidTokenError(GreengrassCoreIPCError): +class ListComponentsResponse(rpc.Shape): """ - InvalidTokenError + ListComponentsResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + components: Attributes: - message: + components: """ def __init__(self, *, - message: typing.Optional[str] = None): + components: typing.Optional[typing.List[ComponentDetails]] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'server' + self.components = components # type: typing.Optional[typing.List[ComponentDetails]] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.components is not None: + payload['components'] = [i._to_payload() for i in self.components] return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'components' in payload: + new.components = [ComponentDetails._from_payload(i) for i in payload['components']] return new @classmethod def _model_name(cls): - return 'aws.greengrass#InvalidTokenError' + return 'aws.greengrass#ListComponentsResponse' def __repr__(self): attrs = [] @@ -2404,40 +2984,26 @@ def __eq__(self, other): return False -class ValidateAuthorizationTokenResponse(rpc.Shape): +class ListComponentsRequest(rpc.Shape): """ - ValidateAuthorizationTokenResponse - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - is_valid: - - Attributes: - is_valid: + ListComponentsRequest """ - def __init__(self, *, - is_valid: typing.Optional[bool] = None): + def __init__(self): super().__init__() - self.is_valid = is_valid # type: typing.Optional[bool] def _to_payload(self): payload = {} - if self.is_valid is not None: - payload['isValid'] = self.is_valid return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'isValid' in payload: - new.is_valid = payload['isValid'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateAuthorizationTokenResponse' + return 'aws.greengrass#ListComponentsRequest' def __repr__(self): attrs = [] @@ -2452,40 +3018,26 @@ def __eq__(self, other): return False -class ValidateAuthorizationTokenRequest(rpc.Shape): +class PublishToTopicResponse(rpc.Shape): """ - ValidateAuthorizationTokenRequest - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - token: - - Attributes: - token: + PublishToTopicResponse """ - def __init__(self, *, - token: typing.Optional[str] = None): + def __init__(self): super().__init__() - self.token = token # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.token is not None: - payload['token'] = self.token return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'token' in payload: - new.token = payload['token'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateAuthorizationTokenRequest' + return 'aws.greengrass#PublishToTopicResponse' def __repr__(self): attrs = [] @@ -2500,26 +3052,48 @@ def __eq__(self, other): return False -class SubscribeToValidateConfigurationUpdatesResponse(rpc.Shape): +class PublishToTopicRequest(rpc.Shape): """ - SubscribeToValidateConfigurationUpdatesResponse + PublishToTopicRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + topic: + publish_message: + + Attributes: + topic: + publish_message: """ - def __init__(self): + def __init__(self, *, + topic: typing.Optional[str] = None, + publish_message: typing.Optional[PublishMessage] = None): super().__init__() + self.topic = topic # type: typing.Optional[str] + self.publish_message = publish_message # type: typing.Optional[PublishMessage] def _to_payload(self): payload = {} + if self.topic is not None: + payload['topic'] = self.topic + if self.publish_message is not None: + payload['publishMessage'] = self.publish_message._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'topic' in payload: + new.topic = payload['topic'] + if 'publishMessage' in payload: + new.publish_message = PublishMessage._from_payload(payload['publishMessage']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToValidateConfigurationUpdatesResponse' + return 'aws.greengrass#PublishToTopicRequest' def __repr__(self): attrs = [] @@ -2534,26 +3108,40 @@ def __eq__(self, other): return False -class SubscribeToValidateConfigurationUpdatesRequest(rpc.Shape): +class GetComponentDetailsResponse(rpc.Shape): """ - SubscribeToValidateConfigurationUpdatesRequest + GetComponentDetailsResponse + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + component_details: + + Attributes: + component_details: """ - def __init__(self): + def __init__(self, *, + component_details: typing.Optional[ComponentDetails] = None): super().__init__() + self.component_details = component_details # type: typing.Optional[ComponentDetails] def _to_payload(self): payload = {} + if self.component_details is not None: + payload['componentDetails'] = self.component_details._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'componentDetails' in payload: + new.component_details = ComponentDetails._from_payload(payload['componentDetails']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToValidateConfigurationUpdatesRequest' + return 'aws.greengrass#GetComponentDetailsResponse' def __repr__(self): attrs = [] @@ -2568,43 +3156,40 @@ def __eq__(self, other): return False -class FailedUpdateConditionCheckError(GreengrassCoreIPCError): +class GetComponentDetailsRequest(rpc.Shape): """ - FailedUpdateConditionCheckError + GetComponentDetailsRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + component_name: Attributes: - message: + component_name: """ def __init__(self, *, - message: typing.Optional[str] = None): + component_name: typing.Optional[str] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' + self.component_name = component_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.component_name is not None: + payload['componentName'] = self.component_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'componentName' in payload: + new.component_name = payload['componentName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#FailedUpdateConditionCheckError' + return 'aws.greengrass#GetComponentDetailsRequest' def __repr__(self): attrs = [] @@ -2619,43 +3204,40 @@ def __eq__(self, other): return False -class ConflictError(GreengrassCoreIPCError): +class SubscribeToTopicResponse(rpc.Shape): """ - ConflictError + SubscribeToTopicResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + topic_name: Attributes: - message: + topic_name: """ def __init__(self, *, - message: typing.Optional[str] = None): + topic_name: typing.Optional[str] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' + self.topic_name = topic_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.topic_name is not None: + payload['topicName'] = self.topic_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'topicName' in payload: + new.topic_name = payload['topicName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ConflictError' + return 'aws.greengrass#SubscribeToTopicResponse' def __repr__(self): attrs = [] @@ -2670,26 +3252,40 @@ def __eq__(self, other): return False -class UpdateConfigurationResponse(rpc.Shape): +class SubscribeToTopicRequest(rpc.Shape): """ - UpdateConfigurationResponse + SubscribeToTopicRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + topic: + + Attributes: + topic: """ - def __init__(self): + def __init__(self, *, + topic: typing.Optional[str] = None): super().__init__() + self.topic = topic # type: typing.Optional[str] def _to_payload(self): payload = {} + if self.topic is not None: + payload['topic'] = self.topic return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'topic' in payload: + new.topic = payload['topic'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateConfigurationResponse' + return 'aws.greengrass#SubscribeToTopicRequest' def __repr__(self): attrs = [] @@ -2704,56 +3300,48 @@ def __eq__(self, other): return False -class UpdateConfigurationRequest(rpc.Shape): +class GetConfigurationResponse(rpc.Shape): """ - UpdateConfigurationRequest + GetConfigurationResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - key_path: - timestamp: - value_to_merge: + component_name: + value: Attributes: - key_path: - timestamp: - value_to_merge: + component_name: + value: """ def __init__(self, *, - key_path: typing.Optional[typing.List[str]] = None, - timestamp: typing.Optional[datetime.datetime] = None, - value_to_merge: typing.Optional[typing.Dict[str, typing.Any]] = None): + component_name: typing.Optional[str] = None, + value: typing.Optional[typing.Dict[str, typing.Any]] = None): super().__init__() - self.key_path = key_path # type: typing.Optional[typing.List[str]] - self.timestamp = timestamp # type: typing.Optional[datetime.datetime] - self.value_to_merge = value_to_merge # type: typing.Optional[typing.Dict[str, typing.Any]] + self.component_name = component_name # type: typing.Optional[str] + self.value = value # type: typing.Optional[typing.Dict[str, typing.Any]] def _to_payload(self): payload = {} - if self.key_path is not None: - payload['keyPath'] = self.key_path - if self.timestamp is not None: - payload['timestamp'] = self.timestamp.timestamp() - if self.value_to_merge is not None: - payload['valueToMerge'] = self.value_to_merge + if self.component_name is not None: + payload['componentName'] = self.component_name + if self.value is not None: + payload['value'] = self.value return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'keyPath' in payload: - new.key_path = payload['keyPath'] - if 'timestamp' in payload: - new.timestamp = datetime.datetime.fromtimestamp(payload['timestamp'], datetime.timezone.utc) - if 'valueToMerge' in payload: - new.value_to_merge = payload['valueToMerge'] + if 'componentName' in payload: + new.component_name = payload['componentName'] + if 'value' in payload: + new.value = payload['value'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateConfigurationRequest' + return 'aws.greengrass#GetConfigurationResponse' def __repr__(self): attrs = [] @@ -2768,26 +3356,48 @@ def __eq__(self, other): return False -class SendConfigurationValidityReportResponse(rpc.Shape): +class GetConfigurationRequest(rpc.Shape): """ - SendConfigurationValidityReportResponse + GetConfigurationRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + component_name: + key_path: + + Attributes: + component_name: + key_path: """ - def __init__(self): + def __init__(self, *, + component_name: typing.Optional[str] = None, + key_path: typing.Optional[typing.List[str]] = None): super().__init__() + self.component_name = component_name # type: typing.Optional[str] + self.key_path = key_path # type: typing.Optional[typing.List[str]] def _to_payload(self): payload = {} + if self.component_name is not None: + payload['componentName'] = self.component_name + if self.key_path is not None: + payload['keyPath'] = self.key_path return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'componentName' in payload: + new.component_name = payload['componentName'] + if 'keyPath' in payload: + new.key_path = payload['keyPath'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SendConfigurationValidityReportResponse' + return 'aws.greengrass#GetConfigurationRequest' def __repr__(self): attrs = [] @@ -2801,41 +3411,27 @@ def __eq__(self, other): return self.__dict__ == other.__dict__ return False - -class SendConfigurationValidityReportRequest(rpc.Shape): - """ - SendConfigurationValidityReportRequest - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - configuration_validity_report: - - Attributes: - configuration_validity_report: + +class SubscribeToValidateConfigurationUpdatesResponse(rpc.Shape): + """ + SubscribeToValidateConfigurationUpdatesResponse """ - def __init__(self, *, - configuration_validity_report: typing.Optional[ConfigurationValidityReport] = None): + def __init__(self): super().__init__() - self.configuration_validity_report = configuration_validity_report # type: typing.Optional[ConfigurationValidityReport] def _to_payload(self): payload = {} - if self.configuration_validity_report is not None: - payload['configurationValidityReport'] = self.configuration_validity_report._to_payload() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'configurationValidityReport' in payload: - new.configuration_validity_report = ConfigurationValidityReport._from_payload(payload['configurationValidityReport']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#SendConfigurationValidityReportRequest' + return 'aws.greengrass#SubscribeToValidateConfigurationUpdatesResponse' def __repr__(self): attrs = [] @@ -2850,43 +3446,26 @@ def __eq__(self, other): return False -class InvalidArgumentsError(GreengrassCoreIPCError): +class SubscribeToValidateConfigurationUpdatesRequest(rpc.Shape): """ - InvalidArgumentsError - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - message: - - Attributes: - message: + SubscribeToValidateConfigurationUpdatesRequest """ - def __init__(self, *, - message: typing.Optional[str] = None): + def __init__(self): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#InvalidArgumentsError' + return 'aws.greengrass#SubscribeToValidateConfigurationUpdatesRequest' def __repr__(self): attrs = [] @@ -2999,106 +3578,43 @@ def __eq__(self, other): return False -class CreateDebugPasswordResponse(rpc.Shape): +class InvalidArgumentsError(GreengrassCoreIPCError): """ - CreateDebugPasswordResponse + InvalidArgumentsError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - password: - username: - password_expiration: - certificate_sha256_hash: - certificate_sha1_hash: + message: Attributes: - password: - username: - password_expiration: - certificate_sha256_hash: - certificate_sha1_hash: + message: """ def __init__(self, *, - password: typing.Optional[str] = None, - username: typing.Optional[str] = None, - password_expiration: typing.Optional[datetime.datetime] = None, - certificate_sha256_hash: typing.Optional[str] = None, - certificate_sha1_hash: typing.Optional[str] = None): + message: typing.Optional[str] = None): super().__init__() - self.password = password # type: typing.Optional[str] - self.username = username # type: typing.Optional[str] - self.password_expiration = password_expiration # type: typing.Optional[datetime.datetime] - self.certificate_sha256_hash = certificate_sha256_hash # type: typing.Optional[str] - self.certificate_sha1_hash = certificate_sha1_hash # type: typing.Optional[str] - - def _to_payload(self): - payload = {} - if self.password is not None: - payload['password'] = self.password - if self.username is not None: - payload['username'] = self.username - if self.password_expiration is not None: - payload['passwordExpiration'] = self.password_expiration.timestamp() - if self.certificate_sha256_hash is not None: - payload['certificateSHA256Hash'] = self.certificate_sha256_hash - if self.certificate_sha1_hash is not None: - payload['certificateSHA1Hash'] = self.certificate_sha1_hash - return payload - - @classmethod - def _from_payload(cls, payload): - new = cls() - if 'password' in payload: - new.password = payload['password'] - if 'username' in payload: - new.username = payload['username'] - if 'passwordExpiration' in payload: - new.password_expiration = datetime.datetime.fromtimestamp(payload['passwordExpiration'], datetime.timezone.utc) - if 'certificateSHA256Hash' in payload: - new.certificate_sha256_hash = payload['certificateSHA256Hash'] - if 'certificateSHA1Hash' in payload: - new.certificate_sha1_hash = payload['certificateSHA1Hash'] - return new - - @classmethod - def _model_name(cls): - return 'aws.greengrass#CreateDebugPasswordResponse' - - def __repr__(self): - attrs = [] - for attr, val in self.__dict__.items(): - if val is not None: - attrs.append('%s=%r' % (attr, val)) - return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) - - def __eq__(self, other): - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - -class CreateDebugPasswordRequest(rpc.Shape): - """ - CreateDebugPasswordRequest - """ + self.message = message # type: typing.Optional[str] - def __init__(self): - super().__init__() + def _get_error_type_string(self): + return 'client' def _to_payload(self): payload = {} + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#CreateDebugPasswordRequest' + return 'aws.greengrass#InvalidArgumentsError' def __repr__(self): attrs = [] @@ -3113,40 +3629,40 @@ def __eq__(self, other): return False -class ListComponentsResponse(rpc.Shape): +class DeleteThingShadowResponse(rpc.Shape): """ - ListComponentsResponse + DeleteThingShadowResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - components: + payload: Attributes: - components: + payload: """ def __init__(self, *, - components: typing.Optional[typing.List[ComponentDetails]] = None): + payload: typing.Optional[bytes] = None): super().__init__() - self.components = components # type: typing.Optional[typing.List[ComponentDetails]] + self.payload = payload # type: typing.Optional[bytes] def _to_payload(self): payload = {} - if self.components is not None: - payload['components'] = [i._to_payload() for i in self.components] + if self.payload is not None: + payload['payload'] = base64.b64encode(self.payload).decode() return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'components' in payload: - new.components = [ComponentDetails._from_payload(i) for i in payload['components']] + if 'payload' in payload: + new.payload = base64.b64decode(payload['payload']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#ListComponentsResponse' + return 'aws.greengrass#DeleteThingShadowResponse' def __repr__(self): attrs = [] @@ -3161,26 +3677,48 @@ def __eq__(self, other): return False -class ListComponentsRequest(rpc.Shape): +class DeleteThingShadowRequest(rpc.Shape): """ - ListComponentsRequest + DeleteThingShadowRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + thing_name: + shadow_name: + + Attributes: + thing_name: + shadow_name: """ - def __init__(self): + def __init__(self, *, + thing_name: typing.Optional[str] = None, + shadow_name: typing.Optional[str] = None): super().__init__() + self.thing_name = thing_name # type: typing.Optional[str] + self.shadow_name = shadow_name # type: typing.Optional[str] def _to_payload(self): payload = {} + if self.thing_name is not None: + payload['thingName'] = self.thing_name + if self.shadow_name is not None: + payload['shadowName'] = self.shadow_name return payload @classmethod def _from_payload(cls, payload): new = cls() + if 'thingName' in payload: + new.thing_name = payload['thingName'] + if 'shadowName' in payload: + new.shadow_name = payload['shadowName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ListComponentsRequest' + return 'aws.greengrass#DeleteThingShadowRequest' def __repr__(self): attrs = [] @@ -3425,107 +3963,17 @@ def _to_payload(self): @classmethod def _from_payload(cls, payload): new = cls() - if 'topicName' in payload: - new.topic_name = payload['topicName'] - if 'qos' in payload: - new.qos = payload['qos'] - if 'payload' in payload: - new.payload = base64.b64decode(payload['payload']) - return new - - @classmethod - def _model_name(cls): - return 'aws.greengrass#PublishToIoTCoreRequest' - - def __repr__(self): - attrs = [] - for attr, val in self.__dict__.items(): - if val is not None: - attrs.append('%s=%r' % (attr, val)) - return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) - - def __eq__(self, other): - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - -class PublishToTopicResponse(rpc.Shape): - """ - PublishToTopicResponse - """ - - def __init__(self): - super().__init__() - - def _to_payload(self): - payload = {} - return payload - - @classmethod - def _from_payload(cls, payload): - new = cls() - return new - - @classmethod - def _model_name(cls): - return 'aws.greengrass#PublishToTopicResponse' - - def __repr__(self): - attrs = [] - for attr, val in self.__dict__.items(): - if val is not None: - attrs.append('%s=%r' % (attr, val)) - return '%s(%s)' % (self.__class__.__name__, ', '.join(attrs)) - - def __eq__(self, other): - if isinstance(other, self.__class__): - return self.__dict__ == other.__dict__ - return False - - -class PublishToTopicRequest(rpc.Shape): - """ - PublishToTopicRequest - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - topic: - publish_message: - - Attributes: - topic: - publish_message: - """ - - def __init__(self, *, - topic: typing.Optional[str] = None, - publish_message: typing.Optional[PublishMessage] = None): - super().__init__() - self.topic = topic # type: typing.Optional[str] - self.publish_message = publish_message # type: typing.Optional[PublishMessage] - - def _to_payload(self): - payload = {} - if self.topic is not None: - payload['topic'] = self.topic - if self.publish_message is not None: - payload['publishMessage'] = self.publish_message._to_payload() - return payload - - @classmethod - def _from_payload(cls, payload): - new = cls() - if 'topic' in payload: - new.topic = payload['topic'] - if 'publishMessage' in payload: - new.publish_message = PublishMessage._from_payload(payload['publishMessage']) + if 'topicName' in payload: + new.topic_name = payload['topicName'] + if 'qos' in payload: + new.qos = payload['qos'] + if 'payload' in payload: + new.payload = base64.b64decode(payload['payload']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#PublishToTopicRequest' + return 'aws.greengrass#PublishToIoTCoreRequest' def __repr__(self): attrs = [] @@ -3736,14 +4184,14 @@ def __eq__(self, other): RunWithInfo, PostComponentUpdateEvent, PreComponentUpdateEvent, - ValidateConfigurationUpdateEvent, - ConfigurationUpdateEvent, BinaryMessage, JsonMessage, + ValidateConfigurationUpdateEvent, + ConfigurationUpdateEvent, MQTTMessage, - ComponentDetails, LocalDeployment, ConfigurationValidityReport, + ComponentDetails, InvalidArtifactsDirectoryPathError, InvalidRecipeDirectoryPathError, CreateLocalDeploymentResponse, @@ -3754,12 +4202,8 @@ def __eq__(self, other): ListLocalDeploymentsRequest, SubscribeToComponentUpdatesResponse, SubscribeToComponentUpdatesRequest, - GetComponentDetailsResponse, - GetComponentDetailsRequest, - SubscribeToTopicResponse, - SubscribeToTopicRequest, - GetConfigurationResponse, - GetConfigurationRequest, + ListNamedShadowsForThingResponse, + ListNamedShadowsForThingRequest, UpdateStateResponse, UpdateStateRequest, GetSecretValueResponse, @@ -3772,28 +4216,40 @@ def __eq__(self, other): InvalidTokenError, ValidateAuthorizationTokenResponse, ValidateAuthorizationTokenRequest, - SubscribeToValidateConfigurationUpdatesResponse, - SubscribeToValidateConfigurationUpdatesRequest, FailedUpdateConditionCheckError, - ConflictError, UpdateConfigurationResponse, UpdateConfigurationRequest, + ConflictError, + UpdateThingShadowResponse, + UpdateThingShadowRequest, SendConfigurationValidityReportResponse, SendConfigurationValidityReportRequest, - InvalidArgumentsError, - DeferComponentUpdateResponse, - DeferComponentUpdateRequest, + GetThingShadowResponse, + GetThingShadowRequest, CreateDebugPasswordResponse, CreateDebugPasswordRequest, ListComponentsResponse, ListComponentsRequest, + PublishToTopicResponse, + PublishToTopicRequest, + GetComponentDetailsResponse, + GetComponentDetailsRequest, + SubscribeToTopicResponse, + SubscribeToTopicRequest, + GetConfigurationResponse, + GetConfigurationRequest, + SubscribeToValidateConfigurationUpdatesResponse, + SubscribeToValidateConfigurationUpdatesRequest, + DeferComponentUpdateResponse, + DeferComponentUpdateRequest, + InvalidArgumentsError, + DeleteThingShadowResponse, + DeleteThingShadowRequest, ResourceNotFoundError, SubscribeToConfigurationUpdateResponse, SubscribeToConfigurationUpdateRequest, PublishToIoTCoreResponse, PublishToIoTCoreRequest, - PublishToTopicResponse, - PublishToTopicRequest, UnauthorizedError, ServiceError, SubscribeToIoTCoreResponse, @@ -3823,14 +4279,14 @@ def _response_stream_type(cls): return IoTCoreMessage -class _PublishToTopicOperation(rpc.ClientOperation): +class _PublishToIoTCoreOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#PublishToTopic' + return 'aws.greengrass#PublishToIoTCore' @classmethod def _request_type(cls): - return PublishToTopicRequest + return PublishToIoTCoreRequest @classmethod def _request_stream_type(cls): @@ -3838,21 +4294,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return PublishToTopicResponse + return PublishToIoTCoreResponse @classmethod def _response_stream_type(cls): return None -class _PublishToIoTCoreOperation(rpc.ClientOperation): +class _SubscribeToConfigurationUpdateOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#PublishToIoTCore' + return 'aws.greengrass#SubscribeToConfigurationUpdate' @classmethod def _request_type(cls): - return PublishToIoTCoreRequest + return SubscribeToConfigurationUpdateRequest @classmethod def _request_stream_type(cls): @@ -3860,21 +4316,43 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return PublishToIoTCoreResponse + return SubscribeToConfigurationUpdateResponse + + @classmethod + def _response_stream_type(cls): + return ConfigurationUpdateEvents + + +class _DeleteThingShadowOperation(rpc.ClientOperation): + @classmethod + def _model_name(cls): + return 'aws.greengrass#DeleteThingShadow' + + @classmethod + def _request_type(cls): + return DeleteThingShadowRequest + + @classmethod + def _request_stream_type(cls): + return None + + @classmethod + def _response_type(cls): + return DeleteThingShadowResponse @classmethod def _response_stream_type(cls): return None -class _SubscribeToConfigurationUpdateOperation(rpc.ClientOperation): +class _DeferComponentUpdateOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToConfigurationUpdate' + return 'aws.greengrass#DeferComponentUpdate' @classmethod def _request_type(cls): - return SubscribeToConfigurationUpdateRequest + return DeferComponentUpdateRequest @classmethod def _request_stream_type(cls): @@ -3882,21 +4360,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return SubscribeToConfigurationUpdateResponse + return DeferComponentUpdateResponse @classmethod def _response_stream_type(cls): - return ConfigurationUpdateEvents + return None -class _ListComponentsOperation(rpc.ClientOperation): +class _SubscribeToValidateConfigurationUpdatesOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#ListComponents' + return 'aws.greengrass#SubscribeToValidateConfigurationUpdates' @classmethod def _request_type(cls): - return ListComponentsRequest + return SubscribeToValidateConfigurationUpdatesRequest @classmethod def _request_stream_type(cls): @@ -3904,21 +4382,43 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return ListComponentsResponse + return SubscribeToValidateConfigurationUpdatesResponse + + @classmethod + def _response_stream_type(cls): + return ValidateConfigurationUpdateEvents + + +class _GetConfigurationOperation(rpc.ClientOperation): + @classmethod + def _model_name(cls): + return 'aws.greengrass#GetConfiguration' + + @classmethod + def _request_type(cls): + return GetConfigurationRequest + + @classmethod + def _request_stream_type(cls): + return None + + @classmethod + def _response_type(cls): + return GetConfigurationResponse @classmethod def _response_stream_type(cls): return None -class _CreateDebugPasswordOperation(rpc.ClientOperation): +class _SubscribeToTopicOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#CreateDebugPassword' + return 'aws.greengrass#SubscribeToTopic' @classmethod def _request_type(cls): - return CreateDebugPasswordRequest + return SubscribeToTopicRequest @classmethod def _request_stream_type(cls): @@ -3926,21 +4426,43 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return CreateDebugPasswordResponse + return SubscribeToTopicResponse + + @classmethod + def _response_stream_type(cls): + return SubscriptionResponseMessage + + +class _GetComponentDetailsOperation(rpc.ClientOperation): + @classmethod + def _model_name(cls): + return 'aws.greengrass#GetComponentDetails' + + @classmethod + def _request_type(cls): + return GetComponentDetailsRequest + + @classmethod + def _request_stream_type(cls): + return None + + @classmethod + def _response_type(cls): + return GetComponentDetailsResponse @classmethod def _response_stream_type(cls): return None -class _DeferComponentUpdateOperation(rpc.ClientOperation): +class _PublishToTopicOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#DeferComponentUpdate' + return 'aws.greengrass#PublishToTopic' @classmethod def _request_type(cls): - return DeferComponentUpdateRequest + return PublishToTopicRequest @classmethod def _request_stream_type(cls): @@ -3948,21 +4470,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return DeferComponentUpdateResponse + return PublishToTopicResponse @classmethod def _response_stream_type(cls): return None -class _SendConfigurationValidityReportOperation(rpc.ClientOperation): +class _ListComponentsOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#SendConfigurationValidityReport' + return 'aws.greengrass#ListComponents' @classmethod def _request_type(cls): - return SendConfigurationValidityReportRequest + return ListComponentsRequest @classmethod def _request_stream_type(cls): @@ -3970,21 +4492,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return SendConfigurationValidityReportResponse + return ListComponentsResponse @classmethod def _response_stream_type(cls): return None -class _UpdateConfigurationOperation(rpc.ClientOperation): +class _CreateDebugPasswordOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateConfiguration' + return 'aws.greengrass#CreateDebugPassword' @classmethod def _request_type(cls): - return UpdateConfigurationRequest + return CreateDebugPasswordRequest @classmethod def _request_stream_type(cls): @@ -3992,21 +4514,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return UpdateConfigurationResponse + return CreateDebugPasswordResponse @classmethod def _response_stream_type(cls): return None -class _SubscribeToValidateConfigurationUpdatesOperation(rpc.ClientOperation): +class _GetThingShadowOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToValidateConfigurationUpdates' + return 'aws.greengrass#GetThingShadow' @classmethod def _request_type(cls): - return SubscribeToValidateConfigurationUpdatesRequest + return GetThingShadowRequest @classmethod def _request_stream_type(cls): @@ -4014,21 +4536,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return SubscribeToValidateConfigurationUpdatesResponse + return GetThingShadowResponse @classmethod def _response_stream_type(cls): - return ValidateConfigurationUpdateEvents + return None -class _ValidateAuthorizationTokenOperation(rpc.ClientOperation): +class _SendConfigurationValidityReportOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateAuthorizationToken' + return 'aws.greengrass#SendConfigurationValidityReport' @classmethod def _request_type(cls): - return ValidateAuthorizationTokenRequest + return SendConfigurationValidityReportRequest @classmethod def _request_stream_type(cls): @@ -4036,21 +4558,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return ValidateAuthorizationTokenResponse + return SendConfigurationValidityReportResponse @classmethod def _response_stream_type(cls): return None -class _RestartComponentOperation(rpc.ClientOperation): +class _UpdateThingShadowOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#RestartComponent' + return 'aws.greengrass#UpdateThingShadow' @classmethod def _request_type(cls): - return RestartComponentRequest + return UpdateThingShadowRequest @classmethod def _request_stream_type(cls): @@ -4058,21 +4580,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return RestartComponentResponse + return UpdateThingShadowResponse @classmethod def _response_stream_type(cls): return None -class _GetLocalDeploymentStatusOperation(rpc.ClientOperation): +class _UpdateConfigurationOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetLocalDeploymentStatus' + return 'aws.greengrass#UpdateConfiguration' @classmethod def _request_type(cls): - return GetLocalDeploymentStatusRequest + return UpdateConfigurationRequest @classmethod def _request_stream_type(cls): @@ -4080,21 +4602,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetLocalDeploymentStatusResponse + return UpdateConfigurationResponse @classmethod def _response_stream_type(cls): return None -class _GetSecretValueOperation(rpc.ClientOperation): +class _ValidateAuthorizationTokenOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetSecretValue' + return 'aws.greengrass#ValidateAuthorizationToken' @classmethod def _request_type(cls): - return GetSecretValueRequest + return ValidateAuthorizationTokenRequest @classmethod def _request_stream_type(cls): @@ -4102,21 +4624,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetSecretValueResponse + return ValidateAuthorizationTokenResponse @classmethod def _response_stream_type(cls): return None -class _UpdateStateOperation(rpc.ClientOperation): +class _RestartComponentOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateState' + return 'aws.greengrass#RestartComponent' @classmethod def _request_type(cls): - return UpdateStateRequest + return RestartComponentRequest @classmethod def _request_stream_type(cls): @@ -4124,21 +4646,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return UpdateStateResponse + return RestartComponentResponse @classmethod def _response_stream_type(cls): return None -class _GetConfigurationOperation(rpc.ClientOperation): +class _GetLocalDeploymentStatusOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetConfiguration' + return 'aws.greengrass#GetLocalDeploymentStatus' @classmethod def _request_type(cls): - return GetConfigurationRequest + return GetLocalDeploymentStatusRequest @classmethod def _request_stream_type(cls): @@ -4146,21 +4668,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetConfigurationResponse + return GetLocalDeploymentStatusResponse @classmethod def _response_stream_type(cls): return None -class _SubscribeToTopicOperation(rpc.ClientOperation): +class _GetSecretValueOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToTopic' + return 'aws.greengrass#GetSecretValue' @classmethod def _request_type(cls): - return SubscribeToTopicRequest + return GetSecretValueRequest @classmethod def _request_stream_type(cls): @@ -4168,21 +4690,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return SubscribeToTopicResponse + return GetSecretValueResponse @classmethod def _response_stream_type(cls): - return SubscriptionResponseMessage + return None -class _GetComponentDetailsOperation(rpc.ClientOperation): +class _UpdateStateOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetComponentDetails' + return 'aws.greengrass#UpdateState' @classmethod def _request_type(cls): - return GetComponentDetailsRequest + return UpdateStateRequest @classmethod def _request_stream_type(cls): @@ -4190,7 +4712,29 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetComponentDetailsResponse + return UpdateStateResponse + + @classmethod + def _response_stream_type(cls): + return None + + +class _ListNamedShadowsForThingOperation(rpc.ClientOperation): + @classmethod + def _model_name(cls): + return 'aws.greengrass#ListNamedShadowsForThing' + + @classmethod + def _request_type(cls): + return ListNamedShadowsForThingRequest + + @classmethod + def _request_stream_type(cls): + return None + + @classmethod + def _response_type(cls): + return ListNamedShadowsForThingResponse @classmethod def _response_stream_type(cls): diff --git a/test/echotestrpc/model.py b/test/echotestrpc/model.py index 6717e877..4cff86c6 100644 --- a/test/echotestrpc/model.py +++ b/test/echotestrpc/model.py @@ -230,6 +230,7 @@ class MessageData(rpc.Shape): blob_message: string_list_message: key_value_pair_list: + string_to_value: Attributes: string_message: @@ -240,6 +241,7 @@ class MessageData(rpc.Shape): blob_message: string_list_message: key_value_pair_list: + string_to_value: """ def __init__(self, *, @@ -250,7 +252,8 @@ def __init__(self, *, enum_message: typing.Optional[str] = None, blob_message: typing.Optional[bytes] = None, string_list_message: typing.Optional[typing.List[str]] = None, - key_value_pair_list: typing.Optional[typing.List[Pair]] = None): + key_value_pair_list: typing.Optional[typing.List[Pair]] = None, + string_to_value: typing.Optional[typing.Dict[str, Product]] = None): super().__init__() self.string_message = string_message # type: typing.Optional[str] self.boolean_message = boolean_message # type: typing.Optional[bool] @@ -260,6 +263,7 @@ def __init__(self, *, self.blob_message = blob_message # type: typing.Optional[bytes] self.string_list_message = string_list_message # type: typing.Optional[typing.List[str]] self.key_value_pair_list = key_value_pair_list # type: typing.Optional[typing.List[Pair]] + self.string_to_value = string_to_value # type: typing.Optional[typing.Dict[str, Product]] def _to_payload(self): payload = {} @@ -279,6 +283,8 @@ def _to_payload(self): payload['stringListMessage'] = self.string_list_message if self.key_value_pair_list is not None: payload['keyValuePairList'] = [i._to_payload() for i in self.key_value_pair_list] + if self.string_to_value is not None: + payload['stringToValue'] = {k: v._to_payload() for k, v in self.string_to_value.items()} return payload @classmethod @@ -300,6 +306,8 @@ def _from_payload(cls, payload): new.string_list_message = payload['stringListMessage'] if 'keyValuePairList' in payload: new.key_value_pair_list = [Pair._from_payload(i) for i in payload['keyValuePairList']] + if 'stringToValue' in payload: + new.string_to_value = {k: Product._from_payload(v) for k,v in payload['stringToValue'].items()} return new @classmethod