diff --git a/awsiot/greengrasscoreipc/client.py b/awsiot/greengrasscoreipc/client.py index e2d598d7..56438d9b 100644 --- a/awsiot/greengrasscoreipc/client.py +++ b/awsiot/greengrasscoreipc/client.py @@ -71,6 +71,40 @@ def close(self) -> concurrent.futures.Future: return super().close() +class PublishToTopicOperation(model._PublishToTopicOperation): + """ + PublishToTopicOperation + + Create with GreengrassCoreIPCClient.new_publish_to_topic() + """ + + def activate(self, request: model.PublishToTopicRequest) -> concurrent.futures.Future: + """ + 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 + 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 PublishToTopicResponse, + 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 PublishToIoTCoreOperation(model._PublishToIoTCoreOperation): """ PublishToIoTCoreOperation @@ -168,16 +202,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class DeleteThingShadowOperation(model._DeleteThingShadowOperation): +class ListComponentsOperation(model._ListComponentsOperation): """ - DeleteThingShadowOperation + ListComponentsOperation - Create with GreengrassCoreIPCClient.new_delete_thing_shadow() + Create with GreengrassCoreIPCClient.new_list_components() """ - def activate(self, request: model.DeleteThingShadowRequest) -> concurrent.futures.Future: + def activate(self, request: model.ListComponentsRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial DeleteThingShadowRequest 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 @@ -187,7 +221,7 @@ def activate(self, request: model.DeleteThingShadowRequest) -> concurrent.future def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of DeleteThingShadowResponse, + Returns a Future which completes with a result of ListComponentsResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -202,16 +236,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class DeferComponentUpdateOperation(model._DeferComponentUpdateOperation): +class CreateDebugPasswordOperation(model._CreateDebugPasswordOperation): """ - DeferComponentUpdateOperation + CreateDebugPasswordOperation - Create with GreengrassCoreIPCClient.new_defer_component_update() + Create with GreengrassCoreIPCClient.new_create_debug_password() """ - def activate(self, request: model.DeferComponentUpdateRequest) -> concurrent.futures.Future: + def activate(self, request: model.CreateDebugPasswordRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial DeferComponentUpdateRequest message. + Activate this operation by sending the initial CreateDebugPasswordRequest 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 +255,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 CreateDebugPasswordResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -236,45 +270,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SubscribeToValidateConfigurationUpdatesStreamHandler(rpc.StreamResponseHandler): - """ - Event handler for SubscribeToValidateConfigurationUpdatesOperation - - Inherit from this class and override methods to handle - stream events during a SubscribeToValidateConfigurationUpdatesOperation. - """ - - def on_stream_event(self, event: model.ValidateConfigurationUpdateEvents) -> None: - """ - Invoked when a ValidateConfigurationUpdateEvents 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 SubscribeToValidateConfigurationUpdatesOperation(model._SubscribeToValidateConfigurationUpdatesOperation): +class DeferComponentUpdateOperation(model._DeferComponentUpdateOperation): """ - SubscribeToValidateConfigurationUpdatesOperation + DeferComponentUpdateOperation - Create with GreengrassCoreIPCClient.new_subscribe_to_validate_configuration_updates() + Create with GreengrassCoreIPCClient.new_defer_component_update() """ - def activate(self, request: model.SubscribeToValidateConfigurationUpdatesRequest) -> concurrent.futures.Future: + def activate(self, request: model.DeferComponentUpdateRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SubscribeToValidateConfigurationUpdatesRequest message. + 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 @@ -284,7 +289,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 DeferComponentUpdateResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -299,16 +304,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetConfigurationOperation(model._GetConfigurationOperation): +class SendConfigurationValidityReportOperation(model._SendConfigurationValidityReportOperation): """ - GetConfigurationOperation + SendConfigurationValidityReportOperation - Create with GreengrassCoreIPCClient.new_get_configuration() + Create with GreengrassCoreIPCClient.new_send_configuration_validity_report() """ - def activate(self, request: model.GetConfigurationRequest) -> concurrent.futures.Future: + def activate(self, request: model.SendConfigurationValidityReportRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetConfigurationRequest 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 @@ -318,7 +323,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 SendConfigurationValidityReportResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -333,45 +338,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SubscribeToTopicStreamHandler(rpc.StreamResponseHandler): - """ - Event handler for SubscribeToTopicOperation - - Inherit from this class and override methods to handle - stream events during a SubscribeToTopicOperation. - """ - - def on_stream_event(self, event: model.SubscriptionResponseMessage) -> None: - """ - 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): +class UpdateConfigurationOperation(model._UpdateConfigurationOperation): """ - SubscribeToTopicOperation + UpdateConfigurationOperation - Create with GreengrassCoreIPCClient.new_subscribe_to_topic() + Create with GreengrassCoreIPCClient.new_update_configuration() """ - def activate(self, request: model.SubscribeToTopicRequest) -> concurrent.futures.Future: + def activate(self, request: model.UpdateConfigurationRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SubscribeToTopicRequest 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 @@ -381,7 +357,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 UpdateConfigurationResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -396,84 +372,45 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetComponentDetailsOperation(model._GetComponentDetailsOperation): +class SubscribeToValidateConfigurationUpdatesStreamHandler(rpc.StreamResponseHandler): """ - GetComponentDetailsOperation + Event handler for SubscribeToValidateConfigurationUpdatesOperation - Create with GreengrassCoreIPCClient.new_get_component_details() + Inherit from this class and override methods to handle + stream events during a SubscribeToValidateConfigurationUpdatesOperation. """ - def activate(self, request: model.GetComponentDetailsRequest) -> concurrent.futures.Future: - """ - 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 - 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 GetComponentDetailsResponse, - 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. + def on_stream_event(self, event: model.ValidateConfigurationUpdateEvents) -> None: """ - return super().close() - - -class PublishToTopicOperation(model._PublishToTopicOperation): - """ - PublishToTopicOperation - - Create with GreengrassCoreIPCClient.new_publish_to_topic() - """ - - def activate(self, request: model.PublishToTopicRequest) -> concurrent.futures.Future: + Invoked when a ValidateConfigurationUpdateEvents is received. """ - Activate this operation by sending the initial PublishToTopicRequest message. + pass - 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. + def on_stream_error(self, error: Exception) -> bool: """ - return self._activate(request) + Invoked when an error occurs on the operation stream. - def get_response(self) -> concurrent.futures.Future: - """ - Returns a Future which completes with a result of PublishToTopicResponse, - when the initial response is received, or an exception. + Return True if operation should close as a result of this error, """ - return self._get_response() + return True - def close(self) -> concurrent.futures.Future: + def on_stream_closed(self) -> None: """ - Close the operation, whether or not it has completed. - - Returns a Future which completes with a result of None - when the operation has closed. + Invoked when the stream for this operation is closed. """ - return super().close() + pass -class ListComponentsOperation(model._ListComponentsOperation): +class SubscribeToValidateConfigurationUpdatesOperation(model._SubscribeToValidateConfigurationUpdatesOperation): """ - ListComponentsOperation + SubscribeToValidateConfigurationUpdatesOperation - Create with GreengrassCoreIPCClient.new_list_components() + Create with GreengrassCoreIPCClient.new_subscribe_to_validate_configuration_updates() """ - def activate(self, request: model.ListComponentsRequest) -> concurrent.futures.Future: + def activate(self, request: model.SubscribeToValidateConfigurationUpdatesRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial ListComponentsRequest 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 @@ -483,7 +420,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 SubscribeToValidateConfigurationUpdatesResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -498,16 +435,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class CreateDebugPasswordOperation(model._CreateDebugPasswordOperation): +class ValidateAuthorizationTokenOperation(model._ValidateAuthorizationTokenOperation): """ - CreateDebugPasswordOperation + ValidateAuthorizationTokenOperation - Create with GreengrassCoreIPCClient.new_create_debug_password() + Create with GreengrassCoreIPCClient.new_validate_authorization_token() """ - def activate(self, request: model.CreateDebugPasswordRequest) -> concurrent.futures.Future: + def activate(self, request: model.ValidateAuthorizationTokenRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial CreateDebugPasswordRequest 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 @@ -517,7 +454,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 ValidateAuthorizationTokenResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -532,16 +469,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class GetThingShadowOperation(model._GetThingShadowOperation): +class RestartComponentOperation(model._RestartComponentOperation): """ - GetThingShadowOperation + RestartComponentOperation - Create with GreengrassCoreIPCClient.new_get_thing_shadow() + Create with GreengrassCoreIPCClient.new_restart_component() """ - def activate(self, request: model.GetThingShadowRequest) -> concurrent.futures.Future: + def activate(self, request: model.RestartComponentRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetThingShadowRequest 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 @@ -551,7 +488,7 @@ def activate(self, request: model.GetThingShadowRequest) -> concurrent.futures.F def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of GetThingShadowResponse, + Returns a Future which completes with a result of RestartComponentResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -566,16 +503,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class SendConfigurationValidityReportOperation(model._SendConfigurationValidityReportOperation): +class GetLocalDeploymentStatusOperation(model._GetLocalDeploymentStatusOperation): """ - SendConfigurationValidityReportOperation + GetLocalDeploymentStatusOperation - Create with GreengrassCoreIPCClient.new_send_configuration_validity_report() + Create with GreengrassCoreIPCClient.new_get_local_deployment_status() """ - def activate(self, request: model.SendConfigurationValidityReportRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetLocalDeploymentStatusRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial SendConfigurationValidityReportRequest 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 @@ -585,7 +522,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 GetLocalDeploymentStatusResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -600,16 +537,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class UpdateThingShadowOperation(model._UpdateThingShadowOperation): +class GetSecretValueOperation(model._GetSecretValueOperation): """ - UpdateThingShadowOperation + GetSecretValueOperation - Create with GreengrassCoreIPCClient.new_update_thing_shadow() + Create with GreengrassCoreIPCClient.new_get_secret_value() """ - def activate(self, request: model.UpdateThingShadowRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetSecretValueRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial UpdateThingShadowRequest message. + Activate this operation by sending the initial GetSecretValueRequest message. Returns a Future which completes with a result of None if the request is successfully written to the wire, or an exception if @@ -619,7 +556,7 @@ def activate(self, request: model.UpdateThingShadowRequest) -> concurrent.future def get_response(self) -> concurrent.futures.Future: """ - Returns a Future which completes with a result of UpdateThingShadowResponse, + Returns a Future which completes with a result of GetSecretValueResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -634,16 +571,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class UpdateConfigurationOperation(model._UpdateConfigurationOperation): +class UpdateStateOperation(model._UpdateStateOperation): """ - UpdateConfigurationOperation + UpdateStateOperation - Create with GreengrassCoreIPCClient.new_update_configuration() + Create with GreengrassCoreIPCClient.new_update_state() """ - def activate(self, request: model.UpdateConfigurationRequest) -> concurrent.futures.Future: + def activate(self, request: model.UpdateStateRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial UpdateConfigurationRequest 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 @@ -653,7 +590,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 UpdateStateResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -668,16 +605,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class ValidateAuthorizationTokenOperation(model._ValidateAuthorizationTokenOperation): +class GetConfigurationOperation(model._GetConfigurationOperation): """ - ValidateAuthorizationTokenOperation + GetConfigurationOperation - Create with GreengrassCoreIPCClient.new_validate_authorization_token() + Create with GreengrassCoreIPCClient.new_get_configuration() """ - def activate(self, request: model.ValidateAuthorizationTokenRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetConfigurationRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial ValidateAuthorizationTokenRequest 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 @@ -687,7 +624,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 GetConfigurationResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -702,84 +639,45 @@ def close(self) -> concurrent.futures.Future: return super().close() -class RestartComponentOperation(model._RestartComponentOperation): +class SubscribeToTopicStreamHandler(rpc.StreamResponseHandler): """ - RestartComponentOperation + Event handler for SubscribeToTopicOperation - Create with GreengrassCoreIPCClient.new_restart_component() + Inherit from this class and override methods to handle + stream events during a SubscribeToTopicOperation. """ - def activate(self, request: model.RestartComponentRequest) -> concurrent.futures.Future: - """ - 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 - 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 RestartComponentResponse, - 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. + def on_stream_event(self, event: model.SubscriptionResponseMessage) -> None: """ - return super().close() - - -class GetLocalDeploymentStatusOperation(model._GetLocalDeploymentStatusOperation): - """ - GetLocalDeploymentStatusOperation - - Create with GreengrassCoreIPCClient.new_get_local_deployment_status() - """ - - def activate(self, request: model.GetLocalDeploymentStatusRequest) -> concurrent.futures.Future: + Invoked when a SubscriptionResponseMessage is received. """ - Activate this operation by sending the initial GetLocalDeploymentStatusRequest message. + pass - 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. + def on_stream_error(self, error: Exception) -> bool: """ - return self._activate(request) + Invoked when an error occurs on the operation stream. - def get_response(self) -> concurrent.futures.Future: - """ - Returns a Future which completes with a result of GetLocalDeploymentStatusResponse, - when the initial response is received, or an exception. + Return True if operation should close as a result of this error, """ - return self._get_response() + return True - def close(self) -> concurrent.futures.Future: + def on_stream_closed(self) -> None: """ - Close the operation, whether or not it has completed. - - Returns a Future which completes with a result of None - when the operation has closed. + Invoked when the stream for this operation is closed. """ - return super().close() + pass -class GetSecretValueOperation(model._GetSecretValueOperation): +class SubscribeToTopicOperation(model._SubscribeToTopicOperation): """ - GetSecretValueOperation + SubscribeToTopicOperation - Create with GreengrassCoreIPCClient.new_get_secret_value() + Create with GreengrassCoreIPCClient.new_subscribe_to_topic() """ - def activate(self, request: model.GetSecretValueRequest) -> concurrent.futures.Future: + def activate(self, request: model.SubscribeToTopicRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial GetSecretValueRequest message. + 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 @@ -789,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 SubscribeToTopicResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -804,16 +702,16 @@ def close(self) -> concurrent.futures.Future: return super().close() -class UpdateStateOperation(model._UpdateStateOperation): +class GetComponentDetailsOperation(model._GetComponentDetailsOperation): """ - UpdateStateOperation + GetComponentDetailsOperation - Create with GreengrassCoreIPCClient.new_update_state() + Create with GreengrassCoreIPCClient.new_get_component_details() """ - def activate(self, request: model.UpdateStateRequest) -> concurrent.futures.Future: + def activate(self, request: model.GetComponentDetailsRequest) -> concurrent.futures.Future: """ - Activate this operation by sending the initial UpdateStateRequest 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 @@ -823,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 GetComponentDetailsResponse, when the initial response is received, or an exception. """ return self._get_response() @@ -1028,77 +926,29 @@ def new_subscribe_to_iot_core(self, stream_handler: SubscribeToIoTCoreStreamHand """ return self._new_operation(SubscribeToIoTCoreOperation, stream_handler) - def new_publish_to_iot_core(self) -> PublishToIoTCoreOperation: - """ - 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(PublishToIoTCoreOperation) - - def new_subscribe_to_configuration_update(self, stream_handler: SubscribeToConfigurationUpdateStreamHandler) -> SubscribeToConfigurationUpdateOperation: - """ - 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(DeleteThingShadowOperation) - - def new_defer_component_update(self) -> DeferComponentUpdateOperation: - """ - 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: + def new_publish_to_topic(self) -> PublishToTopicOperation: """ - Create a new SubscribeToValidateConfigurationUpdatesOperation. + 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. - - 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(PublishToTopicOperation) - def new_get_configuration(self) -> GetConfigurationOperation: + def new_publish_to_iot_core(self) -> PublishToIoTCoreOperation: """ - Create a new GetConfigurationOperation. + 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(GetConfigurationOperation) + return self._new_operation(PublishToIoTCoreOperation) - def new_subscribe_to_topic(self, stream_handler: SubscribeToTopicStreamHandler) -> SubscribeToTopicOperation: + def new_subscribe_to_configuration_update(self, stream_handler: SubscribeToConfigurationUpdateStreamHandler) -> SubscribeToConfigurationUpdateOperation: """ - Create a new SubscribeToTopicOperation. + 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 @@ -1108,27 +958,7 @@ def new_subscribe_to_topic(self, stream_handler: SubscribeToTopicStreamHandler) 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) + return self._new_operation(SubscribeToConfigurationUpdateOperation, stream_handler) def new_list_components(self) -> ListComponentsOperation: """ @@ -1150,15 +980,15 @@ def new_create_debug_password(self) -> CreateDebugPasswordOperation: """ return self._new_operation(CreateDebugPasswordOperation) - def new_get_thing_shadow(self) -> GetThingShadowOperation: + def new_defer_component_update(self) -> DeferComponentUpdateOperation: """ - Create a new GetThingShadowOperation. + 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(GetThingShadowOperation) + return self._new_operation(DeferComponentUpdateOperation) def new_send_configuration_validity_report(self) -> SendConfigurationValidityReportOperation: """ @@ -1170,25 +1000,29 @@ def new_send_configuration_validity_report(self) -> SendConfigurationValidityRep """ return self._new_operation(SendConfigurationValidityReportOperation) - def new_update_thing_shadow(self) -> UpdateThingShadowOperation: + def new_update_configuration(self) -> UpdateConfigurationOperation: """ - Create a new UpdateThingShadowOperation. + 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. """ - return self._new_operation(UpdateThingShadowOperation) + return self._new_operation(UpdateConfigurationOperation) - def new_update_configuration(self) -> UpdateConfigurationOperation: + def new_subscribe_to_validate_configuration_updates(self, stream_handler: SubscribeToValidateConfigurationUpdatesStreamHandler) -> SubscribeToValidateConfigurationUpdatesOperation: """ - Create a new UpdateConfigurationOperation. + 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 events to fire. + + Args: + stream_handler: Methods on this object will be called as + stream events happen on this operation. """ - return self._new_operation(UpdateConfigurationOperation) + return self._new_operation(SubscribeToValidateConfigurationUpdatesOperation, stream_handler) def new_validate_authorization_token(self) -> ValidateAuthorizationTokenOperation: """ @@ -1240,6 +1074,40 @@ 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: + """ + 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_subscribe_to_component_updates(self, stream_handler: SubscribeToComponentUpdatesStreamHandler) -> SubscribeToComponentUpdatesOperation: """ Create a new SubscribeToComponentUpdatesOperation. diff --git a/awsiot/greengrasscoreipc/model.py b/awsiot/greengrasscoreipc/model.py index d5e90d4d..3b3fc998 100644 --- a/awsiot/greengrasscoreipc/model.py +++ b/awsiot/greengrasscoreipc/model.py @@ -180,26 +180,6 @@ 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 @@ -215,40 +195,59 @@ class LifecycleState: STOPPING = 'STOPPING' -class BinaryMessage(rpc.Shape): +class DeploymentStatus: """ - BinaryMessage + DeploymentStatus enum + """ + + QUEUED = 'QUEUED' + IN_PROGRESS = 'IN_PROGRESS' + SUCCEEDED = 'SUCCEEDED' + FAILED = 'FAILED' + + +class ValidateConfigurationUpdateEvent(rpc.Shape): + """ + 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 = [] @@ -263,40 +262,57 @@ def __eq__(self, other): return False -class JsonMessage(rpc.Shape): +class ConfigurationValidityStatus: """ - JsonMessage + ConfigurationValidityStatus enum + """ + + ACCEPTED = 'ACCEPTED' + REJECTED = 'REJECTED' + + +class ConfigurationUpdateEvent(rpc.Shape): + """ + 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 = [] @@ -311,48 +327,40 @@ def __eq__(self, other): return False -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 = [] @@ -367,48 +375,40 @@ def __eq__(self, other): return False -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 = [] @@ -537,59 +537,64 @@ def __eq__(self, other): return False -class ReportedLifecycleState: - """ - ReportedLifecycleState enum - """ - - RUNNING = 'RUNNING' - ERRORED = 'ERRORED' - - -class SecretValue(rpc.Shape): +class ComponentDetails(rpc.Shape): """ - MQTTMessage is a "tagged union" class. + ComponentDetails - 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: + component_name: + version: + state: LifecycleState enum value + configuration: Attributes: - secret_string: - secret_binary: + component_name: + version: + state: LifecycleState enum value + configuration: """ def __init__(self, *, - secret_string: typing.Optional[str] = None, - secret_binary: typing.Optional[bytes] = None): + 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.secret_string = secret_string # type: typing.Optional[str] - self.secret_binary = secret_binary # type: typing.Optional[bytes] + 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.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.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 'secretString' in payload: - new.secret_string = payload['secretString'] - if 'secretBinary' in payload: - new.secret_binary = base64.b64decode(payload['secretBinary']) + 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#SecretValue' + return 'aws.greengrass#ComponentDetails' def __repr__(self): attrs = [] @@ -604,48 +609,50 @@ def __eq__(self, other): return False -class LocalDeployment(rpc.Shape): +class SubscriptionResponseMessage(rpc.Shape): """ - LocalDeployment + ComponentDetails is a "tagged union" class. - All attributes are None by default, and may be set by keyword in the constructor. + 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: - deployment_id: - status: DeploymentStatus enum value + json_message: + binary_message: Attributes: - deployment_id: - status: DeploymentStatus enum value + json_message: + binary_message: """ def __init__(self, *, - deployment_id: typing.Optional[str] = None, - status: typing.Optional[str] = None): + json_message: typing.Optional[JsonMessage] = None, + binary_message: typing.Optional[BinaryMessage] = None): super().__init__() - self.deployment_id = deployment_id # type: typing.Optional[str] - self.status = status # type: typing.Optional[str] + 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.deployment_id is not None: - payload['deploymentId'] = self.deployment_id - if self.status is not None: - payload['status'] = self.status - return 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 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] - if 'status' in payload: - new.status = payload['status'] + 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#LocalDeployment' + return 'aws.greengrass#SubscriptionResponseMessage' def __repr__(self): attrs = [] @@ -660,65 +667,59 @@ def __eq__(self, other): return False -class RequestStatus: +class ReportedLifecycleState: """ - RequestStatus enum + ReportedLifecycleState enum """ - SUCCEEDED = 'SUCCEEDED' - FAILED = 'FAILED' + RUNNING = 'RUNNING' + ERRORED = 'ERRORED' -class ConfigurationValidityReport(rpc.Shape): +class SecretValue(rpc.Shape): """ - ConfigurationValidityReport + ComponentDetails is a "tagged union" class. - All attributes are None by default, and may be set by keyword in the constructor. + 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: - status: ConfigurationValidityStatus enum value - deployment_id: - message: + secret_string: + secret_binary: Attributes: - status: ConfigurationValidityStatus enum value - deployment_id: - message: + secret_string: + secret_binary: """ def __init__(self, *, - status: typing.Optional[str] = None, - deployment_id: typing.Optional[str] = None, - message: typing.Optional[str] = None): + secret_string: typing.Optional[str] = None, + secret_binary: typing.Optional[bytes] = 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] + 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.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 + 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 'status' in payload: - new.status = payload['status'] - if 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] - if 'message' in payload: - new.message = payload['message'] + 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#ConfigurationValidityReport' + return 'aws.greengrass#SecretValue' def __repr__(self): attrs = [] @@ -733,50 +734,48 @@ def __eq__(self, other): return False -class PublishMessage(rpc.Shape): +class LocalDeployment(rpc.Shape): """ - ConfigurationValidityReport 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() + 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 'jsonMessage' in payload: - new.json_message = JsonMessage._from_payload(payload['jsonMessage']) - if 'binaryMessage' in payload: - new.binary_message = BinaryMessage._from_payload(payload['binaryMessage']) + 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#PublishMessage' + return 'aws.greengrass#LocalDeployment' def __repr__(self): attrs = [] @@ -791,64 +790,51 @@ def __eq__(self, other): return False -class ComponentDetails(rpc.Shape): +class RequestStatus: + """ + RequestStatus enum """ - ComponentDetails - All attributes are None by default, and may be set by keyword in the constructor. + SUCCEEDED = 'SUCCEEDED' + FAILED = 'FAILED' + + +class ValidateConfigurationUpdateEvents(rpc.Shape): + """ + LocalDeployment 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: + validate_configuration_update_event: Attributes: - component_name: - version: - state: LifecycleState enum value - configuration: + validate_configuration_update_event: """ 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): + validate_configuration_update_event: typing.Optional[ValidateConfigurationUpdateEvent] = 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.validate_configuration_update_event = validate_configuration_update_event # type: typing.Optional[ValidateConfigurationUpdateEvent] 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.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 '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 'validateConfigurationUpdateEvent' in payload: + new.validate_configuration_update_event = ValidateConfigurationUpdateEvent._from_payload(payload['validateConfigurationUpdateEvent']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#ComponentDetails' + return 'aws.greengrass#ValidateConfigurationUpdateEvents' def __repr__(self): attrs = [] @@ -863,50 +849,56 @@ def __eq__(self, other): return False -class SubscriptionResponseMessage(rpc.Shape): +class ConfigurationValidityReport(rpc.Shape): """ - ComponentDetails is a "tagged union" class. + ConfigurationValidityReport - 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: + status: ConfigurationValidityStatus enum value + deployment_id: + message: Attributes: - json_message: - binary_message: + status: ConfigurationValidityStatus enum value + deployment_id: + message: """ def __init__(self, *, - json_message: typing.Optional[JsonMessage] = None, - binary_message: typing.Optional[BinaryMessage] = None): + status: typing.Optional[str] = None, + deployment_id: typing.Optional[str] = None, + message: 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.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.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() + 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 'jsonMessage' in payload: - new.json_message = JsonMessage._from_payload(payload['jsonMessage']) - if 'binaryMessage' in payload: - new.binary_message = BinaryMessage._from_payload(payload['binaryMessage']) + 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#SubscriptionResponseMessage' + return 'aws.greengrass#ConfigurationValidityReport' def __repr__(self): attrs = [] @@ -921,42 +913,42 @@ def __eq__(self, other): return False -class ValidateConfigurationUpdateEvents(rpc.Shape): +class ConfigurationUpdateEvents(rpc.Shape): """ - ComponentDetails is a "tagged union" class. + 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: - validate_configuration_update_event: + configuration_update_event: Attributes: - validate_configuration_update_event: + configuration_update_event: """ def __init__(self, *, - validate_configuration_update_event: typing.Optional[ValidateConfigurationUpdateEvent] = None): + configuration_update_event: typing.Optional[ConfigurationUpdateEvent] = None): super().__init__() - self.validate_configuration_update_event = validate_configuration_update_event # type: typing.Optional[ValidateConfigurationUpdateEvent] + self.configuration_update_event = configuration_update_event # type: typing.Optional[ConfigurationUpdateEvent] 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.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 'validateConfigurationUpdateEvent' in payload: - new.validate_configuration_update_event = ValidateConfigurationUpdateEvent._from_payload(payload['validateConfigurationUpdateEvent']) + if 'configurationUpdateEvent' in payload: + new.configuration_update_event = ConfigurationUpdateEvent._from_payload(payload['configurationUpdateEvent']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateConfigurationUpdateEvents' + return 'aws.greengrass#ConfigurationUpdateEvents' def __repr__(self): attrs = [] @@ -971,533 +963,50 @@ def __eq__(self, other): return False -class ConfigurationUpdateEvents(rpc.Shape): +class PublishMessage(rpc.Shape): """ - ComponentDetails is a "tagged union" class. + 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: + json_message: + binary_message: Attributes: - configuration_update_event: + json_message: + binary_message: """ 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 = [] - 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 StopComponentResponse(rpc.Shape): - """ - StopComponentResponse - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - stop_status: RequestStatus enum value - message: - - Attributes: - stop_status: RequestStatus enum value - message: - """ - - def __init__(self, *, - stop_status: typing.Optional[str] = None, - message: typing.Optional[str] = None): - super().__init__() - self.stop_status = stop_status # type: typing.Optional[str] - self.message = message # 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 - 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'] - return new - - @classmethod - def _model_name(cls): - return 'aws.greengrass#StopComponentResponse' - - 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 StopComponentRequest(rpc.Shape): - """ - StopComponentRequest - - 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, *, - 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#StopComponentRequest' - - 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 ListLocalDeploymentsResponse(rpc.Shape): - """ - ListLocalDeploymentsResponse - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - local_deployments: - - Attributes: - local_deployments: - """ - - def __init__(self, *, - local_deployments: typing.Optional[typing.List[LocalDeployment]] = None): - super().__init__() - self.local_deployments = local_deployments # type: typing.Optional[typing.List[LocalDeployment]] - - def _to_payload(self): - 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 '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#ListLocalDeploymentsResponse' - - 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 ListLocalDeploymentsRequest(rpc.Shape): - """ - ListLocalDeploymentsRequest - """ - - 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#ListLocalDeploymentsRequest' + return 'aws.greengrass#PublishMessage' def __repr__(self): attrs = [] @@ -1512,26 +1021,42 @@ def __eq__(self, other): return False -class SubscribeToComponentUpdatesResponse(rpc.Shape): +class IoTCoreMessage(rpc.Shape): """ - SubscribeToComponentUpdatesResponse + 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: + message: + + Attributes: + message: """ - def __init__(self): + 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#SubscribeToComponentUpdatesResponse' + return 'aws.greengrass#IoTCoreMessage' def __repr__(self): attrs = [] @@ -1546,26 +1071,52 @@ def __eq__(self, other): return False -class SubscribeToComponentUpdatesRequest(rpc.Shape): +class QOS: """ - SubscribeToComponentUpdatesRequest + QOS enum """ - def __init__(self): + 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#SubscribeToComponentUpdatesRequest' + return 'aws.greengrass#InvalidArtifactsDirectoryPathError' def __repr__(self): attrs = [] @@ -1580,26 +1131,43 @@ def __eq__(self, other): return False -class UpdateStateResponse(rpc.Shape): +class InvalidRecipeDirectoryPathError(GreengrassCoreIPCError): """ - UpdateStateResponse + InvalidRecipeDirectoryPathError + + 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#InvalidRecipeDirectoryPathError' def __repr__(self): attrs = [] @@ -1614,40 +1182,40 @@ def __eq__(self, other): return False -class UpdateStateRequest(rpc.Shape): +class CreateLocalDeploymentResponse(rpc.Shape): """ - UpdateStateRequest + CreateLocalDeploymentResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - state: ReportedLifecycleState enum value + deployment_id: Attributes: - state: ReportedLifecycleState enum value + deployment_id: """ def __init__(self, *, - state: typing.Optional[str] = None): + deployment_id: typing.Optional[str] = None): super().__init__() - self.state = state # type: typing.Optional[str] + self.deployment_id = deployment_id # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.state is not None: - payload['state'] = self.state + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'state' in payload: - new.state = payload['state'] + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateStateRequest' + return 'aws.greengrass#CreateLocalDeploymentResponse' def __repr__(self): attrs = [] @@ -1662,64 +1230,88 @@ def __eq__(self, other): return False -class GetSecretValueResponse(rpc.Shape): +class CreateLocalDeploymentRequest(rpc.Shape): """ - GetSecretValueResponse + CreateLocalDeploymentRequest 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: + 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: - secret_id: - version_id: - version_stage: - secret_value: + 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, *, - 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): + 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.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.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.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.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 '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 '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#GetSecretValueResponse' + return 'aws.greengrass#CreateLocalDeploymentRequest' def __repr__(self): attrs = [] @@ -1734,56 +1326,48 @@ def __eq__(self, other): return False -class GetSecretValueRequest(rpc.Shape): +class StopComponentResponse(rpc.Shape): """ - GetSecretValueRequest + StopComponentResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - secret_id: - version_id: - version_stage: + stop_status: RequestStatus enum value + message: Attributes: - secret_id: - version_id: - version_stage: + stop_status: RequestStatus enum value + message: """ def __init__(self, *, - secret_id: typing.Optional[str] = None, - version_id: typing.Optional[str] = None, - version_stage: typing.Optional[str] = None): + stop_status: typing.Optional[str] = None, + message: typing.Optional[str] = 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[str] + self.stop_status = stop_status # type: typing.Optional[str] + self.message = message # 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 + 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 '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 '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#GetSecretValueRequest' + return 'aws.greengrass#StopComponentResponse' def __repr__(self): attrs = [] @@ -1798,40 +1382,40 @@ def __eq__(self, other): return False -class GetLocalDeploymentStatusResponse(rpc.Shape): +class StopComponentRequest(rpc.Shape): """ - GetLocalDeploymentStatusResponse + StopComponentRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - deployment: + component_name: Attributes: - deployment: + component_name: """ def __init__(self, *, - deployment: typing.Optional[LocalDeployment] = None): + component_name: typing.Optional[str] = None): super().__init__() - self.deployment = deployment # type: typing.Optional[LocalDeployment] + self.component_name = component_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.deployment is not None: - payload['deployment'] = self.deployment._to_payload() + if self.component_name is not None: + payload['componentName'] = self.component_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'deployment' in payload: - new.deployment = LocalDeployment._from_payload(payload['deployment']) + if 'componentName' in payload: + new.component_name = payload['componentName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetLocalDeploymentStatusResponse' + return 'aws.greengrass#StopComponentRequest' def __repr__(self): attrs = [] @@ -1846,40 +1430,40 @@ def __eq__(self, other): return False -class GetLocalDeploymentStatusRequest(rpc.Shape): +class ListLocalDeploymentsResponse(rpc.Shape): """ - GetLocalDeploymentStatusRequest + ListLocalDeploymentsResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - deployment_id: + local_deployments: Attributes: - deployment_id: + local_deployments: """ def __init__(self, *, - deployment_id: typing.Optional[str] = None): + local_deployments: typing.Optional[typing.List[LocalDeployment]] = None): super().__init__() - self.deployment_id = deployment_id # type: typing.Optional[str] + self.local_deployments = local_deployments # type: typing.Optional[typing.List[LocalDeployment]] def _to_payload(self): payload = {} - if self.deployment_id is not None: - payload['deploymentId'] = self.deployment_id + 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 'deploymentId' in payload: - new.deployment_id = payload['deploymentId'] + 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#GetLocalDeploymentStatusRequest' + return 'aws.greengrass#ListLocalDeploymentsResponse' def __repr__(self): attrs = [] @@ -1894,43 +1478,26 @@ def __eq__(self, other): return False -class ComponentNotFoundError(GreengrassCoreIPCError): +class ListLocalDeploymentsRequest(rpc.Shape): """ - ComponentNotFoundError - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - message: - - Attributes: - message: + ListLocalDeploymentsRequest """ - 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#ComponentNotFoundError' + return 'aws.greengrass#ListLocalDeploymentsRequest' def __repr__(self): attrs = [] @@ -1945,48 +1512,26 @@ def __eq__(self, other): return False -class RestartComponentResponse(rpc.Shape): +class SubscribeToComponentUpdatesResponse(rpc.Shape): """ - 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: + SubscribeToComponentUpdatesResponse """ - def __init__(self, *, - restart_status: typing.Optional[str] = None, - message: typing.Optional[str] = None): + def __init__(self): 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#RestartComponentResponse' + return 'aws.greengrass#SubscribeToComponentUpdatesResponse' def __repr__(self): attrs = [] @@ -2001,40 +1546,26 @@ def __eq__(self, other): return False -class RestartComponentRequest(rpc.Shape): +class SubscribeToComponentUpdatesRequest(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: + SubscribeToComponentUpdatesRequest """ - 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#SubscribeToComponentUpdatesRequest' def __repr__(self): attrs = [] @@ -2049,43 +1580,40 @@ def __eq__(self, other): return False -class InvalidTokenError(GreengrassCoreIPCError): +class GetComponentDetailsResponse(rpc.Shape): """ - InvalidTokenError + GetComponentDetailsResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + component_details: Attributes: - message: + component_details: """ def __init__(self, *, - message: typing.Optional[str] = None): + component_details: typing.Optional[ComponentDetails] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'server' + self.component_details = component_details # type: typing.Optional[ComponentDetails] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + 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 'message' in payload: - new.message = payload['message'] + if 'componentDetails' in payload: + new.component_details = ComponentDetails._from_payload(payload['componentDetails']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#InvalidTokenError' + return 'aws.greengrass#GetComponentDetailsResponse' def __repr__(self): attrs = [] @@ -2100,40 +1628,40 @@ def __eq__(self, other): return False -class ValidateAuthorizationTokenResponse(rpc.Shape): +class GetComponentDetailsRequest(rpc.Shape): """ - ValidateAuthorizationTokenResponse + GetComponentDetailsRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - is_valid: + component_name: Attributes: - is_valid: + component_name: """ def __init__(self, *, - is_valid: typing.Optional[bool] = None): + component_name: typing.Optional[str] = None): super().__init__() - self.is_valid = is_valid # type: typing.Optional[bool] + self.component_name = component_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.is_valid is not None: - payload['isValid'] = self.is_valid + if self.component_name is not None: + payload['componentName'] = self.component_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'isValid' in payload: - new.is_valid = payload['isValid'] + if 'componentName' in payload: + new.component_name = payload['componentName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateAuthorizationTokenResponse' + return 'aws.greengrass#GetComponentDetailsRequest' def __repr__(self): attrs = [] @@ -2148,40 +1676,40 @@ def __eq__(self, other): return False -class ValidateAuthorizationTokenRequest(rpc.Shape): +class SubscribeToTopicResponse(rpc.Shape): """ - ValidateAuthorizationTokenRequest + SubscribeToTopicResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - token: + topic_name: Attributes: - token: + topic_name: """ def __init__(self, *, - token: typing.Optional[str] = None): + topic_name: typing.Optional[str] = None): super().__init__() - self.token = token # type: typing.Optional[str] + self.topic_name = topic_name # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.token is not None: - payload['token'] = self.token + if self.topic_name is not None: + payload['topicName'] = self.topic_name return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'token' in payload: - new.token = payload['token'] + if 'topicName' in payload: + new.topic_name = payload['topicName'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateAuthorizationTokenRequest' + return 'aws.greengrass#SubscribeToTopicResponse' def __repr__(self): attrs = [] @@ -2196,43 +1724,40 @@ def __eq__(self, other): return False -class FailedUpdateConditionCheckError(GreengrassCoreIPCError): +class SubscribeToTopicRequest(rpc.Shape): """ - FailedUpdateConditionCheckError + SubscribeToTopicRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + topic: Attributes: - message: + topic: """ def __init__(self, *, - message: typing.Optional[str] = None): + topic: typing.Optional[str] = None): super().__init__() - self.message = message # type: typing.Optional[str] - - def _get_error_type_string(self): - return 'client' + self.topic = topic # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.message is not None: - payload['message'] = self.message + if self.topic is not None: + payload['topic'] = self.topic return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'message' in payload: - new.message = payload['message'] + if 'topic' in payload: + new.topic = payload['topic'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#FailedUpdateConditionCheckError' + return 'aws.greengrass#SubscribeToTopicRequest' def __repr__(self): attrs = [] @@ -2247,26 +1772,48 @@ def __eq__(self, other): return False -class UpdateConfigurationResponse(rpc.Shape): +class GetConfigurationResponse(rpc.Shape): """ - UpdateConfigurationResponse + 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: """ - def __init__(self): + def __init__(self, *, + component_name: typing.Optional[str] = None, + value: typing.Optional[typing.Dict[str, typing.Any]] = None): 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#UpdateConfigurationResponse' + return 'aws.greengrass#GetConfigurationResponse' def __repr__(self): attrs = [] @@ -2281,56 +1828,48 @@ def __eq__(self, other): return False -class UpdateConfigurationRequest(rpc.Shape): +class GetConfigurationRequest(rpc.Shape): """ - UpdateConfigurationRequest + GetConfigurationRequest 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, *, - 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, + 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]] - 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#UpdateConfigurationRequest' + return 'aws.greengrass#GetConfigurationRequest' def __repr__(self): attrs = [] @@ -2345,43 +1884,26 @@ def __eq__(self, other): return False -class ConflictError(GreengrassCoreIPCError): +class UpdateStateResponse(rpc.Shape): """ - ConflictError - - 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#ConflictError' + return 'aws.greengrass#UpdateStateResponse' def __repr__(self): attrs = [] @@ -2396,40 +1918,40 @@ def __eq__(self, other): return False -class UpdateThingShadowResponse(rpc.Shape): +class UpdateStateRequest(rpc.Shape): """ - UpdateThingShadowResponse + UpdateStateRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - payload: + state: ReportedLifecycleState enum value Attributes: - payload: + state: ReportedLifecycleState enum value """ def __init__(self, *, - payload: typing.Optional[bytes] = None): + state: typing.Optional[str] = None): super().__init__() - self.payload = payload # type: typing.Optional[bytes] + self.state = state # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.payload is not None: - payload['payload'] = base64.b64encode(self.payload).decode() + if self.state is not None: + payload['state'] = self.state return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'payload' in payload: - new.payload = base64.b64decode(payload['payload']) + if 'state' in payload: + new.state = payload['state'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateThingShadowResponse' + return 'aws.greengrass#UpdateStateRequest' def __repr__(self): attrs = [] @@ -2444,56 +1966,64 @@ def __eq__(self, other): return False -class UpdateThingShadowRequest(rpc.Shape): +class GetSecretValueResponse(rpc.Shape): """ - UpdateThingShadowRequest + GetSecretValueResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - thing_name: - shadow_name: - payload: + secret_id: + version_id: + version_stage: + secret_value: Attributes: - thing_name: - shadow_name: - payload: + secret_id: + version_id: + version_stage: + secret_value: """ def __init__(self, *, - thing_name: typing.Optional[str] = None, - shadow_name: typing.Optional[str] = None, - payload: typing.Optional[bytes] = 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.thing_name = thing_name # type: typing.Optional[str] - self.shadow_name = shadow_name # type: typing.Optional[str] - self.payload = payload # type: typing.Optional[bytes] + 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.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() + 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 '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']) + 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#UpdateThingShadowRequest' + return 'aws.greengrass#GetSecretValueResponse' def __repr__(self): attrs = [] @@ -2508,26 +2038,56 @@ def __eq__(self, other): return False -class SendConfigurationValidityReportResponse(rpc.Shape): +class GetSecretValueRequest(rpc.Shape): """ - SendConfigurationValidityReportResponse + 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: """ - def __init__(self): + def __init__(self, *, + secret_id: typing.Optional[str] = None, + version_id: typing.Optional[str] = None, + version_stage: typing.Optional[str] = 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[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#SendConfigurationValidityReportResponse' + return 'aws.greengrass#GetSecretValueRequest' def __repr__(self): attrs = [] @@ -2542,40 +2102,40 @@ def __eq__(self, other): return False -class SendConfigurationValidityReportRequest(rpc.Shape): +class GetLocalDeploymentStatusResponse(rpc.Shape): """ - SendConfigurationValidityReportRequest + GetLocalDeploymentStatusResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - configuration_validity_report: + deployment: Attributes: - configuration_validity_report: + deployment: """ def __init__(self, *, - configuration_validity_report: typing.Optional[ConfigurationValidityReport] = None): + deployment: typing.Optional[LocalDeployment] = None): super().__init__() - self.configuration_validity_report = configuration_validity_report # type: typing.Optional[ConfigurationValidityReport] + self.deployment = deployment # type: typing.Optional[LocalDeployment] def _to_payload(self): payload = {} - if self.configuration_validity_report is not None: - payload['configurationValidityReport'] = self.configuration_validity_report._to_payload() + if self.deployment is not None: + payload['deployment'] = self.deployment._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']) + if 'deployment' in payload: + new.deployment = LocalDeployment._from_payload(payload['deployment']) return new @classmethod def _model_name(cls): - return 'aws.greengrass#SendConfigurationValidityReportRequest' + return 'aws.greengrass#GetLocalDeploymentStatusResponse' def __repr__(self): attrs = [] @@ -2590,40 +2150,40 @@ def __eq__(self, other): return False -class GetThingShadowResponse(rpc.Shape): +class GetLocalDeploymentStatusRequest(rpc.Shape): """ - GetThingShadowResponse + GetLocalDeploymentStatusRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - payload: + deployment_id: Attributes: - payload: + deployment_id: """ def __init__(self, *, - payload: typing.Optional[bytes] = None): + deployment_id: typing.Optional[str] = None): super().__init__() - self.payload = payload # type: typing.Optional[bytes] + self.deployment_id = deployment_id # type: typing.Optional[str] def _to_payload(self): payload = {} - if self.payload is not None: - payload['payload'] = base64.b64encode(self.payload).decode() + if self.deployment_id is not None: + payload['deploymentId'] = self.deployment_id return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'payload' in payload: - new.payload = base64.b64decode(payload['payload']) + if 'deploymentId' in payload: + new.deployment_id = payload['deploymentId'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetThingShadowResponse' + return 'aws.greengrass#GetLocalDeploymentStatusRequest' def __repr__(self): attrs = [] @@ -2638,48 +2198,43 @@ def __eq__(self, other): return False -class GetThingShadowRequest(rpc.Shape): +class ComponentNotFoundError(GreengrassCoreIPCError): """ - GetThingShadowRequest + ComponentNotFoundError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - thing_name: - shadow_name: + message: Attributes: - thing_name: - shadow_name: + message: """ def __init__(self, *, - thing_name: typing.Optional[str] = None, - shadow_name: typing.Optional[str] = None): + message: typing.Optional[str] = None): super().__init__() - self.thing_name = thing_name # type: typing.Optional[str] - self.shadow_name = shadow_name # 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.thing_name is not None: - payload['thingName'] = self.thing_name - if self.shadow_name is not None: - payload['shadowName'] = self.shadow_name + if self.message is not None: + payload['message'] = self.message 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'] + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetThingShadowRequest' + return 'aws.greengrass#ComponentNotFoundError' def __repr__(self): attrs = [] @@ -2694,64 +2249,48 @@ def __eq__(self, other): return False -class CreateDebugPasswordResponse(rpc.Shape): +class RestartComponentResponse(rpc.Shape): """ - CreateDebugPasswordResponse + RestartComponentResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - password: - username: - password_expiration: - certificate_signature: + restart_status: RequestStatus enum value + message: Attributes: - password: - username: - password_expiration: - certificate_signature: + restart_status: RequestStatus enum value + message: """ def __init__(self, *, - password: typing.Optional[str] = None, - username: typing.Optional[str] = None, - password_expiration: typing.Optional[datetime.datetime] = None, - certificate_signature: typing.Optional[str] = None): + restart_status: 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_signature = certificate_signature # type: typing.Optional[str] + self.restart_status = restart_status # type: typing.Optional[str] + self.message = message # 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_signature is not None: - payload['certificateSignature'] = self.certificate_signature + 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 '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 'certificateSignature' in payload: - new.certificate_signature = payload['certificateSignature'] + 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#CreateDebugPasswordResponse' + return 'aws.greengrass#RestartComponentResponse' def __repr__(self): attrs = [] @@ -2766,26 +2305,40 @@ def __eq__(self, other): return False -class CreateDebugPasswordRequest(rpc.Shape): +class RestartComponentRequest(rpc.Shape): """ - CreateDebugPasswordRequest + 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#CreateDebugPasswordRequest' + return 'aws.greengrass#RestartComponentRequest' def __repr__(self): attrs = [] @@ -2800,40 +2353,43 @@ def __eq__(self, other): return False -class ListComponentsResponse(rpc.Shape): +class InvalidTokenError(GreengrassCoreIPCError): """ - ListComponentsResponse + InvalidTokenError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - components: + message: Attributes: - components: + message: """ def __init__(self, *, - components: typing.Optional[typing.List[ComponentDetails]] = None): + message: typing.Optional[str] = None): super().__init__() - self.components = components # type: typing.Optional[typing.List[ComponentDetails]] + self.message = message # type: typing.Optional[str] + + def _get_error_type_string(self): + return 'server' def _to_payload(self): payload = {} - if self.components is not None: - payload['components'] = [i._to_payload() for i in self.components] + if self.message is not None: + payload['message'] = self.message 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 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#ListComponentsResponse' + return 'aws.greengrass#InvalidTokenError' def __repr__(self): attrs = [] @@ -2848,26 +2404,40 @@ def __eq__(self, other): return False -class ListComponentsRequest(rpc.Shape): +class ValidateAuthorizationTokenResponse(rpc.Shape): """ - ListComponentsRequest + ValidateAuthorizationTokenResponse + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + is_valid: + + Attributes: + is_valid: """ - def __init__(self): + def __init__(self, *, + is_valid: typing.Optional[bool] = None): 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#ListComponentsRequest' + return 'aws.greengrass#ValidateAuthorizationTokenResponse' def __repr__(self): attrs = [] @@ -2882,26 +2452,40 @@ def __eq__(self, other): return False -class PublishToTopicResponse(rpc.Shape): +class ValidateAuthorizationTokenRequest(rpc.Shape): """ - PublishToTopicResponse + ValidateAuthorizationTokenRequest + + All attributes are None by default, and may be set by keyword in the constructor. + + Keyword Args: + token: + + Attributes: + token: """ - def __init__(self): + def __init__(self, *, + token: typing.Optional[str] = None): 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#PublishToTopicResponse' + return 'aws.greengrass#ValidateAuthorizationTokenRequest' def __repr__(self): attrs = [] @@ -2916,48 +2500,26 @@ def __eq__(self, other): return False -class PublishToTopicRequest(rpc.Shape): +class SubscribeToValidateConfigurationUpdatesResponse(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: + SubscribeToValidateConfigurationUpdatesResponse """ - def __init__(self, *, - topic: typing.Optional[str] = None, - publish_message: typing.Optional[PublishMessage] = None): + def __init__(self): 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#PublishToTopicRequest' + return 'aws.greengrass#SubscribeToValidateConfigurationUpdatesResponse' def __repr__(self): attrs = [] @@ -2972,40 +2534,26 @@ def __eq__(self, other): return False -class GetComponentDetailsResponse(rpc.Shape): +class SubscribeToValidateConfigurationUpdatesRequest(rpc.Shape): """ - GetComponentDetailsResponse - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - component_details: - - Attributes: - component_details: + SubscribeToValidateConfigurationUpdatesRequest """ - def __init__(self, *, - component_details: typing.Optional[ComponentDetails] = None): + def __init__(self): 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#GetComponentDetailsResponse' + return 'aws.greengrass#SubscribeToValidateConfigurationUpdatesRequest' def __repr__(self): attrs = [] @@ -3020,40 +2568,43 @@ def __eq__(self, other): return False -class GetComponentDetailsRequest(rpc.Shape): +class FailedUpdateConditionCheckError(GreengrassCoreIPCError): """ - GetComponentDetailsRequest + FailedUpdateConditionCheckError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_name: + message: Attributes: - component_name: + message: """ def __init__(self, *, - component_name: typing.Optional[str] = None): + message: typing.Optional[str] = None): super().__init__() - self.component_name = component_name # 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.component_name is not None: - payload['componentName'] = self.component_name + 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 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#GetComponentDetailsRequest' + return 'aws.greengrass#FailedUpdateConditionCheckError' def __repr__(self): attrs = [] @@ -3068,40 +2619,43 @@ def __eq__(self, other): return False -class SubscribeToTopicResponse(rpc.Shape): +class ConflictError(GreengrassCoreIPCError): """ - SubscribeToTopicResponse + ConflictError All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - topic_name: + message: Attributes: - topic_name: + message: """ def __init__(self, *, - topic_name: typing.Optional[str] = None): + message: typing.Optional[str] = None): super().__init__() - self.topic_name = topic_name # 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_name is not None: - payload['topicName'] = self.topic_name + if self.message is not None: + payload['message'] = self.message return payload @classmethod def _from_payload(cls, payload): new = cls() - if 'topicName' in payload: - new.topic_name = payload['topicName'] + if 'message' in payload: + new.message = payload['message'] return new @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToTopicResponse' + return 'aws.greengrass#ConflictError' def __repr__(self): attrs = [] @@ -3116,40 +2670,26 @@ def __eq__(self, other): return False -class SubscribeToTopicRequest(rpc.Shape): +class UpdateConfigurationResponse(rpc.Shape): """ - SubscribeToTopicRequest - - All attributes are None by default, and may be set by keyword in the constructor. - - Keyword Args: - topic: - - Attributes: - topic: + UpdateConfigurationResponse """ - def __init__(self, *, - topic: typing.Optional[str] = None): + def __init__(self): 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#SubscribeToTopicRequest' + return 'aws.greengrass#UpdateConfigurationResponse' def __repr__(self): attrs = [] @@ -3164,48 +2704,56 @@ def __eq__(self, other): return False -class GetConfigurationResponse(rpc.Shape): +class UpdateConfigurationRequest(rpc.Shape): """ - GetConfigurationResponse + UpdateConfigurationRequest All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - component_name: - value: + key_path: + timestamp: + value_to_merge: Attributes: - component_name: - value: + key_path: + timestamp: + value_to_merge: """ def __init__(self, *, - component_name: typing.Optional[str] = None, - value: typing.Optional[typing.Dict[str, typing.Any]] = 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.value = value # type: typing.Optional[typing.Dict[str, typing.Any]] + 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.value is not None: - payload['value'] = self.value + 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 'value' in payload: - new.value = payload['value'] + 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#GetConfigurationResponse' + return 'aws.greengrass#UpdateConfigurationRequest' def __repr__(self): attrs = [] @@ -3220,48 +2768,26 @@ def __eq__(self, other): return False -class GetConfigurationRequest(rpc.Shape): +class SendConfigurationValidityReportResponse(rpc.Shape): """ - 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: + SendConfigurationValidityReportResponse """ - def __init__(self, *, - component_name: typing.Optional[str] = None, - key_path: typing.Optional[typing.List[str]] = None): + def __init__(self): 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#GetConfigurationRequest' + return 'aws.greengrass#SendConfigurationValidityReportResponse' def __repr__(self): attrs = [] @@ -3276,26 +2802,40 @@ def __eq__(self, other): return False -class SubscribeToValidateConfigurationUpdatesResponse(rpc.Shape): +class SendConfigurationValidityReportRequest(rpc.Shape): """ - SubscribeToValidateConfigurationUpdatesResponse + 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: """ - def __init__(self): + def __init__(self, *, + configuration_validity_report: typing.Optional[ConfigurationValidityReport] = None): 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#SubscribeToValidateConfigurationUpdatesResponse' + return 'aws.greengrass#SendConfigurationValidityReportRequest' def __repr__(self): attrs = [] @@ -3310,26 +2850,43 @@ def __eq__(self, other): return False -class SubscribeToValidateConfigurationUpdatesRequest(rpc.Shape): +class InvalidArgumentsError(GreengrassCoreIPCError): """ - SubscribeToValidateConfigurationUpdatesRequest + InvalidArgumentsError + + 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#SubscribeToValidateConfigurationUpdatesRequest' + return 'aws.greengrass#InvalidArgumentsError' def __repr__(self): attrs = [] @@ -3442,43 +2999,90 @@ def __eq__(self, other): return False -class InvalidArgumentsError(GreengrassCoreIPCError): +class CreateDebugPasswordResponse(rpc.Shape): """ - InvalidArgumentsError + CreateDebugPasswordResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - message: + password: + username: + password_expiration: Attributes: - message: + password: + username: + password_expiration: """ def __init__(self, *, - message: typing.Optional[str] = None): + password: typing.Optional[str] = None, + username: typing.Optional[str] = None, + password_expiration: typing.Optional[datetime.datetime] = None): super().__init__() - 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] - def _get_error_type_string(self): - return 'client' + 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() + 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) + 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 + """ + + def __init__(self): + super().__init__() 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#CreateDebugPasswordRequest' def __repr__(self): attrs = [] @@ -3493,40 +3097,40 @@ def __eq__(self, other): return False -class DeleteThingShadowResponse(rpc.Shape): +class ListComponentsResponse(rpc.Shape): """ - DeleteThingShadowResponse + ListComponentsResponse All attributes are None by default, and may be set by keyword in the constructor. Keyword Args: - payload: + components: Attributes: - payload: + components: """ def __init__(self, *, - payload: typing.Optional[bytes] = None): + components: typing.Optional[typing.List[ComponentDetails]] = None): super().__init__() - self.payload = payload # type: typing.Optional[bytes] + self.components = components # type: typing.Optional[typing.List[ComponentDetails]] def _to_payload(self): payload = {} - if self.payload is not None: - payload['payload'] = base64.b64encode(self.payload).decode() + 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 'payload' in payload: - new.payload = base64.b64decode(payload['payload']) + 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#DeleteThingShadowResponse' + return 'aws.greengrass#ListComponentsResponse' def __repr__(self): attrs = [] @@ -3541,48 +3145,26 @@ def __eq__(self, other): return False -class DeleteThingShadowRequest(rpc.Shape): +class ListComponentsRequest(rpc.Shape): """ - 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: + ListComponentsRequest """ - def __init__(self, *, - thing_name: typing.Optional[str] = None, - shadow_name: typing.Optional[str] = None): + def __init__(self): 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#DeleteThingShadowRequest' + return 'aws.greengrass#ListComponentsRequest' def __repr__(self): attrs = [] @@ -3816,28 +3398,118 @@ def __init__(self, *, def _to_payload(self): payload = {} - if self.topic_name is not None: - payload['topicName'] = self.topic_name - if self.qos is not None: - payload['qos'] = self.qos - if self.payload is not None: - payload['payload'] = base64.b64encode(self.payload).decode() + if self.topic_name is not None: + payload['topicName'] = self.topic_name + if self.qos is not None: + payload['qos'] = self.qos + if self.payload is not None: + payload['payload'] = base64.b64encode(self.payload).decode() + return payload + + @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 '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']) + 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#PublishToIoTCoreRequest' + return 'aws.greengrass#PublishToTopicRequest' def __repr__(self): attrs = [] @@ -4048,14 +3720,14 @@ def __eq__(self, other): RunWithInfo, PostComponentUpdateEvent, PreComponentUpdateEvent, - BinaryMessage, - JsonMessage, ValidateConfigurationUpdateEvent, ConfigurationUpdateEvent, + BinaryMessage, + JsonMessage, MQTTMessage, + ComponentDetails, LocalDeployment, ConfigurationValidityReport, - ComponentDetails, InvalidArtifactsDirectoryPathError, InvalidRecipeDirectoryPathError, CreateLocalDeploymentResponse, @@ -4066,6 +3738,12 @@ def __eq__(self, other): ListLocalDeploymentsRequest, SubscribeToComponentUpdatesResponse, SubscribeToComponentUpdatesRequest, + GetComponentDetailsResponse, + GetComponentDetailsRequest, + SubscribeToTopicResponse, + SubscribeToTopicRequest, + GetConfigurationResponse, + GetConfigurationRequest, UpdateStateResponse, UpdateStateRequest, GetSecretValueResponse, @@ -4078,40 +3756,28 @@ def __eq__(self, other): InvalidTokenError, ValidateAuthorizationTokenResponse, ValidateAuthorizationTokenRequest, + SubscribeToValidateConfigurationUpdatesResponse, + SubscribeToValidateConfigurationUpdatesRequest, FailedUpdateConditionCheckError, + ConflictError, UpdateConfigurationResponse, UpdateConfigurationRequest, - ConflictError, - UpdateThingShadowResponse, - UpdateThingShadowRequest, SendConfigurationValidityReportResponse, SendConfigurationValidityReportRequest, - GetThingShadowResponse, - GetThingShadowRequest, + InvalidArgumentsError, + DeferComponentUpdateResponse, + DeferComponentUpdateRequest, 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, @@ -4141,58 +3807,14 @@ def _response_stream_type(cls): return IoTCoreMessage -class _PublishToIoTCoreOperation(rpc.ClientOperation): - @classmethod - def _model_name(cls): - return 'aws.greengrass#PublishToIoTCore' - - @classmethod - def _request_type(cls): - return PublishToIoTCoreRequest - - @classmethod - def _request_stream_type(cls): - return None - - @classmethod - def _response_type(cls): - return PublishToIoTCoreResponse - - @classmethod - def _response_stream_type(cls): - return None - - -class _SubscribeToConfigurationUpdateOperation(rpc.ClientOperation): - @classmethod - def _model_name(cls): - return 'aws.greengrass#SubscribeToConfigurationUpdate' - - @classmethod - def _request_type(cls): - return SubscribeToConfigurationUpdateRequest - - @classmethod - def _request_stream_type(cls): - return None - - @classmethod - def _response_type(cls): - return SubscribeToConfigurationUpdateResponse - - @classmethod - def _response_stream_type(cls): - return ConfigurationUpdateEvents - - -class _DeleteThingShadowOperation(rpc.ClientOperation): +class _PublishToTopicOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#DeleteThingShadow' + return 'aws.greengrass#PublishToTopic' @classmethod def _request_type(cls): - return DeleteThingShadowRequest + return PublishToTopicRequest @classmethod def _request_stream_type(cls): @@ -4200,21 +3822,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return DeleteThingShadowResponse + return PublishToTopicResponse @classmethod def _response_stream_type(cls): return None -class _DeferComponentUpdateOperation(rpc.ClientOperation): +class _PublishToIoTCoreOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#DeferComponentUpdate' + return 'aws.greengrass#PublishToIoTCore' @classmethod def _request_type(cls): - return DeferComponentUpdateRequest + return PublishToIoTCoreRequest @classmethod def _request_stream_type(cls): @@ -4222,21 +3844,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return DeferComponentUpdateResponse + return PublishToIoTCoreResponse @classmethod def _response_stream_type(cls): return None -class _SubscribeToValidateConfigurationUpdatesOperation(rpc.ClientOperation): +class _SubscribeToConfigurationUpdateOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#SubscribeToValidateConfigurationUpdates' + return 'aws.greengrass#SubscribeToConfigurationUpdate' @classmethod def _request_type(cls): - return SubscribeToValidateConfigurationUpdatesRequest + return SubscribeToConfigurationUpdateRequest @classmethod def _request_stream_type(cls): @@ -4244,21 +3866,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return SubscribeToValidateConfigurationUpdatesResponse + return SubscribeToConfigurationUpdateResponse @classmethod def _response_stream_type(cls): - return ValidateConfigurationUpdateEvents + return ConfigurationUpdateEvents -class _GetConfigurationOperation(rpc.ClientOperation): +class _ListComponentsOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetConfiguration' + return 'aws.greengrass#ListComponents' @classmethod def _request_type(cls): - return GetConfigurationRequest + return ListComponentsRequest @classmethod def _request_stream_type(cls): @@ -4266,43 +3888,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetConfigurationResponse + return ListComponentsResponse @classmethod def _response_stream_type(cls): return None -class _SubscribeToTopicOperation(rpc.ClientOperation): - @classmethod - def _model_name(cls): - return 'aws.greengrass#SubscribeToTopic' - - @classmethod - def _request_type(cls): - return SubscribeToTopicRequest - - @classmethod - def _request_stream_type(cls): - return None - - @classmethod - def _response_type(cls): - return SubscribeToTopicResponse - - @classmethod - def _response_stream_type(cls): - return SubscriptionResponseMessage - - -class _GetComponentDetailsOperation(rpc.ClientOperation): +class _CreateDebugPasswordOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetComponentDetails' + return 'aws.greengrass#CreateDebugPassword' @classmethod def _request_type(cls): - return GetComponentDetailsRequest + return CreateDebugPasswordRequest @classmethod def _request_stream_type(cls): @@ -4310,21 +3910,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetComponentDetailsResponse + return CreateDebugPasswordResponse @classmethod def _response_stream_type(cls): return None -class _PublishToTopicOperation(rpc.ClientOperation): +class _DeferComponentUpdateOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#PublishToTopic' + return 'aws.greengrass#DeferComponentUpdate' @classmethod def _request_type(cls): - return PublishToTopicRequest + return DeferComponentUpdateRequest @classmethod def _request_stream_type(cls): @@ -4332,21 +3932,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return PublishToTopicResponse + return DeferComponentUpdateResponse @classmethod def _response_stream_type(cls): return None -class _ListComponentsOperation(rpc.ClientOperation): +class _SendConfigurationValidityReportOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#ListComponents' + return 'aws.greengrass#SendConfigurationValidityReport' @classmethod def _request_type(cls): - return ListComponentsRequest + return SendConfigurationValidityReportRequest @classmethod def _request_stream_type(cls): @@ -4354,21 +3954,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return ListComponentsResponse + return SendConfigurationValidityReportResponse @classmethod def _response_stream_type(cls): return None -class _CreateDebugPasswordOperation(rpc.ClientOperation): +class _UpdateConfigurationOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#CreateDebugPassword' + return 'aws.greengrass#UpdateConfiguration' @classmethod def _request_type(cls): - return CreateDebugPasswordRequest + return UpdateConfigurationRequest @classmethod def _request_stream_type(cls): @@ -4376,21 +3976,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return CreateDebugPasswordResponse + return UpdateConfigurationResponse @classmethod def _response_stream_type(cls): return None -class _GetThingShadowOperation(rpc.ClientOperation): +class _SubscribeToValidateConfigurationUpdatesOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetThingShadow' + return 'aws.greengrass#SubscribeToValidateConfigurationUpdates' @classmethod def _request_type(cls): - return GetThingShadowRequest + return SubscribeToValidateConfigurationUpdatesRequest @classmethod def _request_stream_type(cls): @@ -4398,21 +3998,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetThingShadowResponse + return SubscribeToValidateConfigurationUpdatesResponse @classmethod def _response_stream_type(cls): - return None + return ValidateConfigurationUpdateEvents -class _SendConfigurationValidityReportOperation(rpc.ClientOperation): +class _ValidateAuthorizationTokenOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#SendConfigurationValidityReport' + return 'aws.greengrass#ValidateAuthorizationToken' @classmethod def _request_type(cls): - return SendConfigurationValidityReportRequest + return ValidateAuthorizationTokenRequest @classmethod def _request_stream_type(cls): @@ -4420,21 +4020,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return SendConfigurationValidityReportResponse + return ValidateAuthorizationTokenResponse @classmethod def _response_stream_type(cls): return None -class _UpdateThingShadowOperation(rpc.ClientOperation): +class _RestartComponentOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateThingShadow' + return 'aws.greengrass#RestartComponent' @classmethod def _request_type(cls): - return UpdateThingShadowRequest + return RestartComponentRequest @classmethod def _request_stream_type(cls): @@ -4442,21 +4042,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return UpdateThingShadowResponse + return RestartComponentResponse @classmethod def _response_stream_type(cls): return None -class _UpdateConfigurationOperation(rpc.ClientOperation): +class _GetLocalDeploymentStatusOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateConfiguration' + return 'aws.greengrass#GetLocalDeploymentStatus' @classmethod def _request_type(cls): - return UpdateConfigurationRequest + return GetLocalDeploymentStatusRequest @classmethod def _request_stream_type(cls): @@ -4464,21 +4064,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return UpdateConfigurationResponse + return GetLocalDeploymentStatusResponse @classmethod def _response_stream_type(cls): return None -class _ValidateAuthorizationTokenOperation(rpc.ClientOperation): +class _GetSecretValueOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#ValidateAuthorizationToken' + return 'aws.greengrass#GetSecretValue' @classmethod def _request_type(cls): - return ValidateAuthorizationTokenRequest + return GetSecretValueRequest @classmethod def _request_stream_type(cls): @@ -4486,21 +4086,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return ValidateAuthorizationTokenResponse + return GetSecretValueResponse @classmethod def _response_stream_type(cls): return None -class _RestartComponentOperation(rpc.ClientOperation): +class _UpdateStateOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#RestartComponent' + return 'aws.greengrass#UpdateState' @classmethod def _request_type(cls): - return RestartComponentRequest + return UpdateStateRequest @classmethod def _request_stream_type(cls): @@ -4508,21 +4108,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return RestartComponentResponse + return UpdateStateResponse @classmethod def _response_stream_type(cls): return None -class _GetLocalDeploymentStatusOperation(rpc.ClientOperation): +class _GetConfigurationOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetLocalDeploymentStatus' + return 'aws.greengrass#GetConfiguration' @classmethod def _request_type(cls): - return GetLocalDeploymentStatusRequest + return GetConfigurationRequest @classmethod def _request_stream_type(cls): @@ -4530,21 +4130,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetLocalDeploymentStatusResponse + return GetConfigurationResponse @classmethod def _response_stream_type(cls): return None -class _GetSecretValueOperation(rpc.ClientOperation): +class _SubscribeToTopicOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#GetSecretValue' + return 'aws.greengrass#SubscribeToTopic' @classmethod def _request_type(cls): - return GetSecretValueRequest + return SubscribeToTopicRequest @classmethod def _request_stream_type(cls): @@ -4552,21 +4152,21 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return GetSecretValueResponse + return SubscribeToTopicResponse @classmethod def _response_stream_type(cls): - return None + return SubscriptionResponseMessage -class _UpdateStateOperation(rpc.ClientOperation): +class _GetComponentDetailsOperation(rpc.ClientOperation): @classmethod def _model_name(cls): - return 'aws.greengrass#UpdateState' + return 'aws.greengrass#GetComponentDetails' @classmethod def _request_type(cls): - return UpdateStateRequest + return GetComponentDetailsRequest @classmethod def _request_stream_type(cls): @@ -4574,7 +4174,7 @@ def _request_stream_type(cls): @classmethod def _response_type(cls): - return UpdateStateResponse + return GetComponentDetailsResponse @classmethod def _response_stream_type(cls):