diff --git a/eventstream_rpc/tests/include/awstest/EchoTestRpcClient.h b/eventstream_rpc/tests/include/awstest/EchoTestRpcClient.h index d1e54db99..e89f2c0ba 100644 --- a/eventstream_rpc/tests/include/awstest/EchoTestRpcClient.h +++ b/eventstream_rpc/tests/include/awstest/EchoTestRpcClient.h @@ -28,12 +28,10 @@ namespace Awstest Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** * Connect the client to the server - * @param lifecycleHandler An interface that is called upon when lifecycle - * events relating to the connection occur. - * @param connectionConfig The configuration parameters used for establishing - * the connection. - * @return An `RpcError` that can be used to check whether the connection was - * established. + * @param lifecycleHandler An interface that is called upon when lifecycle events relating to the connection + * occur. + * @param connectionConfig The configuration parameters used for establishing the connection. + * @return An `RpcError` that can be used to check whether the connection was established. */ std::future Connect( ConnectionLifecycleHandler &lifecycleHandler, diff --git a/eventstream_rpc/tests/include/awstest/EchoTestRpcModel.h b/eventstream_rpc/tests/include/awstest/EchoTestRpcModel.h index 45e15eb27..cdcd51f51 100644 --- a/eventstream_rpc/tests/include/awstest/EchoTestRpcModel.h +++ b/eventstream_rpc/tests/include/awstest/EchoTestRpcModel.h @@ -63,8 +63,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(Customer *) noexcept; - /* This needs to be defined so that `Customer` can be used as a key in maps. - */ + /* This needs to be defined so that `Customer` can be used as a key in maps. */ bool operator<(const Customer &) const noexcept; static const char *MODEL_NAME; @@ -159,8 +158,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(MessageData *) noexcept; - /* This needs to be defined so that `MessageData` can be used as a key in - * maps. */ + /* This needs to be defined so that `MessageData` can be used as a key in maps. */ bool operator<(const MessageData &) const noexcept; static const char *MODEL_NAME; @@ -223,8 +221,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(EchoStreamingMessage *) noexcept; - /* This needs to be defined so that `EchoStreamingMessage` can be used as a - * key in maps. */ + /* This needs to be defined so that `EchoStreamingMessage` can be used as a key in maps. */ bool operator<(const EchoStreamingMessage &) const noexcept; static const char *MODEL_NAME; @@ -254,8 +251,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetAllProductsResponse *) noexcept; - /* This needs to be defined so that `GetAllProductsResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetAllProductsResponse` can be used as a key in maps. */ bool operator<(const GetAllProductsResponse &) const noexcept; static const char *MODEL_NAME; @@ -277,8 +273,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetAllProductsRequest *) noexcept; - /* This needs to be defined so that `GetAllProductsRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetAllProductsRequest` can be used as a key in maps. */ bool operator<(const GetAllProductsRequest &) const noexcept; static const char *MODEL_NAME; @@ -301,8 +296,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetAllCustomersResponse *) noexcept; - /* This needs to be defined so that `GetAllCustomersResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetAllCustomersResponse` can be used as a key in maps. */ bool operator<(const GetAllCustomersResponse &) const noexcept; static const char *MODEL_NAME; @@ -324,8 +318,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetAllCustomersRequest *) noexcept; - /* This needs to be defined so that `GetAllCustomersRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetAllCustomersRequest` can be used as a key in maps. */ bool operator<(const GetAllCustomersRequest &) const noexcept; static const char *MODEL_NAME; @@ -348,8 +341,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(EchoMessageResponse *) noexcept; - /* This needs to be defined so that `EchoMessageResponse` can be used as a key - * in maps. */ + /* This needs to be defined so that `EchoMessageResponse` can be used as a key in maps. */ bool operator<(const EchoMessageResponse &) const noexcept; static const char *MODEL_NAME; @@ -373,8 +365,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(EchoMessageRequest *) noexcept; - /* This needs to be defined so that `EchoMessageRequest` can be used as a key - * in maps. */ + /* This needs to be defined so that `EchoMessageRequest` can be used as a key in maps. */ bool operator<(const EchoMessageRequest &) const noexcept; static const char *MODEL_NAME; @@ -396,8 +387,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(EchoStreamingResponse *) noexcept; - /* This needs to be defined so that `EchoStreamingResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `EchoStreamingResponse` can be used as a key in maps. */ bool operator<(const EchoStreamingResponse &) const noexcept; static const char *MODEL_NAME; @@ -418,8 +408,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(EchoStreamingRequest *) noexcept; - /* This needs to be defined so that `EchoStreamingRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `EchoStreamingRequest` can be used as a key in maps. */ bool operator<(const EchoStreamingRequest &) const noexcept; static const char *MODEL_NAME; @@ -444,8 +433,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ServiceError *) noexcept; - /* This needs to be defined so that `ServiceError` can be used as a key in - * maps. */ + /* This needs to be defined so that `ServiceError` can be used as a key in maps. */ bool operator<(const ServiceError &) const noexcept; static const char *MODEL_NAME; @@ -468,8 +456,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(CauseServiceErrorResponse *) noexcept; - /* This needs to be defined so that `CauseServiceErrorResponse` can be used as - * a key in maps. */ + /* This needs to be defined so that `CauseServiceErrorResponse` can be used as a key in maps. */ bool operator<(const CauseServiceErrorResponse &) const noexcept; static const char *MODEL_NAME; @@ -490,8 +477,7 @@ namespace Awstest Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(CauseServiceErrorRequest *) noexcept; - /* This needs to be defined so that `CauseServiceErrorRequest` can be used as - * a key in maps. */ + /* This needs to be defined so that `CauseServiceErrorRequest` can be used as a key in maps. */ bool operator<(const CauseServiceErrorRequest &) const noexcept; static const char *MODEL_NAME; @@ -549,10 +535,8 @@ namespace Awstest /** * Used to activate a stream for the `GetAllProductsOperation` * @param request The request used for the `GetAllProductsOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetAllProductsRequest &request, @@ -614,10 +598,8 @@ namespace Awstest /** * Used to activate a stream for the `CauseServiceErrorOperation` * @param request The request used for the `CauseServiceErrorOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const CauseServiceErrorRequest &request, @@ -637,10 +619,8 @@ namespace Awstest virtual void OnStreamEvent(EchoStreamingMessage *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -659,8 +639,7 @@ namespace Awstest } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -675,8 +654,7 @@ namespace Awstest */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -732,12 +710,9 @@ namespace Awstest Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** * Used to activate a stream for the `CauseStreamServiceToErrorOperation` - * @param request The request used for the - * `CauseStreamServiceToErrorOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param request The request used for the `CauseStreamServiceToErrorOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const EchoStreamingRequest &request, @@ -757,10 +732,8 @@ namespace Awstest virtual void OnStreamEvent(EchoStreamingMessage *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -769,8 +742,7 @@ namespace Awstest } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -785,8 +757,7 @@ namespace Awstest */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -841,10 +812,8 @@ namespace Awstest /** * Used to activate a stream for the `EchoStreamMessagesOperation` * @param request The request used for the `EchoStreamMessagesOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const EchoStreamingRequest &request, @@ -906,10 +875,8 @@ namespace Awstest /** * Used to activate a stream for the `EchoMessageOperation` * @param request The request used for the `EchoMessageOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const EchoMessageRequest &request, @@ -971,10 +938,8 @@ namespace Awstest /** * Used to activate a stream for the `GetAllCustomersOperation` * @param request The request used for the `GetAllCustomersOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetAllCustomersRequest &request, diff --git a/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcClient.h b/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcClient.h index f54165344..ab7f8abdf 100644 --- a/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcClient.h +++ b/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcClient.h @@ -30,12 +30,10 @@ namespace Aws Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** * Connect the client to the server - * @param lifecycleHandler An interface that is called upon when lifecycle - * events relating to the connection occur. - * @param connectionConfig The configuration parameters used for establishing - * the connection. - * @return An `RpcError` that can be used to check whether the connection was - * established. + * @param lifecycleHandler An interface that is called upon when lifecycle events relating to the connection + * occur. + * @param connectionConfig The configuration parameters used for establishing the connection. + * @return An `RpcError` that can be used to check whether the connection was established. */ std::future Connect( ConnectionLifecycleHandler &lifecycleHandler, @@ -67,8 +65,17 @@ namespace Aws std::shared_ptr NewGetComponentDetails() noexcept; + std::shared_ptr NewGetClientDeviceAuthToken() noexcept; + std::shared_ptr NewPublishToTopic() noexcept; + std::shared_ptr NewSubscribeToCertificateUpdates( + std::shared_ptr streamHandler) noexcept; + + std::shared_ptr NewVerifyClientDeviceIdentity() noexcept; + + std::shared_ptr NewAuthorizeClientDeviceAction() noexcept; + std::shared_ptr NewListComponents() noexcept; std::shared_ptr NewCreateDebugPassword() noexcept; diff --git a/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcModel.h b/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcModel.h index 380eaecfa..a60f5f8c8 100644 --- a/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcModel.h +++ b/greengrass_ipc/include/aws/greengrass/GreengrassCoreIpcModel.h @@ -21,6 +21,30 @@ namespace Aws { class GreengrassCoreIpcClient; class GreengrassCoreIpcServiceModel; + class MessageContext : public AbstractShapeBase + { + public: + MessageContext() noexcept {} + MessageContext(const MessageContext &) = default; + void SetTopic(const Aws::Crt::String &topic) noexcept { m_topic = topic; } + Aws::Crt::Optional GetTopic() noexcept { return m_topic; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(MessageContext &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(MessageContext *) noexcept; + /* This needs to be defined so that `MessageContext` can be used as a key in maps. */ + bool operator<(const MessageContext &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_topic; + }; + class SystemResourceLimits : public AbstractShapeBase { public: @@ -36,8 +60,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SystemResourceLimits *) noexcept; - /* This needs to be defined so that `SystemResourceLimits` can be used as a - * key in maps. */ + /* This needs to be defined so that `SystemResourceLimits` can be used as a key in maps. */ bool operator<(const SystemResourceLimits &) const noexcept; static const char *MODEL_NAME; @@ -67,8 +90,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ValidateConfigurationUpdateEvent *) noexcept; - /* This needs to be defined so that `ValidateConfigurationUpdateEvent` can be - * used as a key in maps. */ + /* This needs to be defined so that `ValidateConfigurationUpdateEvent` can be used as a key in maps. */ bool operator<(const ValidateConfigurationUpdateEvent &) const noexcept; static const char *MODEL_NAME; @@ -95,8 +117,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(MQTTMessage *) noexcept; - /* This needs to be defined so that `MQTTMessage` can be used as a key in - * maps. */ + /* This needs to be defined so that `MQTTMessage` can be used as a key in maps. */ bool operator<(const MQTTMessage &) const noexcept; static const char *MODEL_NAME; @@ -123,8 +144,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ConfigurationUpdateEvent *) noexcept; - /* This needs to be defined so that `ConfigurationUpdateEvent` can be used as - * a key in maps. */ + /* This needs to be defined so that `ConfigurationUpdateEvent` can be used as a key in maps. */ bool operator<(const ConfigurationUpdateEvent &) const noexcept; static const char *MODEL_NAME; @@ -149,8 +169,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PostComponentUpdateEvent *) noexcept; - /* This needs to be defined so that `PostComponentUpdateEvent` can be used as - * a key in maps. */ + /* This needs to be defined so that `PostComponentUpdateEvent` can be used as a key in maps. */ bool operator<(const PostComponentUpdateEvent &) const noexcept; static const char *MODEL_NAME; @@ -176,8 +195,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PreComponentUpdateEvent *) noexcept; - /* This needs to be defined so that `PreComponentUpdateEvent` can be used as a - * key in maps. */ + /* This needs to be defined so that `PreComponentUpdateEvent` can be used as a key in maps. */ bool operator<(const PreComponentUpdateEvent &) const noexcept; static const char *MODEL_NAME; @@ -189,6 +207,50 @@ namespace Aws Aws::Crt::Optional m_isGgcRestarting; }; + class CertificateUpdate : public AbstractShapeBase + { + public: + CertificateUpdate() noexcept {} + CertificateUpdate(const CertificateUpdate &) = default; + void SetPrivateKey(const Aws::Crt::String &privateKey) noexcept { m_privateKey = privateKey; } + Aws::Crt::Optional GetPrivateKey() noexcept { return m_privateKey; } + void SetPublicKey(const Aws::Crt::String &publicKey) noexcept { m_publicKey = publicKey; } + Aws::Crt::Optional GetPublicKey() noexcept { return m_publicKey; } + void SetCertificate(const Aws::Crt::String &certificate) noexcept { m_certificate = certificate; } + Aws::Crt::Optional GetCertificate() noexcept { return m_certificate; } + void SetCaCertificates(const Aws::Crt::Vector &caCertificates) noexcept + { + m_caCertificates = caCertificates; + } + Aws::Crt::Optional> GetCaCertificates() noexcept + { + return m_caCertificates; + } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(CertificateUpdate &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(CertificateUpdate *) noexcept; + /* This needs to be defined so that `CertificateUpdate` can be used as a key in maps. */ + bool operator<(const CertificateUpdate &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_privateKey; + Aws::Crt::Optional m_publicKey; + Aws::Crt::Optional m_certificate; + Aws::Crt::Optional> m_caCertificates; + }; + + enum CertificateType + { + CERTIFICATE_TYPE_SERVER + }; + enum ConfigurationValidityStatus { CONFIGURATION_VALIDITY_STATUS_ACCEPTED, @@ -202,14 +264,17 @@ namespace Aws BinaryMessage(const BinaryMessage &) = default; void SetMessage(const Aws::Crt::Vector &message) noexcept { m_message = message; } Aws::Crt::Optional> GetMessage() noexcept { return m_message; } + /* The context is ignored if used in PublishMessage. */ + void SetContext(const MessageContext &context) noexcept { m_context = context; } + /* The context is ignored if used in PublishMessage. */ + Aws::Crt::Optional GetContext() noexcept { return m_context; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; static void s_loadFromJsonView(BinaryMessage &, const Aws::Crt::JsonView &) noexcept; static Aws::Crt::ScopedResource s_allocateFromPayload( Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(BinaryMessage *) noexcept; - /* This needs to be defined so that `BinaryMessage` can be used as a key in - * maps. */ + /* This needs to be defined so that `BinaryMessage` can be used as a key in maps. */ bool operator<(const BinaryMessage &) const noexcept; static const char *MODEL_NAME; @@ -218,6 +283,7 @@ namespace Aws private: Aws::Crt::Optional> m_message; + Aws::Crt::Optional m_context; }; class JsonMessage : public AbstractShapeBase @@ -227,14 +293,17 @@ namespace Aws JsonMessage(const JsonMessage &) = default; void SetMessage(const Aws::Crt::JsonObject &message) noexcept { m_message = message; } Aws::Crt::Optional GetMessage() noexcept { return m_message; } + /* The context is ignored if used in PublishMessage. */ + void SetContext(const MessageContext &context) noexcept { m_context = context; } + /* The context is ignored if used in PublishMessage. */ + Aws::Crt::Optional GetContext() noexcept { return m_context; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; static void s_loadFromJsonView(JsonMessage &, const Aws::Crt::JsonView &) noexcept; static Aws::Crt::ScopedResource s_allocateFromPayload( Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(JsonMessage *) noexcept; - /* This needs to be defined so that `JsonMessage` can be used as a key in - * maps. */ + /* This needs to be defined so that `JsonMessage` can be used as a key in maps. */ bool operator<(const JsonMessage &) const noexcept; static const char *MODEL_NAME; @@ -243,6 +312,7 @@ namespace Aws private: Aws::Crt::Optional m_message; + Aws::Crt::Optional m_context; }; enum DeploymentStatus @@ -265,6 +335,42 @@ namespace Aws LIFECYCLE_STATE_STOPPING }; + class MQTTCredential : public AbstractShapeBase + { + public: + MQTTCredential() noexcept {} + MQTTCredential(const MQTTCredential &) = default; + void SetClientId(const Aws::Crt::String &clientId) noexcept { m_clientId = clientId; } + Aws::Crt::Optional GetClientId() noexcept { return m_clientId; } + void SetCertificatePem(const Aws::Crt::String &certificatePem) noexcept + { + m_certificatePem = certificatePem; + } + Aws::Crt::Optional GetCertificatePem() noexcept { return m_certificatePem; } + void SetUsername(const Aws::Crt::String &username) noexcept { m_username = username; } + Aws::Crt::Optional GetUsername() noexcept { return m_username; } + void SetPassword(const Aws::Crt::String &password) noexcept { m_password = password; } + Aws::Crt::Optional GetPassword() noexcept { return m_password; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(MQTTCredential &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(MQTTCredential *) noexcept; + /* This needs to be defined so that `MQTTCredential` can be used as a key in maps. */ + bool operator<(const MQTTCredential &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_clientId; + Aws::Crt::Optional m_certificatePem; + Aws::Crt::Optional m_username; + Aws::Crt::Optional m_password; + }; + class RunWithInfo : public AbstractShapeBase { public: @@ -288,8 +394,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(RunWithInfo *) noexcept; - /* This needs to be defined so that `RunWithInfo` can be used as a key in - * maps. */ + /* This needs to be defined so that `RunWithInfo` can be used as a key in maps. */ bool operator<(const RunWithInfo &) const noexcept; static const char *MODEL_NAME; @@ -302,6 +407,49 @@ namespace Aws Aws::Crt::Optional m_systemResourceLimits; }; + class ClientDeviceCredential : public AbstractShapeBase + { + public: + ClientDeviceCredential() noexcept {} + ClientDeviceCredential &operator=(const ClientDeviceCredential &) noexcept; + ClientDeviceCredential(const ClientDeviceCredential &objectToCopy) { *this = objectToCopy; } + void SetClientDeviceCertificate(const Aws::Crt::String &clientDeviceCertificate) noexcept + { + m_clientDeviceCertificate = clientDeviceCertificate; + m_chosenMember = TAG_CLIENT_DEVICE_CERTIFICATE; + } + Aws::Crt::Optional GetClientDeviceCertificate() noexcept + { + if (m_chosenMember == TAG_CLIENT_DEVICE_CERTIFICATE) + { + return m_clientDeviceCertificate; + } + else + { + return Aws::Crt::Optional(); + } + } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(ClientDeviceCredential &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(ClientDeviceCredential *) noexcept; + /* This needs to be defined so that `ClientDeviceCredential` can be used as a key in maps. */ + bool operator<(const ClientDeviceCredential &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + enum ChosenMember + { + TAG_CLIENT_DEVICE_CERTIFICATE + } m_chosenMember; + Aws::Crt::Optional m_clientDeviceCertificate; + }; + enum ReportedLifecycleState { REPORTED_LIFECYCLE_STATE_RUNNING, @@ -340,8 +488,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ValidateConfigurationUpdateEvents *) noexcept; - /* This needs to be defined so that `ValidateConfigurationUpdateEvents` can be - * used as a key in maps. */ + /* This needs to be defined so that `ValidateConfigurationUpdateEvents` can be used as a key in maps. */ bool operator<(const ValidateConfigurationUpdateEvents &) const noexcept; static const char *MODEL_NAME; @@ -400,8 +547,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscriptionResponseMessage *) noexcept; - /* This needs to be defined so that `SubscriptionResponseMessage` can be used - * as a key in maps. */ + /* This needs to be defined so that `SubscriptionResponseMessage` can be used as a key in maps. */ bool operator<(const SubscriptionResponseMessage &) const noexcept; static const char *MODEL_NAME; @@ -418,6 +564,12 @@ namespace Aws Aws::Crt::Optional m_binaryMessage; }; + enum ReceiveMode + { + RECEIVE_MODE_RECEIVE_ALL_MESSAGES, + RECEIVE_MODE_RECEIVE_MESSAGES_FROM_OTHERS + }; + class IoTCoreMessage : public AbstractShapeBase { public: @@ -446,8 +598,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(IoTCoreMessage *) noexcept; - /* This needs to be defined so that `IoTCoreMessage` can be used as a key in - * maps. */ + /* This needs to be defined so that `IoTCoreMessage` can be used as a key in maps. */ bool operator<(const IoTCoreMessage &) const noexcept; static const char *MODEL_NAME; @@ -490,8 +641,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ConfigurationUpdateEvents *) noexcept; - /* This needs to be defined so that `ConfigurationUpdateEvents` can be used as - * a key in maps. */ + /* This needs to be defined so that `ConfigurationUpdateEvents` can be used as a key in maps. */ bool operator<(const ConfigurationUpdateEvents &) const noexcept; static const char *MODEL_NAME; @@ -550,8 +700,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ComponentUpdatePolicyEvents *) noexcept; - /* This needs to be defined so that `ComponentUpdatePolicyEvents` can be used - * as a key in maps. */ + /* This needs to be defined so that `ComponentUpdatePolicyEvents` can be used as a key in maps. */ bool operator<(const ComponentUpdatePolicyEvents &) const noexcept; static const char *MODEL_NAME; @@ -568,6 +717,73 @@ namespace Aws Aws::Crt::Optional m_postUpdateEvent; }; + class CertificateUpdateEvent : public AbstractShapeBase + { + public: + CertificateUpdateEvent() noexcept {} + CertificateUpdateEvent &operator=(const CertificateUpdateEvent &) noexcept; + CertificateUpdateEvent(const CertificateUpdateEvent &objectToCopy) { *this = objectToCopy; } + void SetCertificateUpdate(const CertificateUpdate &certificateUpdate) noexcept + { + m_certificateUpdate = certificateUpdate; + m_chosenMember = TAG_CERTIFICATE_UPDATE; + } + Aws::Crt::Optional GetCertificateUpdate() noexcept + { + if (m_chosenMember == TAG_CERTIFICATE_UPDATE) + { + return m_certificateUpdate; + } + else + { + return Aws::Crt::Optional(); + } + } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(CertificateUpdateEvent &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(CertificateUpdateEvent *) noexcept; + /* This needs to be defined so that `CertificateUpdateEvent` can be used as a key in maps. */ + bool operator<(const CertificateUpdateEvent &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + enum ChosenMember + { + TAG_CERTIFICATE_UPDATE + } m_chosenMember; + Aws::Crt::Optional m_certificateUpdate; + }; + + class CertificateOptions : public AbstractShapeBase + { + public: + CertificateOptions() noexcept {} + CertificateOptions(const CertificateOptions &) = default; + void SetCertificateType(CertificateType certificateType) noexcept; + Aws::Crt::Optional GetCertificateType() noexcept; + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(CertificateOptions &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(CertificateOptions *) noexcept; + /* This needs to be defined so that `CertificateOptions` can be used as a key in maps. */ + bool operator<(const CertificateOptions &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_certificateType; + }; + class ConfigurationValidityReport : public AbstractShapeBase { public: @@ -585,8 +801,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ConfigurationValidityReport *) noexcept; - /* This needs to be defined so that `ConfigurationValidityReport` can be used - * as a key in maps. */ + /* This needs to be defined so that `ConfigurationValidityReport` can be used as a key in maps. */ bool operator<(const ConfigurationValidityReport &) const noexcept; static const char *MODEL_NAME; @@ -649,8 +864,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PublishMessage *) noexcept; - /* This needs to be defined so that `PublishMessage` can be used as a key in - * maps. */ + /* This needs to be defined so that `PublishMessage` can be used as a key in maps. */ bool operator<(const PublishMessage &) const noexcept; static const char *MODEL_NAME; @@ -717,8 +931,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SecretValue *) noexcept; - /* This needs to be defined so that `SecretValue` can be used as a key in - * maps. */ + /* This needs to be defined so that `SecretValue` can be used as a key in maps. */ bool operator<(const SecretValue &) const noexcept; static const char *MODEL_NAME; @@ -750,8 +963,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(LocalDeployment *) noexcept; - /* This needs to be defined so that `LocalDeployment` can be used as a key in - * maps. */ + /* This needs to be defined so that `LocalDeployment` can be used as a key in maps. */ bool operator<(const LocalDeployment &) const noexcept; static const char *MODEL_NAME; @@ -785,8 +997,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ComponentDetails *) noexcept; - /* This needs to be defined so that `ComponentDetails` can be used as a key in - * maps. */ + /* This needs to be defined so that `ComponentDetails` can be used as a key in maps. */ bool operator<(const ComponentDetails &) const noexcept; static const char *MODEL_NAME; @@ -800,6 +1011,100 @@ namespace Aws Aws::Crt::Optional m_configuration; }; + class CredentialDocument : public AbstractShapeBase + { + public: + CredentialDocument() noexcept {} + CredentialDocument &operator=(const CredentialDocument &) noexcept; + CredentialDocument(const CredentialDocument &objectToCopy) { *this = objectToCopy; } + void SetMqttCredential(const MQTTCredential &mqttCredential) noexcept + { + m_mqttCredential = mqttCredential; + m_chosenMember = TAG_MQTT_CREDENTIAL; + } + Aws::Crt::Optional GetMqttCredential() noexcept + { + if (m_chosenMember == TAG_MQTT_CREDENTIAL) + { + return m_mqttCredential; + } + else + { + return Aws::Crt::Optional(); + } + } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(CredentialDocument &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(CredentialDocument *) noexcept; + /* This needs to be defined so that `CredentialDocument` can be used as a key in maps. */ + bool operator<(const CredentialDocument &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + enum ChosenMember + { + TAG_MQTT_CREDENTIAL + } m_chosenMember; + Aws::Crt::Optional m_mqttCredential; + }; + + class VerifyClientDeviceIdentityResponse : public AbstractShapeBase + { + public: + VerifyClientDeviceIdentityResponse() noexcept {} + VerifyClientDeviceIdentityResponse(const VerifyClientDeviceIdentityResponse &) = default; + void SetIsValidClientDevice(const bool &isValidClientDevice) noexcept + { + m_isValidClientDevice = isValidClientDevice; + } + Aws::Crt::Optional GetIsValidClientDevice() noexcept { return m_isValidClientDevice; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(VerifyClientDeviceIdentityResponse &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(VerifyClientDeviceIdentityResponse *) noexcept; + /* This needs to be defined so that `VerifyClientDeviceIdentityResponse` can be used as a key in maps. */ + bool operator<(const VerifyClientDeviceIdentityResponse &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_isValidClientDevice; + }; + + class VerifyClientDeviceIdentityRequest : public AbstractShapeBase + { + public: + VerifyClientDeviceIdentityRequest() noexcept {} + VerifyClientDeviceIdentityRequest(const VerifyClientDeviceIdentityRequest &) = default; + void SetCredential(const ClientDeviceCredential &credential) noexcept { m_credential = credential; } + Aws::Crt::Optional GetCredential() noexcept { return m_credential; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(VerifyClientDeviceIdentityRequest &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(VerifyClientDeviceIdentityRequest *) noexcept; + /* This needs to be defined so that `VerifyClientDeviceIdentityRequest` can be used as a key in maps. */ + bool operator<(const VerifyClientDeviceIdentityRequest &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_credential; + }; + class InvalidTokenError : public OperationError { public: @@ -813,8 +1118,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(InvalidTokenError *) noexcept; - /* This needs to be defined so that `InvalidTokenError` can be used as a key - * in maps. */ + /* This needs to be defined so that `InvalidTokenError` can be used as a key in maps. */ bool operator<(const InvalidTokenError &) const noexcept; static const char *MODEL_NAME; @@ -838,8 +1142,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ValidateAuthorizationTokenResponse *) noexcept; - /* This needs to be defined so that `ValidateAuthorizationTokenResponse` can - * be used as a key in maps. */ + /* This needs to be defined so that `ValidateAuthorizationTokenResponse` can be used as a key in maps. */ bool operator<(const ValidateAuthorizationTokenResponse &) const noexcept; static const char *MODEL_NAME; @@ -863,8 +1166,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ValidateAuthorizationTokenRequest *) noexcept; - /* This needs to be defined so that `ValidateAuthorizationTokenRequest` can be - * used as a key in maps. */ + /* This needs to be defined so that `ValidateAuthorizationTokenRequest` can be used as a key in maps. */ bool operator<(const ValidateAuthorizationTokenRequest &) const noexcept; static const char *MODEL_NAME; @@ -888,8 +1190,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UpdateThingShadowResponse *) noexcept; - /* This needs to be defined so that `UpdateThingShadowResponse` can be used as - * a key in maps. */ + /* This needs to be defined so that `UpdateThingShadowResponse` can be used as a key in maps. */ bool operator<(const UpdateThingShadowResponse &) const noexcept; static const char *MODEL_NAME; @@ -917,8 +1218,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UpdateThingShadowRequest *) noexcept; - /* This needs to be defined so that `UpdateThingShadowRequest` can be used as - * a key in maps. */ + /* This needs to be defined so that `UpdateThingShadowRequest` can be used as a key in maps. */ bool operator<(const UpdateThingShadowRequest &) const noexcept; static const char *MODEL_NAME; @@ -942,8 +1242,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UpdateStateResponse *) noexcept; - /* This needs to be defined so that `UpdateStateResponse` can be used as a key - * in maps. */ + /* This needs to be defined so that `UpdateStateResponse` can be used as a key in maps. */ bool operator<(const UpdateStateResponse &) const noexcept; static const char *MODEL_NAME; @@ -966,8 +1265,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UpdateStateRequest *) noexcept; - /* This needs to be defined so that `UpdateStateRequest` can be used as a key - * in maps. */ + /* This needs to be defined so that `UpdateStateRequest` can be used as a key in maps. */ bool operator<(const UpdateStateRequest &) const noexcept; static const char *MODEL_NAME; @@ -991,8 +1289,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(FailedUpdateConditionCheckError *) noexcept; - /* This needs to be defined so that `FailedUpdateConditionCheckError` can be - * used as a key in maps. */ + /* This needs to be defined so that `FailedUpdateConditionCheckError` can be used as a key in maps. */ bool operator<(const FailedUpdateConditionCheckError &) const noexcept; static const char *MODEL_NAME; @@ -1016,8 +1313,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ConflictError *) noexcept; - /* This needs to be defined so that `ConflictError` can be used as a key in - * maps. */ + /* This needs to be defined so that `ConflictError` can be used as a key in maps. */ bool operator<(const ConflictError &) const noexcept; static const char *MODEL_NAME; @@ -1039,8 +1335,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UpdateConfigurationResponse *) noexcept; - /* This needs to be defined so that `UpdateConfigurationResponse` can be used - * as a key in maps. */ + /* This needs to be defined so that `UpdateConfigurationResponse` can be used as a key in maps. */ bool operator<(const UpdateConfigurationResponse &) const noexcept; static const char *MODEL_NAME; @@ -1067,8 +1362,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UpdateConfigurationRequest *) noexcept; - /* This needs to be defined so that `UpdateConfigurationRequest` can be used - * as a key in maps. */ + /* This needs to be defined so that `UpdateConfigurationRequest` can be used as a key in maps. */ bool operator<(const UpdateConfigurationRequest &) const noexcept; static const char *MODEL_NAME; @@ -1095,9 +1389,8 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToValidateConfigurationUpdatesResponse *) noexcept; - /* This needs to be defined so that - * `SubscribeToValidateConfigurationUpdatesResponse` can be used as a key in - * maps. */ + /* This needs to be defined so that `SubscribeToValidateConfigurationUpdatesResponse` can be used as a key + * in maps. */ bool operator<(const SubscribeToValidateConfigurationUpdatesResponse &) const noexcept; static const char *MODEL_NAME; @@ -1121,8 +1414,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToValidateConfigurationUpdatesRequest *) noexcept; - /* This needs to be defined so that - * `SubscribeToValidateConfigurationUpdatesRequest` can be used as a key in + /* This needs to be defined so that `SubscribeToValidateConfigurationUpdatesRequest` can be used as a key in * maps. */ bool operator<(const SubscribeToValidateConfigurationUpdatesRequest &) const noexcept; static const char *MODEL_NAME; @@ -1138,7 +1430,9 @@ namespace Aws public: SubscribeToTopicResponse() noexcept {} SubscribeToTopicResponse(const SubscribeToTopicResponse &) = default; + /* Deprecated No longer used */ void SetTopicName(const Aws::Crt::String &topicName) noexcept { m_topicName = topicName; } + /* Deprecated No longer used */ Aws::Crt::Optional GetTopicName() noexcept { return m_topicName; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; static void s_loadFromJsonView(SubscribeToTopicResponse &, const Aws::Crt::JsonView &) noexcept; @@ -1146,8 +1440,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToTopicResponse *) noexcept; - /* This needs to be defined so that `SubscribeToTopicResponse` can be used as - * a key in maps. */ + /* This needs to be defined so that `SubscribeToTopicResponse` can be used as a key in maps. */ bool operator<(const SubscribeToTopicResponse &) const noexcept; static const char *MODEL_NAME; @@ -1165,14 +1458,15 @@ namespace Aws SubscribeToTopicRequest(const SubscribeToTopicRequest &) = default; void SetTopic(const Aws::Crt::String &topic) noexcept { m_topic = topic; } Aws::Crt::Optional GetTopic() noexcept { return m_topic; } + void SetReceiveMode(ReceiveMode receiveMode) noexcept; + Aws::Crt::Optional GetReceiveMode() noexcept; void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; static void s_loadFromJsonView(SubscribeToTopicRequest &, const Aws::Crt::JsonView &) noexcept; static Aws::Crt::ScopedResource s_allocateFromPayload( Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToTopicRequest *) noexcept; - /* This needs to be defined so that `SubscribeToTopicRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `SubscribeToTopicRequest` can be used as a key in maps. */ bool operator<(const SubscribeToTopicRequest &) const noexcept; static const char *MODEL_NAME; @@ -1181,6 +1475,7 @@ namespace Aws private: Aws::Crt::Optional m_topic; + Aws::Crt::Optional m_receiveMode; }; class SubscribeToIoTCoreResponse : public AbstractShapeBase @@ -1194,8 +1489,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToIoTCoreResponse *) noexcept; - /* This needs to be defined so that `SubscribeToIoTCoreResponse` can be used - * as a key in maps. */ + /* This needs to be defined so that `SubscribeToIoTCoreResponse` can be used as a key in maps. */ bool operator<(const SubscribeToIoTCoreResponse &) const noexcept; static const char *MODEL_NAME; @@ -1220,8 +1514,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToIoTCoreRequest *) noexcept; - /* This needs to be defined so that `SubscribeToIoTCoreRequest` can be used as - * a key in maps. */ + /* This needs to be defined so that `SubscribeToIoTCoreRequest` can be used as a key in maps. */ bool operator<(const SubscribeToIoTCoreRequest &) const noexcept; static const char *MODEL_NAME; @@ -1246,8 +1539,8 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToConfigurationUpdateResponse *) noexcept; - /* This needs to be defined so that `SubscribeToConfigurationUpdateResponse` - * can be used as a key in maps. */ + /* This needs to be defined so that `SubscribeToConfigurationUpdateResponse` can be used as a key in maps. + */ bool operator<(const SubscribeToConfigurationUpdateResponse &) const noexcept; static const char *MODEL_NAME; @@ -1274,8 +1567,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToConfigurationUpdateRequest *) noexcept; - /* This needs to be defined so that `SubscribeToConfigurationUpdateRequest` - * can be used as a key in maps. */ + /* This needs to be defined so that `SubscribeToConfigurationUpdateRequest` can be used as a key in maps. */ bool operator<(const SubscribeToConfigurationUpdateRequest &) const noexcept; static const char *MODEL_NAME; @@ -1298,8 +1590,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToComponentUpdatesResponse *) noexcept; - /* This needs to be defined so that `SubscribeToComponentUpdatesResponse` can - * be used as a key in maps. */ + /* This needs to be defined so that `SubscribeToComponentUpdatesResponse` can be used as a key in maps. */ bool operator<(const SubscribeToComponentUpdatesResponse &) const noexcept; static const char *MODEL_NAME; @@ -1320,8 +1611,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SubscribeToComponentUpdatesRequest *) noexcept; - /* This needs to be defined so that `SubscribeToComponentUpdatesRequest` can - * be used as a key in maps. */ + /* This needs to be defined so that `SubscribeToComponentUpdatesRequest` can be used as a key in maps. */ bool operator<(const SubscribeToComponentUpdatesRequest &) const noexcept; static const char *MODEL_NAME; @@ -1331,6 +1621,56 @@ namespace Aws private: }; + class SubscribeToCertificateUpdatesResponse : public AbstractShapeBase + { + public: + SubscribeToCertificateUpdatesResponse() noexcept {} + SubscribeToCertificateUpdatesResponse(const SubscribeToCertificateUpdatesResponse &) = default; + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView( + SubscribeToCertificateUpdatesResponse &, + const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(SubscribeToCertificateUpdatesResponse *) noexcept; + /* This needs to be defined so that `SubscribeToCertificateUpdatesResponse` can be used as a key in maps. */ + bool operator<(const SubscribeToCertificateUpdatesResponse &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + }; + + class SubscribeToCertificateUpdatesRequest : public AbstractShapeBase + { + public: + SubscribeToCertificateUpdatesRequest() noexcept {} + SubscribeToCertificateUpdatesRequest(const SubscribeToCertificateUpdatesRequest &) = default; + void SetCertificateOptions(const CertificateOptions &certificateOptions) noexcept + { + m_certificateOptions = certificateOptions; + } + Aws::Crt::Optional GetCertificateOptions() noexcept { return m_certificateOptions; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(SubscribeToCertificateUpdatesRequest &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(SubscribeToCertificateUpdatesRequest *) noexcept; + /* This needs to be defined so that `SubscribeToCertificateUpdatesRequest` can be used as a key in maps. */ + bool operator<(const SubscribeToCertificateUpdatesRequest &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_certificateOptions; + }; + class StopComponentResponse : public AbstractShapeBase { public: @@ -1346,8 +1686,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(StopComponentResponse *) noexcept; - /* This needs to be defined so that `StopComponentResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `StopComponentResponse` can be used as a key in maps. */ bool operator<(const StopComponentResponse &) const noexcept; static const char *MODEL_NAME; @@ -1372,8 +1711,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(StopComponentRequest *) noexcept; - /* This needs to be defined so that `StopComponentRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `StopComponentRequest` can be used as a key in maps. */ bool operator<(const StopComponentRequest &) const noexcept; static const char *MODEL_NAME; @@ -1397,8 +1735,8 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SendConfigurationValidityReportResponse *) noexcept; - /* This needs to be defined so that `SendConfigurationValidityReportResponse` - * can be used as a key in maps. */ + /* This needs to be defined so that `SendConfigurationValidityReportResponse` can be used as a key in maps. + */ bool operator<(const SendConfigurationValidityReportResponse &) const noexcept; static const char *MODEL_NAME; @@ -1429,8 +1767,8 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(SendConfigurationValidityReportRequest *) noexcept; - /* This needs to be defined so that `SendConfigurationValidityReportRequest` - * can be used as a key in maps. */ + /* This needs to be defined so that `SendConfigurationValidityReportRequest` can be used as a key in maps. + */ bool operator<(const SendConfigurationValidityReportRequest &) const noexcept; static const char *MODEL_NAME; @@ -1452,8 +1790,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ResumeComponentResponse *) noexcept; - /* This needs to be defined so that `ResumeComponentResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `ResumeComponentResponse` can be used as a key in maps. */ bool operator<(const ResumeComponentResponse &) const noexcept; static const char *MODEL_NAME; @@ -1476,8 +1813,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ResumeComponentRequest *) noexcept; - /* This needs to be defined so that `ResumeComponentRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `ResumeComponentRequest` can be used as a key in maps. */ bool operator<(const ResumeComponentRequest &) const noexcept; static const char *MODEL_NAME; @@ -1501,8 +1837,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ComponentNotFoundError *) noexcept; - /* This needs to be defined so that `ComponentNotFoundError` can be used as a - * key in maps. */ + /* This needs to be defined so that `ComponentNotFoundError` can be used as a key in maps. */ bool operator<(const ComponentNotFoundError &) const noexcept; static const char *MODEL_NAME; @@ -1528,8 +1863,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(RestartComponentResponse *) noexcept; - /* This needs to be defined so that `RestartComponentResponse` can be used as - * a key in maps. */ + /* This needs to be defined so that `RestartComponentResponse` can be used as a key in maps. */ bool operator<(const RestartComponentResponse &) const noexcept; static const char *MODEL_NAME; @@ -1554,8 +1888,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(RestartComponentRequest *) noexcept; - /* This needs to be defined so that `RestartComponentRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `RestartComponentRequest` can be used as a key in maps. */ bool operator<(const RestartComponentRequest &) const noexcept; static const char *MODEL_NAME; @@ -1577,8 +1910,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PublishToTopicResponse *) noexcept; - /* This needs to be defined so that `PublishToTopicResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `PublishToTopicResponse` can be used as a key in maps. */ bool operator<(const PublishToTopicResponse &) const noexcept; static const char *MODEL_NAME; @@ -1603,8 +1935,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PublishToTopicRequest *) noexcept; - /* This needs to be defined so that `PublishToTopicRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `PublishToTopicRequest` can be used as a key in maps. */ bool operator<(const PublishToTopicRequest &) const noexcept; static const char *MODEL_NAME; @@ -1627,8 +1958,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PublishToIoTCoreResponse *) noexcept; - /* This needs to be defined so that `PublishToIoTCoreResponse` can be used as - * a key in maps. */ + /* This needs to be defined so that `PublishToIoTCoreResponse` can be used as a key in maps. */ bool operator<(const PublishToIoTCoreResponse &) const noexcept; static const char *MODEL_NAME; @@ -1655,8 +1985,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PublishToIoTCoreRequest *) noexcept; - /* This needs to be defined so that `PublishToIoTCoreRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `PublishToIoTCoreRequest` can be used as a key in maps. */ bool operator<(const PublishToIoTCoreRequest &) const noexcept; static const char *MODEL_NAME; @@ -1680,8 +2009,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PauseComponentResponse *) noexcept; - /* This needs to be defined so that `PauseComponentResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `PauseComponentResponse` can be used as a key in maps. */ bool operator<(const PauseComponentResponse &) const noexcept; static const char *MODEL_NAME; @@ -1704,8 +2032,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(PauseComponentRequest *) noexcept; - /* This needs to be defined so that `PauseComponentRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `PauseComponentRequest` can be used as a key in maps. */ bool operator<(const PauseComponentRequest &) const noexcept; static const char *MODEL_NAME; @@ -1733,8 +2060,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ListNamedShadowsForThingResponse *) noexcept; - /* This needs to be defined so that `ListNamedShadowsForThingResponse` can be - * used as a key in maps. */ + /* This needs to be defined so that `ListNamedShadowsForThingResponse` can be used as a key in maps. */ bool operator<(const ListNamedShadowsForThingResponse &) const noexcept; static const char *MODEL_NAME; @@ -1764,8 +2090,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ListNamedShadowsForThingRequest *) noexcept; - /* This needs to be defined so that `ListNamedShadowsForThingRequest` can be - * used as a key in maps. */ + /* This needs to be defined so that `ListNamedShadowsForThingRequest` can be used as a key in maps. */ bool operator<(const ListNamedShadowsForThingRequest &) const noexcept; static const char *MODEL_NAME; @@ -1797,8 +2122,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ListLocalDeploymentsResponse *) noexcept; - /* This needs to be defined so that `ListLocalDeploymentsResponse` can be used - * as a key in maps. */ + /* This needs to be defined so that `ListLocalDeploymentsResponse` can be used as a key in maps. */ bool operator<(const ListLocalDeploymentsResponse &) const noexcept; static const char *MODEL_NAME; @@ -1820,8 +2144,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ListLocalDeploymentsRequest *) noexcept; - /* This needs to be defined so that `ListLocalDeploymentsRequest` can be used - * as a key in maps. */ + /* This needs to be defined so that `ListLocalDeploymentsRequest` can be used as a key in maps. */ bool operator<(const ListLocalDeploymentsRequest &) const noexcept; static const char *MODEL_NAME; @@ -1847,8 +2170,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ListComponentsResponse *) noexcept; - /* This needs to be defined so that `ListComponentsResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `ListComponentsResponse` can be used as a key in maps. */ bool operator<(const ListComponentsResponse &) const noexcept; static const char *MODEL_NAME; @@ -1870,8 +2192,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ListComponentsRequest *) noexcept; - /* This needs to be defined so that `ListComponentsRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `ListComponentsRequest` can be used as a key in maps. */ bool operator<(const ListComponentsRequest &) const noexcept; static const char *MODEL_NAME; @@ -1894,8 +2215,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetThingShadowResponse *) noexcept; - /* This needs to be defined so that `GetThingShadowResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetThingShadowResponse` can be used as a key in maps. */ bool operator<(const GetThingShadowResponse &) const noexcept; static const char *MODEL_NAME; @@ -1921,8 +2241,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetThingShadowRequest *) noexcept; - /* This needs to be defined so that `GetThingShadowRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetThingShadowRequest` can be used as a key in maps. */ bool operator<(const GetThingShadowRequest &) const noexcept; static const char *MODEL_NAME; @@ -1956,8 +2275,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetSecretValueResponse *) noexcept; - /* This needs to be defined so that `GetSecretValueResponse` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetSecretValueResponse` can be used as a key in maps. */ bool operator<(const GetSecretValueResponse &) const noexcept; static const char *MODEL_NAME; @@ -1988,8 +2306,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetSecretValueRequest *) noexcept; - /* This needs to be defined so that `GetSecretValueRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetSecretValueRequest` can be used as a key in maps. */ bool operator<(const GetSecretValueRequest &) const noexcept; static const char *MODEL_NAME; @@ -2015,8 +2332,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetLocalDeploymentStatusResponse *) noexcept; - /* This needs to be defined so that `GetLocalDeploymentStatusResponse` can be - * used as a key in maps. */ + /* This needs to be defined so that `GetLocalDeploymentStatusResponse` can be used as a key in maps. */ bool operator<(const GetLocalDeploymentStatusResponse &) const noexcept; static const char *MODEL_NAME; @@ -2040,8 +2356,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetLocalDeploymentStatusRequest *) noexcept; - /* This needs to be defined so that `GetLocalDeploymentStatusRequest` can be - * used as a key in maps. */ + /* This needs to be defined so that `GetLocalDeploymentStatusRequest` can be used as a key in maps. */ bool operator<(const GetLocalDeploymentStatusRequest &) const noexcept; static const char *MODEL_NAME; @@ -2067,8 +2382,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetConfigurationResponse *) noexcept; - /* This needs to be defined so that `GetConfigurationResponse` can be used as - * a key in maps. */ + /* This needs to be defined so that `GetConfigurationResponse` can be used as a key in maps. */ bool operator<(const GetConfigurationResponse &) const noexcept; static const char *MODEL_NAME; @@ -2095,8 +2409,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetConfigurationRequest *) noexcept; - /* This needs to be defined so that `GetConfigurationRequest` can be used as a - * key in maps. */ + /* This needs to be defined so that `GetConfigurationRequest` can be used as a key in maps. */ bool operator<(const GetConfigurationRequest &) const noexcept; static const char *MODEL_NAME; @@ -2124,8 +2437,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetComponentDetailsResponse *) noexcept; - /* This needs to be defined so that `GetComponentDetailsResponse` can be used - * as a key in maps. */ + /* This needs to be defined so that `GetComponentDetailsResponse` can be used as a key in maps. */ bool operator<(const GetComponentDetailsResponse &) const noexcept; static const char *MODEL_NAME; @@ -2149,8 +2461,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(GetComponentDetailsRequest *) noexcept; - /* This needs to be defined so that `GetComponentDetailsRequest` can be used - * as a key in maps. */ + /* This needs to be defined so that `GetComponentDetailsRequest` can be used as a key in maps. */ bool operator<(const GetComponentDetailsRequest &) const noexcept; static const char *MODEL_NAME; @@ -2161,39 +2472,113 @@ namespace Aws Aws::Crt::Optional m_componentName; }; - class DeleteThingShadowResponse : public AbstractShapeBase + class InvalidCredentialError : public OperationError { public: - DeleteThingShadowResponse() noexcept {} - DeleteThingShadowResponse(const DeleteThingShadowResponse &) = default; - void SetPayload(const Aws::Crt::Vector &payload) noexcept { m_payload = payload; } - Aws::Crt::Optional> GetPayload() noexcept { return m_payload; } + InvalidCredentialError() noexcept {} + InvalidCredentialError(const InvalidCredentialError &) = default; + void SetMessage(const Aws::Crt::String &message) noexcept { m_message = message; } + Aws::Crt::Optional GetMessage() noexcept override { return m_message; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; - static void s_loadFromJsonView(DeleteThingShadowResponse &, const Aws::Crt::JsonView &) noexcept; - static Aws::Crt::ScopedResource s_allocateFromPayload( + static void s_loadFromJsonView(InvalidCredentialError &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; - static void s_customDeleter(DeleteThingShadowResponse *) noexcept; - /* This needs to be defined so that `DeleteThingShadowResponse` can be used as - * a key in maps. */ - bool operator<(const DeleteThingShadowResponse &) const noexcept; + static void s_customDeleter(InvalidCredentialError *) noexcept; + /* This needs to be defined so that `InvalidCredentialError` can be used as a key in maps. */ + bool operator<(const InvalidCredentialError &) const noexcept; static const char *MODEL_NAME; protected: Aws::Crt::String GetModelName() const noexcept override; private: - Aws::Crt::Optional> m_payload; + Aws::Crt::Optional m_message; }; - class DeleteThingShadowRequest : public AbstractShapeBase + class GetClientDeviceAuthTokenResponse : public AbstractShapeBase { public: - DeleteThingShadowRequest() noexcept {} - DeleteThingShadowRequest(const DeleteThingShadowRequest &) = default; - void SetThingName(const Aws::Crt::String &thingName) noexcept { m_thingName = thingName; } - Aws::Crt::Optional GetThingName() noexcept { return m_thingName; } - void SetShadowName(const Aws::Crt::String &shadowName) noexcept { m_shadowName = shadowName; } + GetClientDeviceAuthTokenResponse() noexcept {} + GetClientDeviceAuthTokenResponse(const GetClientDeviceAuthTokenResponse &) = default; + void SetClientDeviceAuthToken(const Aws::Crt::String &clientDeviceAuthToken) noexcept + { + m_clientDeviceAuthToken = clientDeviceAuthToken; + } + Aws::Crt::Optional GetClientDeviceAuthToken() noexcept { return m_clientDeviceAuthToken; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(GetClientDeviceAuthTokenResponse &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(GetClientDeviceAuthTokenResponse *) noexcept; + /* This needs to be defined so that `GetClientDeviceAuthTokenResponse` can be used as a key in maps. */ + bool operator<(const GetClientDeviceAuthTokenResponse &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_clientDeviceAuthToken; + }; + + class GetClientDeviceAuthTokenRequest : public AbstractShapeBase + { + public: + GetClientDeviceAuthTokenRequest() noexcept {} + GetClientDeviceAuthTokenRequest(const GetClientDeviceAuthTokenRequest &) = default; + void SetCredential(const CredentialDocument &credential) noexcept { m_credential = credential; } + Aws::Crt::Optional GetCredential() noexcept { return m_credential; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(GetClientDeviceAuthTokenRequest &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(GetClientDeviceAuthTokenRequest *) noexcept; + /* This needs to be defined so that `GetClientDeviceAuthTokenRequest` can be used as a key in maps. */ + bool operator<(const GetClientDeviceAuthTokenRequest &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_credential; + }; + + class DeleteThingShadowResponse : public AbstractShapeBase + { + public: + DeleteThingShadowResponse() noexcept {} + DeleteThingShadowResponse(const DeleteThingShadowResponse &) = default; + void SetPayload(const Aws::Crt::Vector &payload) noexcept { m_payload = payload; } + Aws::Crt::Optional> GetPayload() noexcept { return m_payload; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(DeleteThingShadowResponse &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(DeleteThingShadowResponse *) noexcept; + /* This needs to be defined so that `DeleteThingShadowResponse` can be used as a key in maps. */ + bool operator<(const DeleteThingShadowResponse &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional> m_payload; + }; + + class DeleteThingShadowRequest : public AbstractShapeBase + { + public: + DeleteThingShadowRequest() noexcept {} + DeleteThingShadowRequest(const DeleteThingShadowRequest &) = default; + void SetThingName(const Aws::Crt::String &thingName) noexcept { m_thingName = thingName; } + Aws::Crt::Optional GetThingName() noexcept { return m_thingName; } + void SetShadowName(const Aws::Crt::String &shadowName) noexcept { m_shadowName = shadowName; } Aws::Crt::Optional GetShadowName() noexcept { return m_shadowName; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; static void s_loadFromJsonView(DeleteThingShadowRequest &, const Aws::Crt::JsonView &) noexcept; @@ -2201,8 +2586,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(DeleteThingShadowRequest *) noexcept; - /* This needs to be defined so that `DeleteThingShadowRequest` can be used as - * a key in maps. */ + /* This needs to be defined so that `DeleteThingShadowRequest` can be used as a key in maps. */ bool operator<(const DeleteThingShadowRequest &) const noexcept; static const char *MODEL_NAME; @@ -2231,8 +2615,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ResourceNotFoundError *) noexcept; - /* This needs to be defined so that `ResourceNotFoundError` can be used as a - * key in maps. */ + /* This needs to be defined so that `ResourceNotFoundError` can be used as a key in maps. */ bool operator<(const ResourceNotFoundError &) const noexcept; static const char *MODEL_NAME; @@ -2256,8 +2639,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(DeferComponentUpdateResponse *) noexcept; - /* This needs to be defined so that `DeferComponentUpdateResponse` can be used - * as a key in maps. */ + /* This needs to be defined so that `DeferComponentUpdateResponse` can be used as a key in maps. */ bool operator<(const DeferComponentUpdateResponse &) const noexcept; static const char *MODEL_NAME; @@ -2284,8 +2666,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(DeferComponentUpdateRequest *) noexcept; - /* This needs to be defined so that `DeferComponentUpdateRequest` can be used - * as a key in maps. */ + /* This needs to be defined so that `DeferComponentUpdateRequest` can be used as a key in maps. */ bool operator<(const DeferComponentUpdateRequest &) const noexcept; static const char *MODEL_NAME; @@ -2298,31 +2679,6 @@ namespace Aws Aws::Crt::Optional m_recheckAfterMs; }; - class InvalidArgumentsError : public OperationError - { - public: - InvalidArgumentsError() noexcept {} - InvalidArgumentsError(const InvalidArgumentsError &) = default; - void SetMessage(const Aws::Crt::String &message) noexcept { m_message = message; } - Aws::Crt::Optional GetMessage() noexcept override { return m_message; } - void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; - static void s_loadFromJsonView(InvalidArgumentsError &, const Aws::Crt::JsonView &) noexcept; - static Aws::Crt::ScopedResource s_allocateFromPayload( - Aws::Crt::StringView, - Aws::Crt::Allocator *) noexcept; - static void s_customDeleter(InvalidArgumentsError *) noexcept; - /* This needs to be defined so that `InvalidArgumentsError` can be used as a - * key in maps. */ - bool operator<(const InvalidArgumentsError &) const noexcept; - static const char *MODEL_NAME; - - protected: - Aws::Crt::String GetModelName() const noexcept override; - - private: - Aws::Crt::Optional m_message; - }; - class InvalidArtifactsDirectoryPathError : public OperationError { public: @@ -2336,8 +2692,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(InvalidArtifactsDirectoryPathError *) noexcept; - /* This needs to be defined so that `InvalidArtifactsDirectoryPathError` can - * be used as a key in maps. */ + /* This needs to be defined so that `InvalidArtifactsDirectoryPathError` can be used as a key in maps. */ bool operator<(const InvalidArtifactsDirectoryPathError &) const noexcept; static const char *MODEL_NAME; @@ -2361,8 +2716,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(InvalidRecipeDirectoryPathError *) noexcept; - /* This needs to be defined so that `InvalidRecipeDirectoryPathError` can be - * used as a key in maps. */ + /* This needs to be defined so that `InvalidRecipeDirectoryPathError` can be used as a key in maps. */ bool operator<(const InvalidRecipeDirectoryPathError &) const noexcept; static const char *MODEL_NAME; @@ -2386,8 +2740,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(CreateLocalDeploymentResponse *) noexcept; - /* This needs to be defined so that `CreateLocalDeploymentResponse` can be - * used as a key in maps. */ + /* This needs to be defined so that `CreateLocalDeploymentResponse` can be used as a key in maps. */ bool operator<(const CreateLocalDeploymentResponse &) const noexcept; static const char *MODEL_NAME; @@ -2461,8 +2814,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(CreateLocalDeploymentRequest *) noexcept; - /* This needs to be defined so that `CreateLocalDeploymentRequest` can be used - * as a key in maps. */ + /* This needs to be defined so that `CreateLocalDeploymentRequest` can be used as a key in maps. */ bool operator<(const CreateLocalDeploymentRequest &) const noexcept; static const char *MODEL_NAME; @@ -2479,6 +2831,120 @@ namespace Aws Aws::Crt::Optional m_artifactsDirectoryPath; }; + class CreateDebugPasswordResponse : public AbstractShapeBase + { + public: + CreateDebugPasswordResponse() noexcept {} + CreateDebugPasswordResponse(const CreateDebugPasswordResponse &) = default; + void SetPassword(const Aws::Crt::String &password) noexcept { m_password = password; } + Aws::Crt::Optional GetPassword() noexcept { return m_password; } + void SetUsername(const Aws::Crt::String &username) noexcept { m_username = username; } + Aws::Crt::Optional GetUsername() noexcept { return m_username; } + void SetPasswordExpiration(const Aws::Crt::DateTime &passwordExpiration) noexcept + { + m_passwordExpiration = passwordExpiration; + } + Aws::Crt::Optional GetPasswordExpiration() noexcept { return m_passwordExpiration; } + void SetCertificateSHA256Hash(const Aws::Crt::String &certificateSHA256Hash) noexcept + { + m_certificateSHA256Hash = certificateSHA256Hash; + } + Aws::Crt::Optional GetCertificateSHA256Hash() noexcept { return m_certificateSHA256Hash; } + void SetCertificateSHA1Hash(const Aws::Crt::String &certificateSHA1Hash) noexcept + { + m_certificateSHA1Hash = certificateSHA1Hash; + } + Aws::Crt::Optional GetCertificateSHA1Hash() noexcept { return m_certificateSHA1Hash; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(CreateDebugPasswordResponse &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(CreateDebugPasswordResponse *) noexcept; + /* This needs to be defined so that `CreateDebugPasswordResponse` can be used as a key in maps. */ + bool operator<(const CreateDebugPasswordResponse &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_password; + Aws::Crt::Optional m_username; + Aws::Crt::Optional m_passwordExpiration; + Aws::Crt::Optional m_certificateSHA256Hash; + Aws::Crt::Optional m_certificateSHA1Hash; + }; + + class CreateDebugPasswordRequest : public AbstractShapeBase + { + public: + CreateDebugPasswordRequest() noexcept {} + CreateDebugPasswordRequest(const CreateDebugPasswordRequest &) = default; + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(CreateDebugPasswordRequest &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(CreateDebugPasswordRequest *) noexcept; + /* This needs to be defined so that `CreateDebugPasswordRequest` can be used as a key in maps. */ + bool operator<(const CreateDebugPasswordRequest &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + }; + + class InvalidClientDeviceAuthTokenError : public OperationError + { + public: + InvalidClientDeviceAuthTokenError() noexcept {} + InvalidClientDeviceAuthTokenError(const InvalidClientDeviceAuthTokenError &) = default; + void SetMessage(const Aws::Crt::String &message) noexcept { m_message = message; } + Aws::Crt::Optional GetMessage() noexcept override { return m_message; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(InvalidClientDeviceAuthTokenError &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(InvalidClientDeviceAuthTokenError *) noexcept; + /* This needs to be defined so that `InvalidClientDeviceAuthTokenError` can be used as a key in maps. */ + bool operator<(const InvalidClientDeviceAuthTokenError &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_message; + }; + + class InvalidArgumentsError : public OperationError + { + public: + InvalidArgumentsError() noexcept {} + InvalidArgumentsError(const InvalidArgumentsError &) = default; + void SetMessage(const Aws::Crt::String &message) noexcept { m_message = message; } + Aws::Crt::Optional GetMessage() noexcept override { return m_message; } + void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; + static void s_loadFromJsonView(InvalidArgumentsError &, const Aws::Crt::JsonView &) noexcept; + static Aws::Crt::ScopedResource s_allocateFromPayload( + Aws::Crt::StringView, + Aws::Crt::Allocator *) noexcept; + static void s_customDeleter(InvalidArgumentsError *) noexcept; + /* This needs to be defined so that `InvalidArgumentsError` can be used as a key in maps. */ + bool operator<(const InvalidArgumentsError &) const noexcept; + static const char *MODEL_NAME; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + + private: + Aws::Crt::Optional m_message; + }; + class ServiceError : public OperationError { public: @@ -2492,8 +2958,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(ServiceError *) noexcept; - /* This needs to be defined so that `ServiceError` can be used as a key in - * maps. */ + /* This needs to be defined so that `ServiceError` can be used as a key in maps. */ bool operator<(const ServiceError &) const noexcept; static const char *MODEL_NAME; @@ -2517,8 +2982,7 @@ namespace Aws Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; static void s_customDeleter(UnauthorizedError *) noexcept; - /* This needs to be defined so that `UnauthorizedError` can be used as a key - * in maps. */ + /* This needs to be defined so that `UnauthorizedError` can be used as a key in maps. */ bool operator<(const UnauthorizedError &) const noexcept; static const char *MODEL_NAME; @@ -2529,72 +2993,61 @@ namespace Aws Aws::Crt::Optional m_message; }; - class CreateDebugPasswordResponse : public AbstractShapeBase + class AuthorizeClientDeviceActionResponse : public AbstractShapeBase { public: - CreateDebugPasswordResponse() noexcept {} - CreateDebugPasswordResponse(const CreateDebugPasswordResponse &) = default; - void SetPassword(const Aws::Crt::String &password) noexcept { m_password = password; } - Aws::Crt::Optional GetPassword() noexcept { return m_password; } - void SetUsername(const Aws::Crt::String &username) noexcept { m_username = username; } - Aws::Crt::Optional GetUsername() noexcept { return m_username; } - void SetPasswordExpiration(const Aws::Crt::DateTime &passwordExpiration) noexcept - { - m_passwordExpiration = passwordExpiration; - } - Aws::Crt::Optional GetPasswordExpiration() noexcept { return m_passwordExpiration; } - void SetCertificateSHA256Hash(const Aws::Crt::String &certificateSHA256Hash) noexcept - { - m_certificateSHA256Hash = certificateSHA256Hash; - } - Aws::Crt::Optional GetCertificateSHA256Hash() noexcept { return m_certificateSHA256Hash; } - void SetCertificateSHA1Hash(const Aws::Crt::String &certificateSHA1Hash) noexcept - { - m_certificateSHA1Hash = certificateSHA1Hash; - } - Aws::Crt::Optional GetCertificateSHA1Hash() noexcept { return m_certificateSHA1Hash; } + AuthorizeClientDeviceActionResponse() noexcept {} + AuthorizeClientDeviceActionResponse(const AuthorizeClientDeviceActionResponse &) = default; + void SetIsAuthorized(const bool &isAuthorized) noexcept { m_isAuthorized = isAuthorized; } + Aws::Crt::Optional GetIsAuthorized() noexcept { return m_isAuthorized; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; - static void s_loadFromJsonView(CreateDebugPasswordResponse &, const Aws::Crt::JsonView &) noexcept; + static void s_loadFromJsonView(AuthorizeClientDeviceActionResponse &, const Aws::Crt::JsonView &) noexcept; static Aws::Crt::ScopedResource s_allocateFromPayload( Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; - static void s_customDeleter(CreateDebugPasswordResponse *) noexcept; - /* This needs to be defined so that `CreateDebugPasswordResponse` can be used - * as a key in maps. */ - bool operator<(const CreateDebugPasswordResponse &) const noexcept; + static void s_customDeleter(AuthorizeClientDeviceActionResponse *) noexcept; + /* This needs to be defined so that `AuthorizeClientDeviceActionResponse` can be used as a key in maps. */ + bool operator<(const AuthorizeClientDeviceActionResponse &) const noexcept; static const char *MODEL_NAME; protected: Aws::Crt::String GetModelName() const noexcept override; private: - Aws::Crt::Optional m_password; - Aws::Crt::Optional m_username; - Aws::Crt::Optional m_passwordExpiration; - Aws::Crt::Optional m_certificateSHA256Hash; - Aws::Crt::Optional m_certificateSHA1Hash; + Aws::Crt::Optional m_isAuthorized; }; - class CreateDebugPasswordRequest : public AbstractShapeBase + class AuthorizeClientDeviceActionRequest : public AbstractShapeBase { public: - CreateDebugPasswordRequest() noexcept {} - CreateDebugPasswordRequest(const CreateDebugPasswordRequest &) = default; + AuthorizeClientDeviceActionRequest() noexcept {} + AuthorizeClientDeviceActionRequest(const AuthorizeClientDeviceActionRequest &) = default; + void SetClientDeviceAuthToken(const Aws::Crt::String &clientDeviceAuthToken) noexcept + { + m_clientDeviceAuthToken = clientDeviceAuthToken; + } + Aws::Crt::Optional GetClientDeviceAuthToken() noexcept { return m_clientDeviceAuthToken; } + void SetOperation(const Aws::Crt::String &operation) noexcept { m_operation = operation; } + Aws::Crt::Optional GetOperation() noexcept { return m_operation; } + void SetResource(const Aws::Crt::String &resource) noexcept { m_resource = resource; } + Aws::Crt::Optional GetResource() noexcept { return m_resource; } void SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept override; - static void s_loadFromJsonView(CreateDebugPasswordRequest &, const Aws::Crt::JsonView &) noexcept; + static void s_loadFromJsonView(AuthorizeClientDeviceActionRequest &, const Aws::Crt::JsonView &) noexcept; static Aws::Crt::ScopedResource s_allocateFromPayload( Aws::Crt::StringView, Aws::Crt::Allocator *) noexcept; - static void s_customDeleter(CreateDebugPasswordRequest *) noexcept; - /* This needs to be defined so that `CreateDebugPasswordRequest` can be used - * as a key in maps. */ - bool operator<(const CreateDebugPasswordRequest &) const noexcept; + static void s_customDeleter(AuthorizeClientDeviceActionRequest *) noexcept; + /* This needs to be defined so that `AuthorizeClientDeviceActionRequest` can be used as a key in maps. */ + bool operator<(const AuthorizeClientDeviceActionRequest &) const noexcept; static const char *MODEL_NAME; protected: Aws::Crt::String GetModelName() const noexcept override; private: + Aws::Crt::Optional m_clientDeviceAuthToken; + Aws::Crt::Optional m_operation; + Aws::Crt::Optional m_resource; }; class SubscribeToIoTCoreStreamHandler : public StreamResponseHandler @@ -2603,10 +3056,8 @@ namespace Aws virtual void OnStreamEvent(IoTCoreMessage *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -2625,8 +3076,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving an error of type - * `UnauthorizedError`. + * A callback that is invoked upon receiving an error of type `UnauthorizedError`. * @param operationError The error message being received. */ virtual bool OnStreamError(UnauthorizedError *operationError) @@ -2636,8 +3086,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -2652,8 +3101,7 @@ namespace Aws */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -2708,10 +3156,8 @@ namespace Aws /** * Used to activate a stream for the `SubscribeToIoTCoreOperation` * @param request The request used for the `SubscribeToIoTCoreOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const SubscribeToIoTCoreRequest &request, @@ -2773,10 +3219,8 @@ namespace Aws /** * Used to activate a stream for the `ResumeComponentOperation` * @param request The request used for the `ResumeComponentOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const ResumeComponentRequest &request, @@ -2838,10 +3282,8 @@ namespace Aws /** * Used to activate a stream for the `PublishToIoTCoreOperation` * @param request The request used for the `PublishToIoTCoreOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const PublishToIoTCoreRequest &request, @@ -2861,10 +3303,8 @@ namespace Aws virtual void OnStreamEvent(ConfigurationUpdateEvents *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -2883,8 +3323,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving an error of type - * `ResourceNotFoundError`. + * A callback that is invoked upon receiving an error of type `ResourceNotFoundError`. * @param operationError The error message being received. */ virtual bool OnStreamError(ResourceNotFoundError *operationError) @@ -2894,8 +3333,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -2910,8 +3348,7 @@ namespace Aws */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -2968,12 +3405,9 @@ namespace Aws Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** * Used to activate a stream for the `SubscribeToConfigurationUpdateOperation` - * @param request The request used for the - * `SubscribeToConfigurationUpdateOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param request The request used for the `SubscribeToConfigurationUpdateOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const SubscribeToConfigurationUpdateRequest &request, @@ -3035,10 +3469,8 @@ namespace Aws /** * Used to activate a stream for the `DeleteThingShadowOperation` * @param request The request used for the `DeleteThingShadowOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const DeleteThingShadowRequest &request, @@ -3102,10 +3534,8 @@ namespace Aws /** * Used to activate a stream for the `DeferComponentUpdateOperation` * @param request The request used for the `DeferComponentUpdateOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const DeferComponentUpdateRequest &request, @@ -3125,10 +3555,8 @@ namespace Aws virtual void OnStreamEvent(ValidateConfigurationUpdateEvents *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -3147,8 +3575,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -3163,8 +3590,7 @@ namespace Aws */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -3222,14 +3648,10 @@ namespace Aws const SubscribeToValidateConfigurationUpdatesOperationContext &operationContext, Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** - * Used to activate a stream for the - * `SubscribeToValidateConfigurationUpdatesOperation` - * @param request The request used for the - * `SubscribeToValidateConfigurationUpdatesOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * Used to activate a stream for the `SubscribeToValidateConfigurationUpdatesOperation` + * @param request The request used for the `SubscribeToValidateConfigurationUpdatesOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const SubscribeToValidateConfigurationUpdatesRequest &request, @@ -3291,10 +3713,8 @@ namespace Aws /** * Used to activate a stream for the `GetConfigurationOperation` * @param request The request used for the `GetConfigurationOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetConfigurationRequest &request, @@ -3314,10 +3734,8 @@ namespace Aws virtual void OnStreamEvent(SubscriptionResponseMessage *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -3326,8 +3744,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving an error of type - * `InvalidArgumentsError`. + * A callback that is invoked upon receiving an error of type `InvalidArgumentsError`. * @param operationError The error message being received. */ virtual bool OnStreamError(InvalidArgumentsError *operationError) @@ -3347,8 +3764,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving an error of type - * `UnauthorizedError`. + * A callback that is invoked upon receiving an error of type `UnauthorizedError`. * @param operationError The error message being received. */ virtual bool OnStreamError(UnauthorizedError *operationError) @@ -3358,8 +3774,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -3374,8 +3789,7 @@ namespace Aws */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -3430,10 +3844,8 @@ namespace Aws /** * Used to activate a stream for the `SubscribeToTopicOperation` * @param request The request used for the `SubscribeToTopicOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const SubscribeToTopicRequest &request, @@ -3495,10 +3907,8 @@ namespace Aws /** * Used to activate a stream for the `GetComponentDetailsOperation` * @param request The request used for the `GetComponentDetailsOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetComponentDetailsRequest &request, @@ -3512,6 +3922,72 @@ namespace Aws Aws::Crt::String GetModelName() const noexcept override; }; + class GetClientDeviceAuthTokenOperationContext : public OperationModelContext + { + public: + GetClientDeviceAuthTokenOperationContext(const GreengrassCoreIpcServiceModel &serviceModel) noexcept; + Aws::Crt::ScopedResource AllocateInitialResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::ScopedResource AllocateStreamingResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::String GetRequestModelName() const noexcept override; + Aws::Crt::String GetInitialResponseModelName() const noexcept override; + Aws::Crt::Optional GetStreamingResponseModelName() const noexcept override; + Aws::Crt::String GetOperationName() const noexcept override; + }; + + class GetClientDeviceAuthTokenResult + { + public: + GetClientDeviceAuthTokenResult() noexcept {} + GetClientDeviceAuthTokenResult(TaggedResult &&taggedResult) noexcept + : m_taggedResult(std::move(taggedResult)) + { + } + GetClientDeviceAuthTokenResponse *GetOperationResponse() const noexcept + { + return static_cast(m_taggedResult.GetOperationResponse()); + } + /** + * @return true if the response is associated with an expected response; + * false if the response is associated with an error. + */ + operator bool() const noexcept { return m_taggedResult == true; } + OperationError *GetOperationError() const noexcept { return m_taggedResult.GetOperationError(); } + RpcError GetRpcError() const noexcept { return m_taggedResult.GetRpcError(); } + ResultType GetResultType() const noexcept { return m_taggedResult.GetResultType(); } + + private: + TaggedResult m_taggedResult; + }; + + class GetClientDeviceAuthTokenOperation : public ClientOperation + { + public: + GetClientDeviceAuthTokenOperation( + ClientConnection &connection, + const GetClientDeviceAuthTokenOperationContext &operationContext, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; + /** + * Used to activate a stream for the `GetClientDeviceAuthTokenOperation` + * @param request The request used for the `GetClientDeviceAuthTokenOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. + */ + std::future Activate( + const GetClientDeviceAuthTokenRequest &request, + OnMessageFlushCallback onMessageFlushCallback = nullptr) noexcept; + /** + * Retrieve the result from activating the stream. + */ + std::future GetResult() noexcept; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + }; + class PublishToTopicOperationContext : public OperationModelContext { public: @@ -3560,10 +4036,8 @@ namespace Aws /** * Used to activate a stream for the `PublishToTopicOperation` * @param request The request used for the `PublishToTopicOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const PublishToTopicRequest &request, @@ -3577,6 +4051,272 @@ namespace Aws Aws::Crt::String GetModelName() const noexcept override; }; + class SubscribeToCertificateUpdatesStreamHandler : public StreamResponseHandler + { + public: + virtual void OnStreamEvent(CertificateUpdateEvent *response) { (void)response; } + + /** + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. + */ + virtual bool OnStreamError(RpcError rpcError) + { + (void)rpcError; + return true; + } + + /** + * A callback that is invoked upon receiving an error of type `ServiceError`. + * @param operationError The error message being received. + */ + virtual bool OnStreamError(ServiceError *operationError) + { + (void)operationError; + return true; + } + + /** + * A callback that is invoked upon receiving an error of type `UnauthorizedError`. + * @param operationError The error message being received. + */ + virtual bool OnStreamError(UnauthorizedError *operationError) + { + (void)operationError; + return true; + } + + /** + * A callback that is invoked upon receiving an error of type `InvalidArgumentsError`. + * @param operationError The error message being received. + */ + virtual bool OnStreamError(InvalidArgumentsError *operationError) + { + (void)operationError; + return true; + } + + /** + * A callback that is invoked upon receiving ANY error response from the server. + * @param operationError The error message being received. + */ + virtual bool OnStreamError(OperationError *operationError) + { + (void)operationError; + return true; + } + + private: + /** + * Invoked when a message is received on this continuation. + */ + void OnStreamEvent(Aws::Crt::ScopedResource response) override; + /** + * Invoked when a message is received on this continuation but results in an error. + * + * This callback can return true so that the stream is closed afterwards. + */ + bool OnStreamError(Aws::Crt::ScopedResource error, RpcError rpcError) override; + }; + class SubscribeToCertificateUpdatesOperationContext : public OperationModelContext + { + public: + SubscribeToCertificateUpdatesOperationContext(const GreengrassCoreIpcServiceModel &serviceModel) noexcept; + Aws::Crt::ScopedResource AllocateInitialResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::ScopedResource AllocateStreamingResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::String GetRequestModelName() const noexcept override; + Aws::Crt::String GetInitialResponseModelName() const noexcept override; + Aws::Crt::Optional GetStreamingResponseModelName() const noexcept override; + Aws::Crt::String GetOperationName() const noexcept override; + }; + + class SubscribeToCertificateUpdatesResult + { + public: + SubscribeToCertificateUpdatesResult() noexcept {} + SubscribeToCertificateUpdatesResult(TaggedResult &&taggedResult) noexcept + : m_taggedResult(std::move(taggedResult)) + { + } + SubscribeToCertificateUpdatesResponse *GetOperationResponse() const noexcept + { + return static_cast(m_taggedResult.GetOperationResponse()); + } + /** + * @return true if the response is associated with an expected response; + * false if the response is associated with an error. + */ + operator bool() const noexcept { return m_taggedResult == true; } + OperationError *GetOperationError() const noexcept { return m_taggedResult.GetOperationError(); } + RpcError GetRpcError() const noexcept { return m_taggedResult.GetRpcError(); } + ResultType GetResultType() const noexcept { return m_taggedResult.GetResultType(); } + + private: + TaggedResult m_taggedResult; + }; + + class SubscribeToCertificateUpdatesOperation : public ClientOperation + { + public: + SubscribeToCertificateUpdatesOperation( + ClientConnection &connection, + std::shared_ptr streamHandler, + const SubscribeToCertificateUpdatesOperationContext &operationContext, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; + /** + * Used to activate a stream for the `SubscribeToCertificateUpdatesOperation` + * @param request The request used for the `SubscribeToCertificateUpdatesOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. + */ + std::future Activate( + const SubscribeToCertificateUpdatesRequest &request, + OnMessageFlushCallback onMessageFlushCallback = nullptr) noexcept; + /** + * Retrieve the result from activating the stream. + */ + std::future GetResult() noexcept; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + }; + + class VerifyClientDeviceIdentityOperationContext : public OperationModelContext + { + public: + VerifyClientDeviceIdentityOperationContext(const GreengrassCoreIpcServiceModel &serviceModel) noexcept; + Aws::Crt::ScopedResource AllocateInitialResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::ScopedResource AllocateStreamingResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::String GetRequestModelName() const noexcept override; + Aws::Crt::String GetInitialResponseModelName() const noexcept override; + Aws::Crt::Optional GetStreamingResponseModelName() const noexcept override; + Aws::Crt::String GetOperationName() const noexcept override; + }; + + class VerifyClientDeviceIdentityResult + { + public: + VerifyClientDeviceIdentityResult() noexcept {} + VerifyClientDeviceIdentityResult(TaggedResult &&taggedResult) noexcept + : m_taggedResult(std::move(taggedResult)) + { + } + VerifyClientDeviceIdentityResponse *GetOperationResponse() const noexcept + { + return static_cast(m_taggedResult.GetOperationResponse()); + } + /** + * @return true if the response is associated with an expected response; + * false if the response is associated with an error. + */ + operator bool() const noexcept { return m_taggedResult == true; } + OperationError *GetOperationError() const noexcept { return m_taggedResult.GetOperationError(); } + RpcError GetRpcError() const noexcept { return m_taggedResult.GetRpcError(); } + ResultType GetResultType() const noexcept { return m_taggedResult.GetResultType(); } + + private: + TaggedResult m_taggedResult; + }; + + class VerifyClientDeviceIdentityOperation : public ClientOperation + { + public: + VerifyClientDeviceIdentityOperation( + ClientConnection &connection, + const VerifyClientDeviceIdentityOperationContext &operationContext, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; + /** + * Used to activate a stream for the `VerifyClientDeviceIdentityOperation` + * @param request The request used for the `VerifyClientDeviceIdentityOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. + */ + std::future Activate( + const VerifyClientDeviceIdentityRequest &request, + OnMessageFlushCallback onMessageFlushCallback = nullptr) noexcept; + /** + * Retrieve the result from activating the stream. + */ + std::future GetResult() noexcept; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + }; + + class AuthorizeClientDeviceActionOperationContext : public OperationModelContext + { + public: + AuthorizeClientDeviceActionOperationContext(const GreengrassCoreIpcServiceModel &serviceModel) noexcept; + Aws::Crt::ScopedResource AllocateInitialResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::ScopedResource AllocateStreamingResponseFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) const noexcept override; + Aws::Crt::String GetRequestModelName() const noexcept override; + Aws::Crt::String GetInitialResponseModelName() const noexcept override; + Aws::Crt::Optional GetStreamingResponseModelName() const noexcept override; + Aws::Crt::String GetOperationName() const noexcept override; + }; + + class AuthorizeClientDeviceActionResult + { + public: + AuthorizeClientDeviceActionResult() noexcept {} + AuthorizeClientDeviceActionResult(TaggedResult &&taggedResult) noexcept + : m_taggedResult(std::move(taggedResult)) + { + } + AuthorizeClientDeviceActionResponse *GetOperationResponse() const noexcept + { + return static_cast(m_taggedResult.GetOperationResponse()); + } + /** + * @return true if the response is associated with an expected response; + * false if the response is associated with an error. + */ + operator bool() const noexcept { return m_taggedResult == true; } + OperationError *GetOperationError() const noexcept { return m_taggedResult.GetOperationError(); } + RpcError GetRpcError() const noexcept { return m_taggedResult.GetRpcError(); } + ResultType GetResultType() const noexcept { return m_taggedResult.GetResultType(); } + + private: + TaggedResult m_taggedResult; + }; + + class AuthorizeClientDeviceActionOperation : public ClientOperation + { + public: + AuthorizeClientDeviceActionOperation( + ClientConnection &connection, + const AuthorizeClientDeviceActionOperationContext &operationContext, + Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; + /** + * Used to activate a stream for the `AuthorizeClientDeviceActionOperation` + * @param request The request used for the `AuthorizeClientDeviceActionOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. + */ + std::future Activate( + const AuthorizeClientDeviceActionRequest &request, + OnMessageFlushCallback onMessageFlushCallback = nullptr) noexcept; + /** + * Retrieve the result from activating the stream. + */ + std::future GetResult() noexcept; + + protected: + Aws::Crt::String GetModelName() const noexcept override; + }; + class ListComponentsOperationContext : public OperationModelContext { public: @@ -3625,10 +4365,8 @@ namespace Aws /** * Used to activate a stream for the `ListComponentsOperation` * @param request The request used for the `ListComponentsOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const ListComponentsRequest &request, @@ -3690,10 +4428,8 @@ namespace Aws /** * Used to activate a stream for the `CreateDebugPasswordOperation` * @param request The request used for the `CreateDebugPasswordOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const CreateDebugPasswordRequest &request, @@ -3755,10 +4491,8 @@ namespace Aws /** * Used to activate a stream for the `GetThingShadowOperation` * @param request The request used for the `GetThingShadowOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetThingShadowRequest &request, @@ -3821,14 +4555,10 @@ namespace Aws const SendConfigurationValidityReportOperationContext &operationContext, Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** - * Used to activate a stream for the - * `SendConfigurationValidityReportOperation` - * @param request The request used for the - * `SendConfigurationValidityReportOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * Used to activate a stream for the `SendConfigurationValidityReportOperation` + * @param request The request used for the `SendConfigurationValidityReportOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const SendConfigurationValidityReportRequest &request, @@ -3890,10 +4620,8 @@ namespace Aws /** * Used to activate a stream for the `UpdateThingShadowOperation` * @param request The request used for the `UpdateThingShadowOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const UpdateThingShadowRequest &request, @@ -3955,10 +4683,8 @@ namespace Aws /** * Used to activate a stream for the `UpdateConfigurationOperation` * @param request The request used for the `UpdateConfigurationOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const UpdateConfigurationRequest &request, @@ -4022,12 +4748,9 @@ namespace Aws Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** * Used to activate a stream for the `ValidateAuthorizationTokenOperation` - * @param request The request used for the - * `ValidateAuthorizationTokenOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param request The request used for the `ValidateAuthorizationTokenOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const ValidateAuthorizationTokenRequest &request, @@ -4089,10 +4812,8 @@ namespace Aws /** * Used to activate a stream for the `RestartComponentOperation` * @param request The request used for the `RestartComponentOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const RestartComponentRequest &request, @@ -4157,10 +4878,8 @@ namespace Aws /** * Used to activate a stream for the `GetLocalDeploymentStatusOperation` * @param request The request used for the `GetLocalDeploymentStatusOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetLocalDeploymentStatusRequest &request, @@ -4222,10 +4941,8 @@ namespace Aws /** * Used to activate a stream for the `GetSecretValueOperation` * @param request The request used for the `GetSecretValueOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const GetSecretValueRequest &request, @@ -4287,10 +5004,8 @@ namespace Aws /** * Used to activate a stream for the `UpdateStateOperation` * @param request The request used for the `UpdateStateOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const UpdateStateRequest &request, @@ -4355,10 +5070,8 @@ namespace Aws /** * Used to activate a stream for the `ListNamedShadowsForThingOperation` * @param request The request used for the `ListNamedShadowsForThingOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const ListNamedShadowsForThingRequest &request, @@ -4378,10 +5091,8 @@ namespace Aws virtual void OnStreamEvent(ComponentUpdatePolicyEvents *response) { (void)response; } /** - * A callback that is invoked when an error occurs while parsing a message - * from the stream. - * @param rpcError The RPC error containing the status and possibly a CRT - * error. + * A callback that is invoked when an error occurs while parsing a message from the stream. + * @param rpcError The RPC error containing the status and possibly a CRT error. */ virtual bool OnStreamError(RpcError rpcError) { @@ -4400,8 +5111,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving an error of type - * `ResourceNotFoundError`. + * A callback that is invoked upon receiving an error of type `ResourceNotFoundError`. * @param operationError The error message being received. */ virtual bool OnStreamError(ResourceNotFoundError *operationError) @@ -4411,8 +5121,7 @@ namespace Aws } /** - * A callback that is invoked upon receiving ANY error response from the - * server. + * A callback that is invoked upon receiving ANY error response from the server. * @param operationError The error message being received. */ virtual bool OnStreamError(OperationError *operationError) @@ -4427,8 +5136,7 @@ namespace Aws */ void OnStreamEvent(Aws::Crt::ScopedResource response) override; /** - * Invoked when a message is received on this continuation but results in an - * error. + * Invoked when a message is received on this continuation but results in an error. * * This callback can return true so that the stream is closed afterwards. */ @@ -4485,12 +5193,9 @@ namespace Aws Aws::Crt::Allocator *allocator = Aws::Crt::g_allocator) noexcept; /** * Used to activate a stream for the `SubscribeToComponentUpdatesOperation` - * @param request The request used for the - * `SubscribeToComponentUpdatesOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param request The request used for the `SubscribeToComponentUpdatesOperation` + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const SubscribeToComponentUpdatesRequest &request, @@ -4554,10 +5259,8 @@ namespace Aws /** * Used to activate a stream for the `ListLocalDeploymentsOperation` * @param request The request used for the `ListLocalDeploymentsOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const ListLocalDeploymentsRequest &request, @@ -4619,10 +5322,8 @@ namespace Aws /** * Used to activate a stream for the `StopComponentOperation` * @param request The request used for the `StopComponentOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const StopComponentRequest &request, @@ -4684,10 +5385,8 @@ namespace Aws /** * Used to activate a stream for the `PauseComponentOperation` * @param request The request used for the `PauseComponentOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const PauseComponentRequest &request, @@ -4751,10 +5450,8 @@ namespace Aws /** * Used to activate a stream for the `CreateLocalDeploymentOperation` * @param request The request used for the `CreateLocalDeploymentOperation` - * @param onMessageFlushCallback An optional callback that is invoked when the - * request is flushed. - * @return An `RpcError` that can be used to check whether the stream was - * activated. + * @param onMessageFlushCallback An optional callback that is invoked when the request is flushed. + * @return An `RpcError` that can be used to check whether the stream was activated. */ std::future Activate( const CreateLocalDeploymentRequest &request, @@ -4791,7 +5488,11 @@ namespace Aws GetConfigurationOperationContext m_getConfigurationOperationContext; SubscribeToTopicOperationContext m_subscribeToTopicOperationContext; GetComponentDetailsOperationContext m_getComponentDetailsOperationContext; + GetClientDeviceAuthTokenOperationContext m_getClientDeviceAuthTokenOperationContext; PublishToTopicOperationContext m_publishToTopicOperationContext; + SubscribeToCertificateUpdatesOperationContext m_subscribeToCertificateUpdatesOperationContext; + VerifyClientDeviceIdentityOperationContext m_verifyClientDeviceIdentityOperationContext; + AuthorizeClientDeviceActionOperationContext m_authorizeClientDeviceActionOperationContext; ListComponentsOperationContext m_listComponentsOperationContext; CreateDebugPasswordOperationContext m_createDebugPasswordOperationContext; GetThingShadowOperationContext m_getThingShadowOperationContext; diff --git a/greengrass_ipc/source/GreengrassCoreIpcClient.cpp b/greengrass_ipc/source/GreengrassCoreIpcClient.cpp index 7bbf33849..c7d641dd8 100644 --- a/greengrass_ipc/source/GreengrassCoreIpcClient.cpp +++ b/greengrass_ipc/source/GreengrassCoreIpcClient.cpp @@ -22,15 +22,21 @@ namespace Aws Aws::Crt::String("aws.greengrass#ComponentNotFoundError"), ComponentNotFoundError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( - Aws::Crt::String("aws.greengrass#ResourceNotFoundError"), ResourceNotFoundError::s_allocateFromPayload); + Aws::Crt::String("aws.greengrass#InvalidCredentialError"), + InvalidCredentialError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( - Aws::Crt::String("aws.greengrass#InvalidArgumentsError"), InvalidArgumentsError::s_allocateFromPayload); + Aws::Crt::String("aws.greengrass#ResourceNotFoundError"), ResourceNotFoundError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidArtifactsDirectoryPathError"), InvalidArtifactsDirectoryPathError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidRecipeDirectoryPathError"), InvalidRecipeDirectoryPathError::s_allocateFromPayload); + m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( + Aws::Crt::String("aws.greengrass#InvalidClientDeviceAuthTokenError"), + InvalidClientDeviceAuthTokenError::s_allocateFromPayload); + m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( + Aws::Crt::String("aws.greengrass#InvalidArgumentsError"), InvalidArgumentsError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#ServiceError"), ServiceError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( @@ -148,6 +154,16 @@ namespace Aws m_allocator); } + std::shared_ptr GreengrassCoreIpcClient:: + NewGetClientDeviceAuthToken() noexcept + { + return Aws::Crt::MakeShared( + m_allocator, + m_connection, + m_greengrassCoreIpcServiceModel.m_getClientDeviceAuthTokenOperationContext, + m_allocator); + } + std::shared_ptr GreengrassCoreIpcClient::NewPublishToTopic() noexcept { return Aws::Crt::MakeShared( @@ -157,6 +173,38 @@ namespace Aws m_allocator); } + std::shared_ptr GreengrassCoreIpcClient:: + NewSubscribeToCertificateUpdates( + std::shared_ptr streamHandler) noexcept + { + return Aws::Crt::MakeShared( + m_allocator, + m_connection, + std::move(streamHandler), + m_greengrassCoreIpcServiceModel.m_subscribeToCertificateUpdatesOperationContext, + m_allocator); + } + + std::shared_ptr GreengrassCoreIpcClient:: + NewVerifyClientDeviceIdentity() noexcept + { + return Aws::Crt::MakeShared( + m_allocator, + m_connection, + m_greengrassCoreIpcServiceModel.m_verifyClientDeviceIdentityOperationContext, + m_allocator); + } + + std::shared_ptr GreengrassCoreIpcClient:: + NewAuthorizeClientDeviceAction() noexcept + { + return Aws::Crt::MakeShared( + m_allocator, + m_connection, + m_greengrassCoreIpcServiceModel.m_authorizeClientDeviceActionOperationContext, + m_allocator); + } + std::shared_ptr GreengrassCoreIpcClient::NewListComponents() noexcept { return Aws::Crt::MakeShared( diff --git a/greengrass_ipc/source/GreengrassCoreIpcModel.cpp b/greengrass_ipc/source/GreengrassCoreIpcModel.cpp index e444f3992..ddc6a28aa 100644 --- a/greengrass_ipc/source/GreengrassCoreIpcModel.cpp +++ b/greengrass_ipc/source/GreengrassCoreIpcModel.cpp @@ -5,6 +5,49 @@ namespace Aws { namespace Greengrass { + void MessageContext::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_topic.has_value()) + { + payloadObject.WithString("topic", m_topic.value()); + } + } + + void MessageContext::s_loadFromJsonView( + MessageContext &messageContext, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("topic")) + { + messageContext.m_topic = Aws::Crt::Optional(jsonView.GetString("topic")); + } + } + + const char *MessageContext::MODEL_NAME = "aws.greengrass#MessageContext"; + + Aws::Crt::String MessageContext::GetModelName() const noexcept { return MessageContext::MODEL_NAME; } + + Aws::Crt::ScopedResource MessageContext::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), MessageContext::s_customDeleter); + shape->m_allocator = allocator; + MessageContext::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void MessageContext::s_customDeleter(MessageContext *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + void SystemResourceLimits::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_memory.has_value()) @@ -345,6 +388,89 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } + void CertificateUpdate::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_privateKey.has_value()) + { + payloadObject.WithString("privateKey", m_privateKey.value()); + } + if (m_publicKey.has_value()) + { + payloadObject.WithString("publicKey", m_publicKey.value()); + } + if (m_certificate.has_value()) + { + payloadObject.WithString("certificate", m_certificate.value()); + } + if (m_caCertificates.has_value()) + { + Aws::Crt::JsonObject cACertificates; + Aws::Crt::Vector cACertificatesJsonArray; + for (const auto &cACertificatesItem : m_caCertificates.value()) + { + Aws::Crt::JsonObject cACertificatesJsonArrayItem; + cACertificatesJsonArrayItem.AsString(cACertificatesItem); + cACertificatesJsonArray.emplace_back(std::move(cACertificatesJsonArrayItem)); + } + cACertificates.AsArray(std::move(cACertificatesJsonArray)); + payloadObject.WithObject("caCertificates", std::move(cACertificates)); + } + } + + void CertificateUpdate::s_loadFromJsonView( + CertificateUpdate &certificateUpdate, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("privateKey")) + { + certificateUpdate.m_privateKey = Aws::Crt::Optional(jsonView.GetString("privateKey")); + } + if (jsonView.ValueExists("publicKey")) + { + certificateUpdate.m_publicKey = Aws::Crt::Optional(jsonView.GetString("publicKey")); + } + if (jsonView.ValueExists("certificate")) + { + certificateUpdate.m_certificate = + Aws::Crt::Optional(jsonView.GetString("certificate")); + } + if (jsonView.ValueExists("caCertificates")) + { + certificateUpdate.m_caCertificates = Aws::Crt::Vector(); + for (const Aws::Crt::JsonView &cACertificatesJsonView : jsonView.GetArray("caCertificates")) + { + Aws::Crt::Optional cACertificatesItem; + cACertificatesItem = Aws::Crt::Optional(cACertificatesJsonView.AsString()); + certificateUpdate.m_caCertificates.value().push_back(cACertificatesItem.value()); + } + } + } + + const char *CertificateUpdate::MODEL_NAME = "aws.greengrass#CertificateUpdate"; + + Aws::Crt::String CertificateUpdate::GetModelName() const noexcept { return CertificateUpdate::MODEL_NAME; } + + Aws::Crt::ScopedResource CertificateUpdate::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), CertificateUpdate::s_customDeleter); + shape->m_allocator = allocator; + CertificateUpdate::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void CertificateUpdate::s_customDeleter(CertificateUpdate *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + void BinaryMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) @@ -354,6 +480,12 @@ namespace Aws payloadObject.WithString("message", Aws::Crt::Base64Encode(m_message.value())); } } + if (m_context.has_value()) + { + Aws::Crt::JsonObject messageContextValue; + m_context.value().SerializeToJsonObject(messageContextValue); + payloadObject.WithObject("context", std::move(messageContextValue)); + } } void BinaryMessage::s_loadFromJsonView( @@ -368,6 +500,11 @@ namespace Aws Aws::Crt::Base64Decode(jsonView.GetString("message"))); } } + if (jsonView.ValueExists("context")) + { + binaryMessage.m_context = MessageContext(); + MessageContext::s_loadFromJsonView(binaryMessage.m_context.value(), jsonView.GetJsonObject("context")); + } } const char *BinaryMessage::MODEL_NAME = "aws.greengrass#BinaryMessage"; @@ -401,6 +538,12 @@ namespace Aws { payloadObject.WithObject("message", m_message.value()); } + if (m_context.has_value()) + { + Aws::Crt::JsonObject messageContextValue; + m_context.value().SerializeToJsonObject(messageContextValue); + payloadObject.WithObject("context", std::move(messageContextValue)); + } } void JsonMessage::s_loadFromJsonView(JsonMessage &jsonMessage, const Aws::Crt::JsonView &jsonView) noexcept @@ -410,6 +553,11 @@ namespace Aws jsonMessage.m_message = Aws::Crt::Optional(jsonView.GetJsonObject("message").Materialize()); } + if (jsonView.ValueExists("context")) + { + jsonMessage.m_context = MessageContext(); + MessageContext::s_loadFromJsonView(jsonMessage.m_context.value(), jsonView.GetJsonObject("context")); + } } const char *JsonMessage::MODEL_NAME = "aws.greengrass#JsonMessage"; @@ -437,6 +585,74 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } + void MQTTCredential::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_clientId.has_value()) + { + payloadObject.WithString("clientId", m_clientId.value()); + } + if (m_certificatePem.has_value()) + { + payloadObject.WithString("certificatePem", m_certificatePem.value()); + } + if (m_username.has_value()) + { + payloadObject.WithString("username", m_username.value()); + } + if (m_password.has_value()) + { + payloadObject.WithString("password", m_password.value()); + } + } + + void MQTTCredential::s_loadFromJsonView( + MQTTCredential &mQTTCredential, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("clientId")) + { + mQTTCredential.m_clientId = Aws::Crt::Optional(jsonView.GetString("clientId")); + } + if (jsonView.ValueExists("certificatePem")) + { + mQTTCredential.m_certificatePem = + Aws::Crt::Optional(jsonView.GetString("certificatePem")); + } + if (jsonView.ValueExists("username")) + { + mQTTCredential.m_username = Aws::Crt::Optional(jsonView.GetString("username")); + } + if (jsonView.ValueExists("password")) + { + mQTTCredential.m_password = Aws::Crt::Optional(jsonView.GetString("password")); + } + } + + const char *MQTTCredential::MODEL_NAME = "aws.greengrass#MQTTCredential"; + + Aws::Crt::String MQTTCredential::GetModelName() const noexcept { return MQTTCredential::MODEL_NAME; } + + Aws::Crt::ScopedResource MQTTCredential::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), MQTTCredential::s_customDeleter); + shape->m_allocator = allocator; + MQTTCredential::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void MQTTCredential::s_customDeleter(MQTTCredential *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + void RunWithInfo::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_posixUser.has_value()) @@ -498,6 +714,64 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } + void ClientDeviceCredential::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_chosenMember == TAG_CLIENT_DEVICE_CERTIFICATE && m_clientDeviceCertificate.has_value()) + { + payloadObject.WithString("clientDeviceCertificate", m_clientDeviceCertificate.value()); + } + } + + void ClientDeviceCredential::s_loadFromJsonView( + ClientDeviceCredential &clientDeviceCredential, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("clientDeviceCertificate")) + { + clientDeviceCredential.m_clientDeviceCertificate = + Aws::Crt::Optional(jsonView.GetString("clientDeviceCertificate")); + clientDeviceCredential.m_chosenMember = TAG_CLIENT_DEVICE_CERTIFICATE; + } + } + + ClientDeviceCredential &ClientDeviceCredential::operator=(const ClientDeviceCredential &objectToCopy) noexcept + { + if (objectToCopy.m_chosenMember == TAG_CLIENT_DEVICE_CERTIFICATE) + { + m_clientDeviceCertificate = objectToCopy.m_clientDeviceCertificate; + m_chosenMember = objectToCopy.m_chosenMember; + } + return *this; + } + + const char *ClientDeviceCredential::MODEL_NAME = "aws.greengrass#ClientDeviceCredential"; + + Aws::Crt::String ClientDeviceCredential::GetModelName() const noexcept + { + return ClientDeviceCredential::MODEL_NAME; + } + + Aws::Crt::ScopedResource ClientDeviceCredential::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), ClientDeviceCredential::s_customDeleter); + shape->m_allocator = allocator; + ClientDeviceCredential::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void ClientDeviceCredential::s_customDeleter(ClientDeviceCredential *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + void ValidateConfigurationUpdateEvents::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { @@ -846,6 +1120,135 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } + void CertificateUpdateEvent::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_chosenMember == TAG_CERTIFICATE_UPDATE && m_certificateUpdate.has_value()) + { + Aws::Crt::JsonObject certificateUpdateValue; + m_certificateUpdate.value().SerializeToJsonObject(certificateUpdateValue); + payloadObject.WithObject("certificateUpdate", std::move(certificateUpdateValue)); + } + } + + void CertificateUpdateEvent::s_loadFromJsonView( + CertificateUpdateEvent &certificateUpdateEvent, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("certificateUpdate")) + { + certificateUpdateEvent.m_certificateUpdate = CertificateUpdate(); + CertificateUpdate::s_loadFromJsonView( + certificateUpdateEvent.m_certificateUpdate.value(), jsonView.GetJsonObject("certificateUpdate")); + certificateUpdateEvent.m_chosenMember = TAG_CERTIFICATE_UPDATE; + } + } + + CertificateUpdateEvent &CertificateUpdateEvent::operator=(const CertificateUpdateEvent &objectToCopy) noexcept + { + if (objectToCopy.m_chosenMember == TAG_CERTIFICATE_UPDATE) + { + m_certificateUpdate = objectToCopy.m_certificateUpdate; + m_chosenMember = objectToCopy.m_chosenMember; + } + return *this; + } + + const char *CertificateUpdateEvent::MODEL_NAME = "aws.greengrass#CertificateUpdateEvent"; + + Aws::Crt::String CertificateUpdateEvent::GetModelName() const noexcept + { + return CertificateUpdateEvent::MODEL_NAME; + } + + Aws::Crt::ScopedResource CertificateUpdateEvent::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), CertificateUpdateEvent::s_customDeleter); + shape->m_allocator = allocator; + CertificateUpdateEvent::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void CertificateUpdateEvent::s_customDeleter(CertificateUpdateEvent *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void CertificateOptions::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_certificateType.has_value()) + { + payloadObject.WithString("certificateType", m_certificateType.value()); + } + } + + void CertificateOptions::s_loadFromJsonView( + CertificateOptions &certificateOptions, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("certificateType")) + { + certificateOptions.m_certificateType = + Aws::Crt::Optional(jsonView.GetString("certificateType")); + } + } + + void CertificateOptions::SetCertificateType(CertificateType certificateType) noexcept + { + switch (certificateType) + { + case CERTIFICATE_TYPE_SERVER: + m_certificateType = Aws::Crt::String("SERVER"); + break; + default: + break; + } + } + + Aws::Crt::Optional CertificateOptions::GetCertificateType() noexcept + { + if (!m_certificateType.has_value()) + return Aws::Crt::Optional(); + if (m_certificateType.value() == Aws::Crt::String("SERVER")) + { + return Aws::Crt::Optional(CERTIFICATE_TYPE_SERVER); + } + + return Aws::Crt::Optional(); + } + + const char *CertificateOptions::MODEL_NAME = "aws.greengrass#CertificateOptions"; + + Aws::Crt::String CertificateOptions::GetModelName() const noexcept { return CertificateOptions::MODEL_NAME; } + + Aws::Crt::ScopedResource CertificateOptions::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), CertificateOptions::s_customDeleter); + shape->m_allocator = allocator; + CertificateOptions::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void CertificateOptions::s_customDeleter(CertificateOptions *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + void ConfigurationValidityReport::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_status.has_value()) @@ -1330,16 +1733,176 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } - void InvalidTokenError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + void CredentialDocument::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { - if (m_message.has_value()) + if (m_chosenMember == TAG_MQTT_CREDENTIAL && m_mqttCredential.has_value()) { - payloadObject.WithString("message", m_message.value()); + Aws::Crt::JsonObject mQTTCredentialValue; + m_mqttCredential.value().SerializeToJsonObject(mQTTCredentialValue); + payloadObject.WithObject("mqttCredential", std::move(mQTTCredentialValue)); } } - void InvalidTokenError::s_loadFromJsonView( - InvalidTokenError &invalidTokenError, + void CredentialDocument::s_loadFromJsonView( + CredentialDocument &credentialDocument, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("mqttCredential")) + { + credentialDocument.m_mqttCredential = MQTTCredential(); + MQTTCredential::s_loadFromJsonView( + credentialDocument.m_mqttCredential.value(), jsonView.GetJsonObject("mqttCredential")); + credentialDocument.m_chosenMember = TAG_MQTT_CREDENTIAL; + } + } + + CredentialDocument &CredentialDocument::operator=(const CredentialDocument &objectToCopy) noexcept + { + if (objectToCopy.m_chosenMember == TAG_MQTT_CREDENTIAL) + { + m_mqttCredential = objectToCopy.m_mqttCredential; + m_chosenMember = objectToCopy.m_chosenMember; + } + return *this; + } + + const char *CredentialDocument::MODEL_NAME = "aws.greengrass#CredentialDocument"; + + Aws::Crt::String CredentialDocument::GetModelName() const noexcept { return CredentialDocument::MODEL_NAME; } + + Aws::Crt::ScopedResource CredentialDocument::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), CredentialDocument::s_customDeleter); + shape->m_allocator = allocator; + CredentialDocument::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void CredentialDocument::s_customDeleter(CredentialDocument *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void VerifyClientDeviceIdentityResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept + { + if (m_isValidClientDevice.has_value()) + { + payloadObject.WithBool("isValidClientDevice", m_isValidClientDevice.value()); + } + } + + void VerifyClientDeviceIdentityResponse::s_loadFromJsonView( + VerifyClientDeviceIdentityResponse &verifyClientDeviceIdentityResponse, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("isValidClientDevice")) + { + verifyClientDeviceIdentityResponse.m_isValidClientDevice = + Aws::Crt::Optional(jsonView.GetBool("isValidClientDevice")); + } + } + + const char *VerifyClientDeviceIdentityResponse::MODEL_NAME = + "aws.greengrass#VerifyClientDeviceIdentityResponse"; + + Aws::Crt::String VerifyClientDeviceIdentityResponse::GetModelName() const noexcept + { + return VerifyClientDeviceIdentityResponse::MODEL_NAME; + } + + Aws::Crt::ScopedResource VerifyClientDeviceIdentityResponse::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + VerifyClientDeviceIdentityResponse::s_customDeleter); + shape->m_allocator = allocator; + VerifyClientDeviceIdentityResponse::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void VerifyClientDeviceIdentityResponse::s_customDeleter(VerifyClientDeviceIdentityResponse *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void VerifyClientDeviceIdentityRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept + { + if (m_credential.has_value()) + { + Aws::Crt::JsonObject clientDeviceCredentialValue; + m_credential.value().SerializeToJsonObject(clientDeviceCredentialValue); + payloadObject.WithObject("credential", std::move(clientDeviceCredentialValue)); + } + } + + void VerifyClientDeviceIdentityRequest::s_loadFromJsonView( + VerifyClientDeviceIdentityRequest &verifyClientDeviceIdentityRequest, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("credential")) + { + verifyClientDeviceIdentityRequest.m_credential = ClientDeviceCredential(); + ClientDeviceCredential::s_loadFromJsonView( + verifyClientDeviceIdentityRequest.m_credential.value(), jsonView.GetJsonObject("credential")); + } + } + + const char *VerifyClientDeviceIdentityRequest::MODEL_NAME = "aws.greengrass#VerifyClientDeviceIdentityRequest"; + + Aws::Crt::String VerifyClientDeviceIdentityRequest::GetModelName() const noexcept + { + return VerifyClientDeviceIdentityRequest::MODEL_NAME; + } + + Aws::Crt::ScopedResource VerifyClientDeviceIdentityRequest::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + VerifyClientDeviceIdentityRequest::s_customDeleter); + shape->m_allocator = allocator; + VerifyClientDeviceIdentityRequest::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void VerifyClientDeviceIdentityRequest::s_customDeleter(VerifyClientDeviceIdentityRequest *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void InvalidTokenError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_message.has_value()) + { + payloadObject.WithString("message", m_message.value()); + } + } + + void InvalidTokenError::s_loadFromJsonView( + InvalidTokenError &invalidTokenError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) @@ -2059,6 +2622,10 @@ namespace Aws { payloadObject.WithString("topic", m_topic.value()); } + if (m_receiveMode.has_value()) + { + payloadObject.WithString("receiveMode", m_receiveMode.value()); + } } void SubscribeToTopicRequest::s_loadFromJsonView( @@ -2069,6 +2636,42 @@ namespace Aws { subscribeToTopicRequest.m_topic = Aws::Crt::Optional(jsonView.GetString("topic")); } + if (jsonView.ValueExists("receiveMode")) + { + subscribeToTopicRequest.m_receiveMode = + Aws::Crt::Optional(jsonView.GetString("receiveMode")); + } + } + + void SubscribeToTopicRequest::SetReceiveMode(ReceiveMode receiveMode) noexcept + { + switch (receiveMode) + { + case RECEIVE_MODE_RECEIVE_ALL_MESSAGES: + m_receiveMode = Aws::Crt::String("RECEIVE_ALL_MESSAGES"); + break; + case RECEIVE_MODE_RECEIVE_MESSAGES_FROM_OTHERS: + m_receiveMode = Aws::Crt::String("RECEIVE_MESSAGES_FROM_OTHERS"); + break; + default: + break; + } + } + + Aws::Crt::Optional SubscribeToTopicRequest::GetReceiveMode() noexcept + { + if (!m_receiveMode.has_value()) + return Aws::Crt::Optional(); + if (m_receiveMode.value() == Aws::Crt::String("RECEIVE_ALL_MESSAGES")) + { + return Aws::Crt::Optional(RECEIVE_MODE_RECEIVE_ALL_MESSAGES); + } + if (m_receiveMode.value() == Aws::Crt::String("RECEIVE_MESSAGES_FROM_OTHERS")) + { + return Aws::Crt::Optional(RECEIVE_MODE_RECEIVE_MESSAGES_FROM_OTHERS); + } + + return Aws::Crt::Optional(); } const char *SubscribeToTopicRequest::MODEL_NAME = "aws.greengrass#SubscribeToTopicRequest"; @@ -2433,6 +3036,105 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } + void SubscribeToCertificateUpdatesResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept + { + (void)payloadObject; + } + + void SubscribeToCertificateUpdatesResponse::s_loadFromJsonView( + SubscribeToCertificateUpdatesResponse &subscribeToCertificateUpdatesResponse, + const Aws::Crt::JsonView &jsonView) noexcept + { + (void)subscribeToCertificateUpdatesResponse; + (void)jsonView; + } + + const char *SubscribeToCertificateUpdatesResponse::MODEL_NAME = + "aws.greengrass#SubscribeToCertificateUpdatesResponse"; + + Aws::Crt::String SubscribeToCertificateUpdatesResponse::GetModelName() const noexcept + { + return SubscribeToCertificateUpdatesResponse::MODEL_NAME; + } + + Aws::Crt::ScopedResource SubscribeToCertificateUpdatesResponse::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + SubscribeToCertificateUpdatesResponse::s_customDeleter); + shape->m_allocator = allocator; + SubscribeToCertificateUpdatesResponse::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void SubscribeToCertificateUpdatesResponse::s_customDeleter( + SubscribeToCertificateUpdatesResponse *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void SubscribeToCertificateUpdatesRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept + { + if (m_certificateOptions.has_value()) + { + Aws::Crt::JsonObject certificateOptionsValue; + m_certificateOptions.value().SerializeToJsonObject(certificateOptionsValue); + payloadObject.WithObject("certificateOptions", std::move(certificateOptionsValue)); + } + } + + void SubscribeToCertificateUpdatesRequest::s_loadFromJsonView( + SubscribeToCertificateUpdatesRequest &subscribeToCertificateUpdatesRequest, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("certificateOptions")) + { + subscribeToCertificateUpdatesRequest.m_certificateOptions = CertificateOptions(); + CertificateOptions::s_loadFromJsonView( + subscribeToCertificateUpdatesRequest.m_certificateOptions.value(), + jsonView.GetJsonObject("certificateOptions")); + } + } + + const char *SubscribeToCertificateUpdatesRequest::MODEL_NAME = + "aws.greengrass#SubscribeToCertificateUpdatesRequest"; + + Aws::Crt::String SubscribeToCertificateUpdatesRequest::GetModelName() const noexcept + { + return SubscribeToCertificateUpdatesRequest::MODEL_NAME; + } + + Aws::Crt::ScopedResource SubscribeToCertificateUpdatesRequest::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + SubscribeToCertificateUpdatesRequest::s_customDeleter); + shape->m_allocator = allocator; + SubscribeToCertificateUpdatesRequest::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void SubscribeToCertificateUpdatesRequest::s_customDeleter(SubscribeToCertificateUpdatesRequest *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + void StopComponentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_stopStatus.has_value()) @@ -4202,39 +4904,32 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } - void DeleteThingShadowResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + void InvalidCredentialError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { - if (m_payload.has_value()) + if (m_message.has_value()) { - if (m_payload.value().size() > 0) - { - payloadObject.WithString("payload", Aws::Crt::Base64Encode(m_payload.value())); - } + payloadObject.WithString("message", m_message.value()); } } - void DeleteThingShadowResponse::s_loadFromJsonView( - DeleteThingShadowResponse &deleteThingShadowResponse, + void InvalidCredentialError::s_loadFromJsonView( + InvalidCredentialError &invalidCredentialError, const Aws::Crt::JsonView &jsonView) noexcept { - if (jsonView.ValueExists("payload")) + if (jsonView.ValueExists("message")) { - if (jsonView.GetString("payload").size() > 0) - { - deleteThingShadowResponse.m_payload = Aws::Crt::Optional>( - Aws::Crt::Base64Decode(jsonView.GetString("payload"))); - } + invalidCredentialError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } - const char *DeleteThingShadowResponse::MODEL_NAME = "aws.greengrass#DeleteThingShadowResponse"; + const char *InvalidCredentialError::MODEL_NAME = "aws.greengrass#InvalidCredentialError"; - Aws::Crt::String DeleteThingShadowResponse::GetModelName() const noexcept + Aws::Crt::String InvalidCredentialError::GetModelName() const noexcept { - return DeleteThingShadowResponse::MODEL_NAME; + return InvalidCredentialError::MODEL_NAME; } - Aws::Crt::ScopedResource DeleteThingShadowResponse::s_allocateFromPayload( + Aws::Crt::ScopedResource InvalidCredentialError::s_allocateFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) noexcept { @@ -4242,55 +4937,46 @@ namespace Aws Aws::Crt::JsonObject jsonObject(payload); Aws::Crt::JsonView jsonView(jsonObject); - Aws::Crt::ScopedResource shape( - Aws::Crt::New(allocator), DeleteThingShadowResponse::s_customDeleter); + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), InvalidCredentialError::s_customDeleter); shape->m_allocator = allocator; - DeleteThingShadowResponse::s_loadFromJsonView(*shape, jsonView); - auto operationResponse = static_cast(shape.release()); - return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + InvalidCredentialError::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } - void DeleteThingShadowResponse::s_customDeleter(DeleteThingShadowResponse *shape) noexcept + void InvalidCredentialError::s_customDeleter(InvalidCredentialError *shape) noexcept { - AbstractShapeBase::s_customDeleter(static_cast(shape)); + OperationError::s_customDeleter(static_cast(shape)); } - void DeleteThingShadowRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + void GetClientDeviceAuthTokenResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { - if (m_thingName.has_value()) - { - payloadObject.WithString("thingName", m_thingName.value()); - } - if (m_shadowName.has_value()) + if (m_clientDeviceAuthToken.has_value()) { - payloadObject.WithString("shadowName", m_shadowName.value()); + payloadObject.WithString("clientDeviceAuthToken", m_clientDeviceAuthToken.value()); } } - void DeleteThingShadowRequest::s_loadFromJsonView( - DeleteThingShadowRequest &deleteThingShadowRequest, + void GetClientDeviceAuthTokenResponse::s_loadFromJsonView( + GetClientDeviceAuthTokenResponse &getClientDeviceAuthTokenResponse, const Aws::Crt::JsonView &jsonView) noexcept { - if (jsonView.ValueExists("thingName")) - { - deleteThingShadowRequest.m_thingName = - Aws::Crt::Optional(jsonView.GetString("thingName")); - } - if (jsonView.ValueExists("shadowName")) + if (jsonView.ValueExists("clientDeviceAuthToken")) { - deleteThingShadowRequest.m_shadowName = - Aws::Crt::Optional(jsonView.GetString("shadowName")); + getClientDeviceAuthTokenResponse.m_clientDeviceAuthToken = + Aws::Crt::Optional(jsonView.GetString("clientDeviceAuthToken")); } } - const char *DeleteThingShadowRequest::MODEL_NAME = "aws.greengrass#DeleteThingShadowRequest"; + const char *GetClientDeviceAuthTokenResponse::MODEL_NAME = "aws.greengrass#GetClientDeviceAuthTokenResponse"; - Aws::Crt::String DeleteThingShadowRequest::GetModelName() const noexcept + Aws::Crt::String GetClientDeviceAuthTokenResponse::GetModelName() const noexcept { - return DeleteThingShadowRequest::MODEL_NAME; + return GetClientDeviceAuthTokenResponse::MODEL_NAME; } - Aws::Crt::ScopedResource DeleteThingShadowRequest::s_allocateFromPayload( + Aws::Crt::ScopedResource GetClientDeviceAuthTokenResponse::s_allocateFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) noexcept { @@ -4298,36 +4984,197 @@ namespace Aws Aws::Crt::JsonObject jsonObject(payload); Aws::Crt::JsonView jsonView(jsonObject); - Aws::Crt::ScopedResource shape( - Aws::Crt::New(allocator), DeleteThingShadowRequest::s_customDeleter); + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + GetClientDeviceAuthTokenResponse::s_customDeleter); shape->m_allocator = allocator; - DeleteThingShadowRequest::s_loadFromJsonView(*shape, jsonView); + GetClientDeviceAuthTokenResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } - void DeleteThingShadowRequest::s_customDeleter(DeleteThingShadowRequest *shape) noexcept + void GetClientDeviceAuthTokenResponse::s_customDeleter(GetClientDeviceAuthTokenResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } - void ResourceNotFoundError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + void GetClientDeviceAuthTokenRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { - if (m_message.has_value()) - { - payloadObject.WithString("message", m_message.value()); - } - if (m_resourceType.has_value()) - { - payloadObject.WithString("resourceType", m_resourceType.value()); - } - if (m_resourceName.has_value()) + if (m_credential.has_value()) { - payloadObject.WithString("resourceName", m_resourceName.value()); + Aws::Crt::JsonObject credentialDocumentValue; + m_credential.value().SerializeToJsonObject(credentialDocumentValue); + payloadObject.WithObject("credential", std::move(credentialDocumentValue)); } } - void ResourceNotFoundError::s_loadFromJsonView( + void GetClientDeviceAuthTokenRequest::s_loadFromJsonView( + GetClientDeviceAuthTokenRequest &getClientDeviceAuthTokenRequest, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("credential")) + { + getClientDeviceAuthTokenRequest.m_credential = CredentialDocument(); + CredentialDocument::s_loadFromJsonView( + getClientDeviceAuthTokenRequest.m_credential.value(), jsonView.GetJsonObject("credential")); + } + } + + const char *GetClientDeviceAuthTokenRequest::MODEL_NAME = "aws.greengrass#GetClientDeviceAuthTokenRequest"; + + Aws::Crt::String GetClientDeviceAuthTokenRequest::GetModelName() const noexcept + { + return GetClientDeviceAuthTokenRequest::MODEL_NAME; + } + + Aws::Crt::ScopedResource GetClientDeviceAuthTokenRequest::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + GetClientDeviceAuthTokenRequest::s_customDeleter); + shape->m_allocator = allocator; + GetClientDeviceAuthTokenRequest::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void GetClientDeviceAuthTokenRequest::s_customDeleter(GetClientDeviceAuthTokenRequest *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void DeleteThingShadowResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_payload.has_value()) + { + if (m_payload.value().size() > 0) + { + payloadObject.WithString("payload", Aws::Crt::Base64Encode(m_payload.value())); + } + } + } + + void DeleteThingShadowResponse::s_loadFromJsonView( + DeleteThingShadowResponse &deleteThingShadowResponse, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("payload")) + { + if (jsonView.GetString("payload").size() > 0) + { + deleteThingShadowResponse.m_payload = Aws::Crt::Optional>( + Aws::Crt::Base64Decode(jsonView.GetString("payload"))); + } + } + } + + const char *DeleteThingShadowResponse::MODEL_NAME = "aws.greengrass#DeleteThingShadowResponse"; + + Aws::Crt::String DeleteThingShadowResponse::GetModelName() const noexcept + { + return DeleteThingShadowResponse::MODEL_NAME; + } + + Aws::Crt::ScopedResource DeleteThingShadowResponse::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), DeleteThingShadowResponse::s_customDeleter); + shape->m_allocator = allocator; + DeleteThingShadowResponse::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void DeleteThingShadowResponse::s_customDeleter(DeleteThingShadowResponse *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void DeleteThingShadowRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_thingName.has_value()) + { + payloadObject.WithString("thingName", m_thingName.value()); + } + if (m_shadowName.has_value()) + { + payloadObject.WithString("shadowName", m_shadowName.value()); + } + } + + void DeleteThingShadowRequest::s_loadFromJsonView( + DeleteThingShadowRequest &deleteThingShadowRequest, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("thingName")) + { + deleteThingShadowRequest.m_thingName = + Aws::Crt::Optional(jsonView.GetString("thingName")); + } + if (jsonView.ValueExists("shadowName")) + { + deleteThingShadowRequest.m_shadowName = + Aws::Crt::Optional(jsonView.GetString("shadowName")); + } + } + + const char *DeleteThingShadowRequest::MODEL_NAME = "aws.greengrass#DeleteThingShadowRequest"; + + Aws::Crt::String DeleteThingShadowRequest::GetModelName() const noexcept + { + return DeleteThingShadowRequest::MODEL_NAME; + } + + Aws::Crt::ScopedResource DeleteThingShadowRequest::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), DeleteThingShadowRequest::s_customDeleter); + shape->m_allocator = allocator; + DeleteThingShadowRequest::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void DeleteThingShadowRequest::s_customDeleter(DeleteThingShadowRequest *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void ResourceNotFoundError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_message.has_value()) + { + payloadObject.WithString("message", m_message.value()); + } + if (m_resourceType.has_value()) + { + payloadObject.WithString("resourceType", m_resourceType.value()); + } + if (m_resourceName.has_value()) + { + payloadObject.WithString("resourceName", m_resourceName.value()); + } + } + + void ResourceNotFoundError::s_loadFromJsonView( ResourceNotFoundError &resourceNotFoundError, const Aws::Crt::JsonView &jsonView) noexcept { @@ -4481,52 +5328,6 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } - void InvalidArgumentsError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept - { - if (m_message.has_value()) - { - payloadObject.WithString("message", m_message.value()); - } - } - - void InvalidArgumentsError::s_loadFromJsonView( - InvalidArgumentsError &invalidArgumentsError, - const Aws::Crt::JsonView &jsonView) noexcept - { - if (jsonView.ValueExists("message")) - { - invalidArgumentsError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); - } - } - - const char *InvalidArgumentsError::MODEL_NAME = "aws.greengrass#InvalidArgumentsError"; - - Aws::Crt::String InvalidArgumentsError::GetModelName() const noexcept - { - return InvalidArgumentsError::MODEL_NAME; - } - - Aws::Crt::ScopedResource InvalidArgumentsError::s_allocateFromPayload( - Aws::Crt::StringView stringView, - Aws::Crt::Allocator *allocator) noexcept - { - Aws::Crt::String payload = {stringView.begin(), stringView.end()}; - Aws::Crt::JsonObject jsonObject(payload); - Aws::Crt::JsonView jsonView(jsonObject); - - Aws::Crt::ScopedResource shape( - Aws::Crt::New(allocator), InvalidArgumentsError::s_customDeleter); - shape->m_allocator = allocator; - InvalidArgumentsError::s_loadFromJsonView(*shape, jsonView); - auto operationResponse = static_cast(shape.release()); - return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); - } - - void InvalidArgumentsError::s_customDeleter(InvalidArgumentsError *shape) noexcept - { - OperationError::s_customDeleter(static_cast(shape)); - } - void InvalidArtifactsDirectoryPathError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { @@ -4839,6 +5640,225 @@ namespace Aws AbstractShapeBase::s_customDeleter(static_cast(shape)); } + void CreateDebugPasswordResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_password.has_value()) + { + payloadObject.WithString("password", m_password.value()); + } + if (m_username.has_value()) + { + payloadObject.WithString("username", m_username.value()); + } + if (m_passwordExpiration.has_value()) + { + payloadObject.WithDouble("passwordExpiration", m_passwordExpiration.value().SecondsWithMSPrecision()); + } + if (m_certificateSHA256Hash.has_value()) + { + payloadObject.WithString("certificateSHA256Hash", m_certificateSHA256Hash.value()); + } + if (m_certificateSHA1Hash.has_value()) + { + payloadObject.WithString("certificateSHA1Hash", m_certificateSHA1Hash.value()); + } + } + + void CreateDebugPasswordResponse::s_loadFromJsonView( + CreateDebugPasswordResponse &createDebugPasswordResponse, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("password")) + { + createDebugPasswordResponse.m_password = + Aws::Crt::Optional(jsonView.GetString("password")); + } + if (jsonView.ValueExists("username")) + { + createDebugPasswordResponse.m_username = + Aws::Crt::Optional(jsonView.GetString("username")); + } + if (jsonView.ValueExists("passwordExpiration")) + { + createDebugPasswordResponse.m_passwordExpiration = Aws::Crt::Optional( + Aws::Crt::DateTime(jsonView.GetDouble("passwordExpiration"))); + } + if (jsonView.ValueExists("certificateSHA256Hash")) + { + createDebugPasswordResponse.m_certificateSHA256Hash = + Aws::Crt::Optional(jsonView.GetString("certificateSHA256Hash")); + } + if (jsonView.ValueExists("certificateSHA1Hash")) + { + createDebugPasswordResponse.m_certificateSHA1Hash = + Aws::Crt::Optional(jsonView.GetString("certificateSHA1Hash")); + } + } + + const char *CreateDebugPasswordResponse::MODEL_NAME = "aws.greengrass#CreateDebugPasswordResponse"; + + Aws::Crt::String CreateDebugPasswordResponse::GetModelName() const noexcept + { + return CreateDebugPasswordResponse::MODEL_NAME; + } + + Aws::Crt::ScopedResource CreateDebugPasswordResponse::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), CreateDebugPasswordResponse::s_customDeleter); + shape->m_allocator = allocator; + CreateDebugPasswordResponse::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void CreateDebugPasswordResponse::s_customDeleter(CreateDebugPasswordResponse *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void CreateDebugPasswordRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + (void)payloadObject; + } + + void CreateDebugPasswordRequest::s_loadFromJsonView( + CreateDebugPasswordRequest &createDebugPasswordRequest, + const Aws::Crt::JsonView &jsonView) noexcept + { + (void)createDebugPasswordRequest; + (void)jsonView; + } + + const char *CreateDebugPasswordRequest::MODEL_NAME = "aws.greengrass#CreateDebugPasswordRequest"; + + Aws::Crt::String CreateDebugPasswordRequest::GetModelName() const noexcept + { + return CreateDebugPasswordRequest::MODEL_NAME; + } + + Aws::Crt::ScopedResource CreateDebugPasswordRequest::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), CreateDebugPasswordRequest::s_customDeleter); + shape->m_allocator = allocator; + CreateDebugPasswordRequest::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); + } + + void CreateDebugPasswordRequest::s_customDeleter(CreateDebugPasswordRequest *shape) noexcept + { + AbstractShapeBase::s_customDeleter(static_cast(shape)); + } + + void InvalidClientDeviceAuthTokenError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept + { + if (m_message.has_value()) + { + payloadObject.WithString("message", m_message.value()); + } + } + + void InvalidClientDeviceAuthTokenError::s_loadFromJsonView( + InvalidClientDeviceAuthTokenError &invalidClientDeviceAuthTokenError, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("message")) + { + invalidClientDeviceAuthTokenError.m_message = + Aws::Crt::Optional(jsonView.GetString("message")); + } + } + + const char *InvalidClientDeviceAuthTokenError::MODEL_NAME = "aws.greengrass#InvalidClientDeviceAuthTokenError"; + + Aws::Crt::String InvalidClientDeviceAuthTokenError::GetModelName() const noexcept + { + return InvalidClientDeviceAuthTokenError::MODEL_NAME; + } + + Aws::Crt::ScopedResource InvalidClientDeviceAuthTokenError::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + InvalidClientDeviceAuthTokenError::s_customDeleter); + shape->m_allocator = allocator; + InvalidClientDeviceAuthTokenError::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); + } + + void InvalidClientDeviceAuthTokenError::s_customDeleter(InvalidClientDeviceAuthTokenError *shape) noexcept + { + OperationError::s_customDeleter(static_cast(shape)); + } + + void InvalidArgumentsError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + { + if (m_message.has_value()) + { + payloadObject.WithString("message", m_message.value()); + } + } + + void InvalidArgumentsError::s_loadFromJsonView( + InvalidArgumentsError &invalidArgumentsError, + const Aws::Crt::JsonView &jsonView) noexcept + { + if (jsonView.ValueExists("message")) + { + invalidArgumentsError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); + } + } + + const char *InvalidArgumentsError::MODEL_NAME = "aws.greengrass#InvalidArgumentsError"; + + Aws::Crt::String InvalidArgumentsError::GetModelName() const noexcept + { + return InvalidArgumentsError::MODEL_NAME; + } + + Aws::Crt::ScopedResource InvalidArgumentsError::s_allocateFromPayload( + Aws::Crt::StringView stringView, + Aws::Crt::Allocator *allocator) noexcept + { + Aws::Crt::String payload = {stringView.begin(), stringView.end()}; + Aws::Crt::JsonObject jsonObject(payload); + Aws::Crt::JsonView jsonView(jsonObject); + + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), InvalidArgumentsError::s_customDeleter); + shape->m_allocator = allocator; + InvalidArgumentsError::s_loadFromJsonView(*shape, jsonView); + auto operationResponse = static_cast(shape.release()); + return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); + } + + void InvalidArgumentsError::s_customDeleter(InvalidArgumentsError *shape) noexcept + { + OperationError::s_customDeleter(static_cast(shape)); + } + void ServiceError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) @@ -4923,69 +5943,35 @@ namespace Aws OperationError::s_customDeleter(static_cast(shape)); } - void CreateDebugPasswordResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + void AuthorizeClientDeviceActionResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept { - if (m_password.has_value()) - { - payloadObject.WithString("password", m_password.value()); - } - if (m_username.has_value()) - { - payloadObject.WithString("username", m_username.value()); - } - if (m_passwordExpiration.has_value()) + if (m_isAuthorized.has_value()) { - payloadObject.WithDouble("passwordExpiration", m_passwordExpiration.value().SecondsWithMSPrecision()); - } - if (m_certificateSHA256Hash.has_value()) - { - payloadObject.WithString("certificateSHA256Hash", m_certificateSHA256Hash.value()); - } - if (m_certificateSHA1Hash.has_value()) - { - payloadObject.WithString("certificateSHA1Hash", m_certificateSHA1Hash.value()); + payloadObject.WithBool("isAuthorized", m_isAuthorized.value()); } } - void CreateDebugPasswordResponse::s_loadFromJsonView( - CreateDebugPasswordResponse &createDebugPasswordResponse, + void AuthorizeClientDeviceActionResponse::s_loadFromJsonView( + AuthorizeClientDeviceActionResponse &authorizeClientDeviceActionResponse, const Aws::Crt::JsonView &jsonView) noexcept { - if (jsonView.ValueExists("password")) - { - createDebugPasswordResponse.m_password = - Aws::Crt::Optional(jsonView.GetString("password")); - } - if (jsonView.ValueExists("username")) - { - createDebugPasswordResponse.m_username = - Aws::Crt::Optional(jsonView.GetString("username")); - } - if (jsonView.ValueExists("passwordExpiration")) + if (jsonView.ValueExists("isAuthorized")) { - createDebugPasswordResponse.m_passwordExpiration = Aws::Crt::Optional( - Aws::Crt::DateTime(jsonView.GetDouble("passwordExpiration"))); - } - if (jsonView.ValueExists("certificateSHA256Hash")) - { - createDebugPasswordResponse.m_certificateSHA256Hash = - Aws::Crt::Optional(jsonView.GetString("certificateSHA256Hash")); - } - if (jsonView.ValueExists("certificateSHA1Hash")) - { - createDebugPasswordResponse.m_certificateSHA1Hash = - Aws::Crt::Optional(jsonView.GetString("certificateSHA1Hash")); + authorizeClientDeviceActionResponse.m_isAuthorized = + Aws::Crt::Optional(jsonView.GetBool("isAuthorized")); } } - const char *CreateDebugPasswordResponse::MODEL_NAME = "aws.greengrass#CreateDebugPasswordResponse"; + const char *AuthorizeClientDeviceActionResponse::MODEL_NAME = + "aws.greengrass#AuthorizeClientDeviceActionResponse"; - Aws::Crt::String CreateDebugPasswordResponse::GetModelName() const noexcept + Aws::Crt::String AuthorizeClientDeviceActionResponse::GetModelName() const noexcept { - return CreateDebugPasswordResponse::MODEL_NAME; + return AuthorizeClientDeviceActionResponse::MODEL_NAME; } - Aws::Crt::ScopedResource CreateDebugPasswordResponse::s_allocateFromPayload( + Aws::Crt::ScopedResource AuthorizeClientDeviceActionResponse::s_allocateFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) noexcept { @@ -4993,40 +5979,67 @@ namespace Aws Aws::Crt::JsonObject jsonObject(payload); Aws::Crt::JsonView jsonView(jsonObject); - Aws::Crt::ScopedResource shape( - Aws::Crt::New(allocator), CreateDebugPasswordResponse::s_customDeleter); + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + AuthorizeClientDeviceActionResponse::s_customDeleter); shape->m_allocator = allocator; - CreateDebugPasswordResponse::s_loadFromJsonView(*shape, jsonView); + AuthorizeClientDeviceActionResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } - void CreateDebugPasswordResponse::s_customDeleter(CreateDebugPasswordResponse *shape) noexcept + void AuthorizeClientDeviceActionResponse::s_customDeleter(AuthorizeClientDeviceActionResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } - void CreateDebugPasswordRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept + void AuthorizeClientDeviceActionRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const + noexcept { - (void)payloadObject; + if (m_clientDeviceAuthToken.has_value()) + { + payloadObject.WithString("clientDeviceAuthToken", m_clientDeviceAuthToken.value()); + } + if (m_operation.has_value()) + { + payloadObject.WithString("operation", m_operation.value()); + } + if (m_resource.has_value()) + { + payloadObject.WithString("resource", m_resource.value()); + } } - void CreateDebugPasswordRequest::s_loadFromJsonView( - CreateDebugPasswordRequest &createDebugPasswordRequest, + void AuthorizeClientDeviceActionRequest::s_loadFromJsonView( + AuthorizeClientDeviceActionRequest &authorizeClientDeviceActionRequest, const Aws::Crt::JsonView &jsonView) noexcept { - (void)createDebugPasswordRequest; - (void)jsonView; + if (jsonView.ValueExists("clientDeviceAuthToken")) + { + authorizeClientDeviceActionRequest.m_clientDeviceAuthToken = + Aws::Crt::Optional(jsonView.GetString("clientDeviceAuthToken")); + } + if (jsonView.ValueExists("operation")) + { + authorizeClientDeviceActionRequest.m_operation = + Aws::Crt::Optional(jsonView.GetString("operation")); + } + if (jsonView.ValueExists("resource")) + { + authorizeClientDeviceActionRequest.m_resource = + Aws::Crt::Optional(jsonView.GetString("resource")); + } } - const char *CreateDebugPasswordRequest::MODEL_NAME = "aws.greengrass#CreateDebugPasswordRequest"; + const char *AuthorizeClientDeviceActionRequest::MODEL_NAME = + "aws.greengrass#AuthorizeClientDeviceActionRequest"; - Aws::Crt::String CreateDebugPasswordRequest::GetModelName() const noexcept + Aws::Crt::String AuthorizeClientDeviceActionRequest::GetModelName() const noexcept { - return CreateDebugPasswordRequest::MODEL_NAME; + return AuthorizeClientDeviceActionRequest::MODEL_NAME; } - Aws::Crt::ScopedResource CreateDebugPasswordRequest::s_allocateFromPayload( + Aws::Crt::ScopedResource AuthorizeClientDeviceActionRequest::s_allocateFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) noexcept { @@ -5034,15 +6047,16 @@ namespace Aws Aws::Crt::JsonObject jsonObject(payload); Aws::Crt::JsonView jsonView(jsonObject); - Aws::Crt::ScopedResource shape( - Aws::Crt::New(allocator), CreateDebugPasswordRequest::s_customDeleter); + Aws::Crt::ScopedResource shape( + Aws::Crt::New(allocator), + AuthorizeClientDeviceActionRequest::s_customDeleter); shape->m_allocator = allocator; - CreateDebugPasswordRequest::s_loadFromJsonView(*shape, jsonView); + AuthorizeClientDeviceActionRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } - void CreateDebugPasswordRequest::s_customDeleter(CreateDebugPasswordRequest *shape) noexcept + void AuthorizeClientDeviceActionRequest::s_customDeleter(AuthorizeClientDeviceActionRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } @@ -5864,6 +6878,75 @@ namespace Aws return m_operationModelContext.GetOperationName(); } + GetClientDeviceAuthTokenOperationContext::GetClientDeviceAuthTokenOperationContext( + const GreengrassCoreIpcServiceModel &serviceModel) noexcept + : OperationModelContext(serviceModel) + { + } + + Aws::Crt::ScopedResource GetClientDeviceAuthTokenOperationContext:: + AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + return GetClientDeviceAuthTokenResponse::s_allocateFromPayload(stringView, allocator); + } + + Aws::Crt::ScopedResource GetClientDeviceAuthTokenOperationContext:: + AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + (void)stringView; + (void)allocator; + return nullptr; + } + + Aws::Crt::String GetClientDeviceAuthTokenOperationContext::GetRequestModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#GetClientDeviceAuthTokenRequest"); + } + + Aws::Crt::String GetClientDeviceAuthTokenOperationContext::GetInitialResponseModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#GetClientDeviceAuthTokenResponse"); + } + + Aws::Crt::Optional GetClientDeviceAuthTokenOperationContext::GetStreamingResponseModelName() + const noexcept + { + return Aws::Crt::Optional(); + } + + Aws::Crt::String GetClientDeviceAuthTokenOperationContext::GetOperationName() const noexcept + { + return Aws::Crt::String("aws.greengrass#GetClientDeviceAuthToken"); + } + + std::future GetClientDeviceAuthTokenOperation::GetResult() noexcept + { + return std::async( + std::launch::deferred, [this]() { return GetClientDeviceAuthTokenResult(GetOperationResult().get()); }); + } + + GetClientDeviceAuthTokenOperation::GetClientDeviceAuthTokenOperation( + ClientConnection &connection, + const GetClientDeviceAuthTokenOperationContext &operationContext, + Aws::Crt::Allocator *allocator) noexcept + : ClientOperation(connection, nullptr, operationContext, allocator) + { + } + + std::future GetClientDeviceAuthTokenOperation::Activate( + const GetClientDeviceAuthTokenRequest &request, + OnMessageFlushCallback onMessageFlushCallback) noexcept + { + return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); + } + + Aws::Crt::String GetClientDeviceAuthTokenOperation::GetModelName() const noexcept + { + return m_operationModelContext.GetOperationName(); + } + PublishToTopicOperationContext::PublishToTopicOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) @@ -5933,6 +7016,253 @@ namespace Aws return m_operationModelContext.GetOperationName(); } + void SubscribeToCertificateUpdatesStreamHandler::OnStreamEvent( + Aws::Crt::ScopedResource response) + { + OnStreamEvent(static_cast(response.get())); + } + + bool SubscribeToCertificateUpdatesStreamHandler::OnStreamError( + Aws::Crt::ScopedResource operationError, + RpcError rpcError) + { + bool streamShouldTerminate = false; + if (rpcError.baseStatus != EVENT_STREAM_RPC_SUCCESS) + { + streamShouldTerminate = OnStreamError(rpcError); + } + if (operationError != nullptr && + operationError->GetModelName() == Aws::Crt::String("aws.greengrass#ServiceError") && + !streamShouldTerminate) + { + streamShouldTerminate = OnStreamError(static_cast(operationError.get())); + } + if (operationError != nullptr && + operationError->GetModelName() == Aws::Crt::String("aws.greengrass#UnauthorizedError") && + !streamShouldTerminate) + { + streamShouldTerminate = OnStreamError(static_cast(operationError.get())); + } + if (operationError != nullptr && + operationError->GetModelName() == Aws::Crt::String("aws.greengrass#InvalidArgumentsError") && + !streamShouldTerminate) + { + streamShouldTerminate = OnStreamError(static_cast(operationError.get())); + } + if (operationError != nullptr && !streamShouldTerminate) + streamShouldTerminate = OnStreamError(operationError.get()); + return streamShouldTerminate; + } + + SubscribeToCertificateUpdatesOperationContext::SubscribeToCertificateUpdatesOperationContext( + const GreengrassCoreIpcServiceModel &serviceModel) noexcept + : OperationModelContext(serviceModel) + { + } + + Aws::Crt::ScopedResource SubscribeToCertificateUpdatesOperationContext:: + AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + return SubscribeToCertificateUpdatesResponse::s_allocateFromPayload(stringView, allocator); + } + + Aws::Crt::ScopedResource SubscribeToCertificateUpdatesOperationContext:: + AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + return CertificateUpdateEvent::s_allocateFromPayload(stringView, allocator); + } + + Aws::Crt::String SubscribeToCertificateUpdatesOperationContext::GetRequestModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#SubscribeToCertificateUpdatesRequest"); + } + + Aws::Crt::String SubscribeToCertificateUpdatesOperationContext::GetInitialResponseModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#SubscribeToCertificateUpdatesResponse"); + } + + Aws::Crt::Optional SubscribeToCertificateUpdatesOperationContext:: + GetStreamingResponseModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#CertificateUpdateEvent"); + } + + Aws::Crt::String SubscribeToCertificateUpdatesOperationContext::GetOperationName() const noexcept + { + return Aws::Crt::String("aws.greengrass#SubscribeToCertificateUpdates"); + } + + std::future SubscribeToCertificateUpdatesOperation::GetResult() noexcept + { + return std::async(std::launch::deferred, [this]() { + return SubscribeToCertificateUpdatesResult(GetOperationResult().get()); + }); + } + + SubscribeToCertificateUpdatesOperation::SubscribeToCertificateUpdatesOperation( + ClientConnection &connection, + std::shared_ptr streamHandler, + const SubscribeToCertificateUpdatesOperationContext &operationContext, + Aws::Crt::Allocator *allocator) noexcept + : ClientOperation(connection, streamHandler, operationContext, allocator) + { + } + + std::future SubscribeToCertificateUpdatesOperation::Activate( + const SubscribeToCertificateUpdatesRequest &request, + OnMessageFlushCallback onMessageFlushCallback) noexcept + { + return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); + } + + Aws::Crt::String SubscribeToCertificateUpdatesOperation::GetModelName() const noexcept + { + return m_operationModelContext.GetOperationName(); + } + + VerifyClientDeviceIdentityOperationContext::VerifyClientDeviceIdentityOperationContext( + const GreengrassCoreIpcServiceModel &serviceModel) noexcept + : OperationModelContext(serviceModel) + { + } + + Aws::Crt::ScopedResource VerifyClientDeviceIdentityOperationContext:: + AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + return VerifyClientDeviceIdentityResponse::s_allocateFromPayload(stringView, allocator); + } + + Aws::Crt::ScopedResource VerifyClientDeviceIdentityOperationContext:: + AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + (void)stringView; + (void)allocator; + return nullptr; + } + + Aws::Crt::String VerifyClientDeviceIdentityOperationContext::GetRequestModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#VerifyClientDeviceIdentityRequest"); + } + + Aws::Crt::String VerifyClientDeviceIdentityOperationContext::GetInitialResponseModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#VerifyClientDeviceIdentityResponse"); + } + + Aws::Crt::Optional VerifyClientDeviceIdentityOperationContext::GetStreamingResponseModelName() + const noexcept + { + return Aws::Crt::Optional(); + } + + Aws::Crt::String VerifyClientDeviceIdentityOperationContext::GetOperationName() const noexcept + { + return Aws::Crt::String("aws.greengrass#VerifyClientDeviceIdentity"); + } + + std::future VerifyClientDeviceIdentityOperation::GetResult() noexcept + { + return std::async(std::launch::deferred, [this]() { + return VerifyClientDeviceIdentityResult(GetOperationResult().get()); + }); + } + + VerifyClientDeviceIdentityOperation::VerifyClientDeviceIdentityOperation( + ClientConnection &connection, + const VerifyClientDeviceIdentityOperationContext &operationContext, + Aws::Crt::Allocator *allocator) noexcept + : ClientOperation(connection, nullptr, operationContext, allocator) + { + } + + std::future VerifyClientDeviceIdentityOperation::Activate( + const VerifyClientDeviceIdentityRequest &request, + OnMessageFlushCallback onMessageFlushCallback) noexcept + { + return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); + } + + Aws::Crt::String VerifyClientDeviceIdentityOperation::GetModelName() const noexcept + { + return m_operationModelContext.GetOperationName(); + } + + AuthorizeClientDeviceActionOperationContext::AuthorizeClientDeviceActionOperationContext( + const GreengrassCoreIpcServiceModel &serviceModel) noexcept + : OperationModelContext(serviceModel) + { + } + + Aws::Crt::ScopedResource AuthorizeClientDeviceActionOperationContext:: + AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + return AuthorizeClientDeviceActionResponse::s_allocateFromPayload(stringView, allocator); + } + + Aws::Crt::ScopedResource AuthorizeClientDeviceActionOperationContext:: + AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const + noexcept + { + (void)stringView; + (void)allocator; + return nullptr; + } + + Aws::Crt::String AuthorizeClientDeviceActionOperationContext::GetRequestModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#AuthorizeClientDeviceActionRequest"); + } + + Aws::Crt::String AuthorizeClientDeviceActionOperationContext::GetInitialResponseModelName() const noexcept + { + return Aws::Crt::String("aws.greengrass#AuthorizeClientDeviceActionResponse"); + } + + Aws::Crt::Optional AuthorizeClientDeviceActionOperationContext:: + GetStreamingResponseModelName() const noexcept + { + return Aws::Crt::Optional(); + } + + Aws::Crt::String AuthorizeClientDeviceActionOperationContext::GetOperationName() const noexcept + { + return Aws::Crt::String("aws.greengrass#AuthorizeClientDeviceAction"); + } + + std::future AuthorizeClientDeviceActionOperation::GetResult() noexcept + { + return std::async(std::launch::deferred, [this]() { + return AuthorizeClientDeviceActionResult(GetOperationResult().get()); + }); + } + + AuthorizeClientDeviceActionOperation::AuthorizeClientDeviceActionOperation( + ClientConnection &connection, + const AuthorizeClientDeviceActionOperationContext &operationContext, + Aws::Crt::Allocator *allocator) noexcept + : ClientOperation(connection, nullptr, operationContext, allocator) + { + } + + std::future AuthorizeClientDeviceActionOperation::Activate( + const AuthorizeClientDeviceActionRequest &request, + OnMessageFlushCallback onMessageFlushCallback) noexcept + { + return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); + } + + Aws::Crt::String AuthorizeClientDeviceActionOperation::GetModelName() const noexcept + { + return m_operationModelContext.GetOperationName(); + } + ListComponentsOperationContext::ListComponentsOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) @@ -7146,7 +8476,9 @@ namespace Aws m_deleteThingShadowOperationContext(*this), m_deferComponentUpdateOperationContext(*this), m_subscribeToValidateConfigurationUpdatesOperationContext(*this), m_getConfigurationOperationContext(*this), m_subscribeToTopicOperationContext(*this), - m_getComponentDetailsOperationContext(*this), m_publishToTopicOperationContext(*this), + m_getComponentDetailsOperationContext(*this), m_getClientDeviceAuthTokenOperationContext(*this), + m_publishToTopicOperationContext(*this), m_subscribeToCertificateUpdatesOperationContext(*this), + m_verifyClientDeviceIdentityOperationContext(*this), m_authorizeClientDeviceActionOperationContext(*this), m_listComponentsOperationContext(*this), m_createDebugPasswordOperationContext(*this), m_getThingShadowOperationContext(*this), m_sendConfigurationValidityReportOperationContext(*this), m_updateThingShadowOperationContext(*this), m_updateConfigurationOperationContext(*this),