/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ /* This file is generated. */ #include #include namespace Aws { namespace Greengrass { void UserProperty::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_key.has_value()) { payloadObject.WithString("key", m_key.value()); } if (m_value.has_value()) { payloadObject.WithString("value", m_value.value()); } } void UserProperty::s_loadFromJsonView(UserProperty &userProperty, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("key")) { userProperty.m_key = Aws::Crt::Optional(jsonView.GetString("key")); } if (jsonView.ValueExists("value")) { userProperty.m_value = Aws::Crt::Optional(jsonView.GetString("value")); } } const char *UserProperty::MODEL_NAME = "aws.greengrass#UserProperty"; Aws::Crt::String UserProperty::GetModelName() const noexcept { return UserProperty::MODEL_NAME; } Aws::Crt::ScopedResource UserProperty::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), UserProperty::s_customDeleter); shape->m_allocator = allocator; UserProperty::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UserProperty::s_customDeleter(UserProperty *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } 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 DeploymentStatusDetails::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_detailedDeploymentStatus.has_value()) { payloadObject.WithString("detailedDeploymentStatus", m_detailedDeploymentStatus.value()); } if (m_deploymentErrorStack.has_value()) { Aws::Crt::JsonObject deploymentErrorStack; Aws::Crt::Vector deploymentErrorStackJsonArray; for (const auto &deploymentErrorStackItem : m_deploymentErrorStack.value()) { Aws::Crt::JsonObject deploymentErrorStackJsonArrayItem; deploymentErrorStackJsonArrayItem.AsString(deploymentErrorStackItem); deploymentErrorStackJsonArray.emplace_back(std::move(deploymentErrorStackJsonArrayItem)); } deploymentErrorStack.AsArray(std::move(deploymentErrorStackJsonArray)); payloadObject.WithObject("deploymentErrorStack", std::move(deploymentErrorStack)); } if (m_deploymentErrorTypes.has_value()) { Aws::Crt::JsonObject deploymentErrorTypes; Aws::Crt::Vector deploymentErrorTypesJsonArray; for (const auto &deploymentErrorTypesItem : m_deploymentErrorTypes.value()) { Aws::Crt::JsonObject deploymentErrorTypesJsonArrayItem; deploymentErrorTypesJsonArrayItem.AsString(deploymentErrorTypesItem); deploymentErrorTypesJsonArray.emplace_back(std::move(deploymentErrorTypesJsonArrayItem)); } deploymentErrorTypes.AsArray(std::move(deploymentErrorTypesJsonArray)); payloadObject.WithObject("deploymentErrorTypes", std::move(deploymentErrorTypes)); } if (m_deploymentFailureCause.has_value()) { payloadObject.WithString("deploymentFailureCause", m_deploymentFailureCause.value()); } } void DeploymentStatusDetails::s_loadFromJsonView( DeploymentStatusDetails &deploymentStatusDetails, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("detailedDeploymentStatus")) { deploymentStatusDetails.m_detailedDeploymentStatus = Aws::Crt::Optional(jsonView.GetString("detailedDeploymentStatus")); } if (jsonView.ValueExists("deploymentErrorStack")) { deploymentStatusDetails.m_deploymentErrorStack = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &deploymentErrorStackJsonView : jsonView.GetArray("deploymentErrorStack")) { Aws::Crt::Optional deploymentErrorStackItem; deploymentErrorStackItem = Aws::Crt::Optional(deploymentErrorStackJsonView.AsString()); deploymentStatusDetails.m_deploymentErrorStack.value().push_back(deploymentErrorStackItem.value()); } } if (jsonView.ValueExists("deploymentErrorTypes")) { deploymentStatusDetails.m_deploymentErrorTypes = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &deploymentErrorTypesJsonView : jsonView.GetArray("deploymentErrorTypes")) { Aws::Crt::Optional deploymentErrorTypesItem; deploymentErrorTypesItem = Aws::Crt::Optional(deploymentErrorTypesJsonView.AsString()); deploymentStatusDetails.m_deploymentErrorTypes.value().push_back(deploymentErrorTypesItem.value()); } } if (jsonView.ValueExists("deploymentFailureCause")) { deploymentStatusDetails.m_deploymentFailureCause = Aws::Crt::Optional(jsonView.GetString("deploymentFailureCause")); } } void DeploymentStatusDetails::SetDetailedDeploymentStatus( DetailedDeploymentStatus detailedDeploymentStatus) noexcept { switch (detailedDeploymentStatus) { case DETAILED_DEPLOYMENT_STATUS_SUCCESSFUL: m_detailedDeploymentStatus = Aws::Crt::String("SUCCESSFUL"); break; case DETAILED_DEPLOYMENT_STATUS_FAILED_NO_STATE_CHANGE: m_detailedDeploymentStatus = Aws::Crt::String("FAILED_NO_STATE_CHANGE"); break; case DETAILED_DEPLOYMENT_STATUS_FAILED_ROLLBACK_NOT_REQUESTED: m_detailedDeploymentStatus = Aws::Crt::String("FAILED_ROLLBACK_NOT_REQUESTED"); break; case DETAILED_DEPLOYMENT_STATUS_FAILED_ROLLBACK_COMPLETE: m_detailedDeploymentStatus = Aws::Crt::String("FAILED_ROLLBACK_COMPLETE"); break; case DETAILED_DEPLOYMENT_STATUS_REJECTED: m_detailedDeploymentStatus = Aws::Crt::String("REJECTED"); break; default: break; } } Aws::Crt::Optional DeploymentStatusDetails::GetDetailedDeploymentStatus() noexcept { if (!m_detailedDeploymentStatus.has_value()) return Aws::Crt::Optional(); if (m_detailedDeploymentStatus.value() == Aws::Crt::String("SUCCESSFUL")) { return Aws::Crt::Optional(DETAILED_DEPLOYMENT_STATUS_SUCCESSFUL); } if (m_detailedDeploymentStatus.value() == Aws::Crt::String("FAILED_NO_STATE_CHANGE")) { return Aws::Crt::Optional(DETAILED_DEPLOYMENT_STATUS_FAILED_NO_STATE_CHANGE); } if (m_detailedDeploymentStatus.value() == Aws::Crt::String("FAILED_ROLLBACK_NOT_REQUESTED")) { return Aws::Crt::Optional( DETAILED_DEPLOYMENT_STATUS_FAILED_ROLLBACK_NOT_REQUESTED); } if (m_detailedDeploymentStatus.value() == Aws::Crt::String("FAILED_ROLLBACK_COMPLETE")) { return Aws::Crt::Optional( DETAILED_DEPLOYMENT_STATUS_FAILED_ROLLBACK_COMPLETE); } if (m_detailedDeploymentStatus.value() == Aws::Crt::String("REJECTED")) { return Aws::Crt::Optional(DETAILED_DEPLOYMENT_STATUS_REJECTED); } return Aws::Crt::Optional(); } const char *DeploymentStatusDetails::MODEL_NAME = "aws.greengrass#DeploymentStatusDetails"; Aws::Crt::String DeploymentStatusDetails::GetModelName() const noexcept { return DeploymentStatusDetails::MODEL_NAME; } Aws::Crt::ScopedResource DeploymentStatusDetails::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), DeploymentStatusDetails::s_customDeleter); shape->m_allocator = allocator; DeploymentStatusDetails::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void DeploymentStatusDetails::s_customDeleter(DeploymentStatusDetails *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SystemResourceLimits::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_memory.has_value()) { payloadObject.WithInt64("memory", m_memory.value()); } if (m_cpus.has_value()) { payloadObject.WithDouble("cpus", m_cpus.value()); } } void SystemResourceLimits::s_loadFromJsonView( SystemResourceLimits &systemResourceLimits, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("memory")) { systemResourceLimits.m_memory = Aws::Crt::Optional(jsonView.GetInt64("memory")); } if (jsonView.ValueExists("cpus")) { systemResourceLimits.m_cpus = Aws::Crt::Optional(jsonView.GetDouble("cpus")); } } const char *SystemResourceLimits::MODEL_NAME = "aws.greengrass#SystemResourceLimits"; Aws::Crt::String SystemResourceLimits::GetModelName() const noexcept { return SystemResourceLimits::MODEL_NAME; } Aws::Crt::ScopedResource SystemResourceLimits::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), SystemResourceLimits::s_customDeleter); shape->m_allocator = allocator; SystemResourceLimits::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SystemResourceLimits::s_customDeleter(SystemResourceLimits *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ValidateConfigurationUpdateEvent::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_configuration.has_value()) { payloadObject.WithObject("configuration", m_configuration.value()); } if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } } void ValidateConfigurationUpdateEvent::s_loadFromJsonView( ValidateConfigurationUpdateEvent &validateConfigurationUpdateEvent, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("configuration")) { validateConfigurationUpdateEvent.m_configuration = Aws::Crt::Optional(jsonView.GetJsonObject("configuration").Materialize()); } if (jsonView.ValueExists("deploymentId")) { validateConfigurationUpdateEvent.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } } const char *ValidateConfigurationUpdateEvent::MODEL_NAME = "aws.greengrass#ValidateConfigurationUpdateEvent"; Aws::Crt::String ValidateConfigurationUpdateEvent::GetModelName() const noexcept { return ValidateConfigurationUpdateEvent::MODEL_NAME; } Aws::Crt::ScopedResource ValidateConfigurationUpdateEvent::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), ValidateConfigurationUpdateEvent::s_customDeleter); shape->m_allocator = allocator; ValidateConfigurationUpdateEvent::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ValidateConfigurationUpdateEvent::s_customDeleter(ValidateConfigurationUpdateEvent *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void BinaryMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { if (m_message.value().size() > 0) { 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( BinaryMessage &binaryMessage, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { if (jsonView.GetString("message").size() > 0) { binaryMessage.m_message = Aws::Crt::Optional>( 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"; Aws::Crt::String BinaryMessage::GetModelName() const noexcept { return BinaryMessage::MODEL_NAME; } Aws::Crt::ScopedResource BinaryMessage::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), BinaryMessage::s_customDeleter); shape->m_allocator = allocator; BinaryMessage::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void BinaryMessage::s_customDeleter(BinaryMessage *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void JsonMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { 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 { if (jsonView.ValueExists("message")) { 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"; Aws::Crt::String JsonMessage::GetModelName() const noexcept { return JsonMessage::MODEL_NAME; } Aws::Crt::ScopedResource JsonMessage::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), JsonMessage::s_customDeleter); shape->m_allocator = allocator; JsonMessage::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void JsonMessage::s_customDeleter(JsonMessage *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void MQTTMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_topicName.has_value()) { payloadObject.WithString("topicName", m_topicName.value()); } if (m_payload.has_value()) { if (m_payload.value().size() > 0) { payloadObject.WithString("payload", Aws::Crt::Base64Encode(m_payload.value())); } } if (m_retain.has_value()) { payloadObject.WithBool("retain", m_retain.value()); } if (m_userProperties.has_value()) { Aws::Crt::JsonObject listOfUserProperties; Aws::Crt::Vector listOfUserPropertiesJsonArray; for (const auto &listOfUserPropertiesItem : m_userProperties.value()) { Aws::Crt::JsonObject listOfUserPropertiesJsonArrayItem; listOfUserPropertiesItem.SerializeToJsonObject(listOfUserPropertiesJsonArrayItem); listOfUserPropertiesJsonArray.emplace_back(std::move(listOfUserPropertiesJsonArrayItem)); } listOfUserProperties.AsArray(std::move(listOfUserPropertiesJsonArray)); payloadObject.WithObject("userProperties", std::move(listOfUserProperties)); } if (m_messageExpiryIntervalSeconds.has_value()) { payloadObject.WithInt64("messageExpiryIntervalSeconds", m_messageExpiryIntervalSeconds.value()); } if (m_correlationData.has_value()) { if (m_correlationData.value().size() > 0) { payloadObject.WithString("correlationData", Aws::Crt::Base64Encode(m_correlationData.value())); } } if (m_responseTopic.has_value()) { payloadObject.WithString("responseTopic", m_responseTopic.value()); } if (m_payloadFormat.has_value()) { payloadObject.WithString("payloadFormat", m_payloadFormat.value()); } if (m_contentType.has_value()) { payloadObject.WithString("contentType", m_contentType.value()); } } void MQTTMessage::s_loadFromJsonView(MQTTMessage &mQTTMessage, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("topicName")) { mQTTMessage.m_topicName = Aws::Crt::Optional(jsonView.GetString("topicName")); } if (jsonView.ValueExists("payload")) { if (jsonView.GetString("payload").size() > 0) { mQTTMessage.m_payload = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("payload"))); } } if (jsonView.ValueExists("retain")) { mQTTMessage.m_retain = Aws::Crt::Optional(jsonView.GetBool("retain")); } if (jsonView.ValueExists("userProperties")) { mQTTMessage.m_userProperties = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &listOfUserPropertiesJsonView : jsonView.GetArray("userProperties")) { Aws::Crt::Optional listOfUserPropertiesItem; listOfUserPropertiesItem = UserProperty(); UserProperty::s_loadFromJsonView(listOfUserPropertiesItem.value(), listOfUserPropertiesJsonView); mQTTMessage.m_userProperties.value().push_back(listOfUserPropertiesItem.value()); } } if (jsonView.ValueExists("messageExpiryIntervalSeconds")) { mQTTMessage.m_messageExpiryIntervalSeconds = Aws::Crt::Optional(jsonView.GetInt64("messageExpiryIntervalSeconds")); } if (jsonView.ValueExists("correlationData")) { if (jsonView.GetString("correlationData").size() > 0) { mQTTMessage.m_correlationData = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("correlationData"))); } } if (jsonView.ValueExists("responseTopic")) { mQTTMessage.m_responseTopic = Aws::Crt::Optional(jsonView.GetString("responseTopic")); } if (jsonView.ValueExists("payloadFormat")) { mQTTMessage.m_payloadFormat = Aws::Crt::Optional(jsonView.GetString("payloadFormat")); } if (jsonView.ValueExists("contentType")) { mQTTMessage.m_contentType = Aws::Crt::Optional(jsonView.GetString("contentType")); } } void MQTTMessage::SetPayloadFormat(PayloadFormat payloadFormat) noexcept { switch (payloadFormat) { case PAYLOAD_FORMAT_BYTES: m_payloadFormat = Aws::Crt::String("0"); break; case PAYLOAD_FORMAT_UTF8: m_payloadFormat = Aws::Crt::String("1"); break; default: break; } } Aws::Crt::Optional MQTTMessage::GetPayloadFormat() noexcept { if (!m_payloadFormat.has_value()) return Aws::Crt::Optional(); if (m_payloadFormat.value() == Aws::Crt::String("0")) { return Aws::Crt::Optional(PAYLOAD_FORMAT_BYTES); } if (m_payloadFormat.value() == Aws::Crt::String("1")) { return Aws::Crt::Optional(PAYLOAD_FORMAT_UTF8); } return Aws::Crt::Optional(); } const char *MQTTMessage::MODEL_NAME = "aws.greengrass#MQTTMessage"; Aws::Crt::String MQTTMessage::GetModelName() const noexcept { return MQTTMessage::MODEL_NAME; } Aws::Crt::ScopedResource MQTTMessage::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), MQTTMessage::s_customDeleter); shape->m_allocator = allocator; MQTTMessage::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void MQTTMessage::s_customDeleter(MQTTMessage *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ConfigurationUpdateEvent::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } if (m_keyPath.has_value()) { Aws::Crt::JsonObject keyPath; Aws::Crt::Vector keyPathJsonArray; for (const auto &keyPathItem : m_keyPath.value()) { Aws::Crt::JsonObject keyPathJsonArrayItem; keyPathJsonArrayItem.AsString(keyPathItem); keyPathJsonArray.emplace_back(std::move(keyPathJsonArrayItem)); } keyPath.AsArray(std::move(keyPathJsonArray)); payloadObject.WithObject("keyPath", std::move(keyPath)); } } void ConfigurationUpdateEvent::s_loadFromJsonView( ConfigurationUpdateEvent &configurationUpdateEvent, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { configurationUpdateEvent.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } if (jsonView.ValueExists("keyPath")) { configurationUpdateEvent.m_keyPath = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath")) { Aws::Crt::Optional keyPathItem; keyPathItem = Aws::Crt::Optional(keyPathJsonView.AsString()); configurationUpdateEvent.m_keyPath.value().push_back(keyPathItem.value()); } } } const char *ConfigurationUpdateEvent::MODEL_NAME = "aws.greengrass#ConfigurationUpdateEvent"; Aws::Crt::String ConfigurationUpdateEvent::GetModelName() const noexcept { return ConfigurationUpdateEvent::MODEL_NAME; } Aws::Crt::ScopedResource ConfigurationUpdateEvent::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), ConfigurationUpdateEvent::s_customDeleter); shape->m_allocator = allocator; ConfigurationUpdateEvent::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ConfigurationUpdateEvent::s_customDeleter(ConfigurationUpdateEvent *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PostComponentUpdateEvent::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } } void PostComponentUpdateEvent::s_loadFromJsonView( PostComponentUpdateEvent &postComponentUpdateEvent, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { postComponentUpdateEvent.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } } const char *PostComponentUpdateEvent::MODEL_NAME = "aws.greengrass#PostComponentUpdateEvent"; Aws::Crt::String PostComponentUpdateEvent::GetModelName() const noexcept { return PostComponentUpdateEvent::MODEL_NAME; } Aws::Crt::ScopedResource PostComponentUpdateEvent::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), PostComponentUpdateEvent::s_customDeleter); shape->m_allocator = allocator; PostComponentUpdateEvent::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PostComponentUpdateEvent::s_customDeleter(PostComponentUpdateEvent *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PreComponentUpdateEvent::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } if (m_isGgcRestarting.has_value()) { payloadObject.WithBool("isGgcRestarting", m_isGgcRestarting.value()); } } void PreComponentUpdateEvent::s_loadFromJsonView( PreComponentUpdateEvent &preComponentUpdateEvent, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { preComponentUpdateEvent.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } if (jsonView.ValueExists("isGgcRestarting")) { preComponentUpdateEvent.m_isGgcRestarting = Aws::Crt::Optional(jsonView.GetBool("isGgcRestarting")); } } const char *PreComponentUpdateEvent::MODEL_NAME = "aws.greengrass#PreComponentUpdateEvent"; Aws::Crt::String PreComponentUpdateEvent::GetModelName() const noexcept { return PreComponentUpdateEvent::MODEL_NAME; } Aws::Crt::ScopedResource PreComponentUpdateEvent::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), PreComponentUpdateEvent::s_customDeleter); shape->m_allocator = allocator; PreComponentUpdateEvent::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PreComponentUpdateEvent::s_customDeleter(PreComponentUpdateEvent *shape) noexcept { 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 Metric::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_name.has_value()) { payloadObject.WithString("name", m_name.value()); } if (m_unit.has_value()) { payloadObject.WithString("unit", m_unit.value()); } if (m_value.has_value()) { payloadObject.WithDouble("value", m_value.value()); } } void Metric::s_loadFromJsonView(Metric &metric, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("name")) { metric.m_name = Aws::Crt::Optional(jsonView.GetString("name")); } if (jsonView.ValueExists("unit")) { metric.m_unit = Aws::Crt::Optional(jsonView.GetString("unit")); } if (jsonView.ValueExists("value")) { metric.m_value = Aws::Crt::Optional(jsonView.GetDouble("value")); } } void Metric::SetUnit(MetricUnitType unit) noexcept { switch (unit) { case METRIC_UNIT_TYPE_BYTES: m_unit = Aws::Crt::String("BYTES"); break; case METRIC_UNIT_TYPE_BYTES_PER_SECOND: m_unit = Aws::Crt::String("BYTES_PER_SECOND"); break; case METRIC_UNIT_TYPE_COUNT: m_unit = Aws::Crt::String("COUNT"); break; case METRIC_UNIT_TYPE_COUNT_PER_SECOND: m_unit = Aws::Crt::String("COUNT_PER_SECOND"); break; case METRIC_UNIT_TYPE_MEGABYTES: m_unit = Aws::Crt::String("MEGABYTES"); break; case METRIC_UNIT_TYPE_SECONDS: m_unit = Aws::Crt::String("SECONDS"); break; default: break; } } Aws::Crt::Optional Metric::GetUnit() noexcept { if (!m_unit.has_value()) return Aws::Crt::Optional(); if (m_unit.value() == Aws::Crt::String("BYTES")) { return Aws::Crt::Optional(METRIC_UNIT_TYPE_BYTES); } if (m_unit.value() == Aws::Crt::String("BYTES_PER_SECOND")) { return Aws::Crt::Optional(METRIC_UNIT_TYPE_BYTES_PER_SECOND); } if (m_unit.value() == Aws::Crt::String("COUNT")) { return Aws::Crt::Optional(METRIC_UNIT_TYPE_COUNT); } if (m_unit.value() == Aws::Crt::String("COUNT_PER_SECOND")) { return Aws::Crt::Optional(METRIC_UNIT_TYPE_COUNT_PER_SECOND); } if (m_unit.value() == Aws::Crt::String("MEGABYTES")) { return Aws::Crt::Optional(METRIC_UNIT_TYPE_MEGABYTES); } if (m_unit.value() == Aws::Crt::String("SECONDS")) { return Aws::Crt::Optional(METRIC_UNIT_TYPE_SECONDS); } return Aws::Crt::Optional(); } const char *Metric::MODEL_NAME = "aws.greengrass#Metric"; Aws::Crt::String Metric::GetModelName() const noexcept { return Metric::MODEL_NAME; } Aws::Crt::ScopedResource Metric::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), Metric::s_customDeleter); shape->m_allocator = allocator; Metric::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void Metric::s_customDeleter(Metric *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void LocalDeployment::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } if (m_status.has_value()) { payloadObject.WithString("status", m_status.value()); } if (m_createdOn.has_value()) { payloadObject.WithString("createdOn", m_createdOn.value()); } if (m_deploymentStatusDetails.has_value()) { Aws::Crt::JsonObject deploymentStatusDetailsValue; m_deploymentStatusDetails.value().SerializeToJsonObject(deploymentStatusDetailsValue); payloadObject.WithObject("deploymentStatusDetails", std::move(deploymentStatusDetailsValue)); } } void LocalDeployment::s_loadFromJsonView( LocalDeployment &localDeployment, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { localDeployment.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } if (jsonView.ValueExists("status")) { localDeployment.m_status = Aws::Crt::Optional(jsonView.GetString("status")); } if (jsonView.ValueExists("createdOn")) { localDeployment.m_createdOn = Aws::Crt::Optional(jsonView.GetString("createdOn")); } if (jsonView.ValueExists("deploymentStatusDetails")) { localDeployment.m_deploymentStatusDetails = DeploymentStatusDetails(); DeploymentStatusDetails::s_loadFromJsonView( localDeployment.m_deploymentStatusDetails.value(), jsonView.GetJsonObject("deploymentStatusDetails")); } } void LocalDeployment::SetStatus(DeploymentStatus status) noexcept { switch (status) { case DEPLOYMENT_STATUS_QUEUED: m_status = Aws::Crt::String("QUEUED"); break; case DEPLOYMENT_STATUS_IN_PROGRESS: m_status = Aws::Crt::String("IN_PROGRESS"); break; case DEPLOYMENT_STATUS_SUCCEEDED: m_status = Aws::Crt::String("SUCCEEDED"); break; case DEPLOYMENT_STATUS_FAILED: m_status = Aws::Crt::String("FAILED"); break; case DEPLOYMENT_STATUS_CANCELED: m_status = Aws::Crt::String("CANCELED"); break; default: break; } } Aws::Crt::Optional LocalDeployment::GetStatus() noexcept { if (!m_status.has_value()) return Aws::Crt::Optional(); if (m_status.value() == Aws::Crt::String("QUEUED")) { return Aws::Crt::Optional(DEPLOYMENT_STATUS_QUEUED); } if (m_status.value() == Aws::Crt::String("IN_PROGRESS")) { return Aws::Crt::Optional(DEPLOYMENT_STATUS_IN_PROGRESS); } if (m_status.value() == Aws::Crt::String("SUCCEEDED")) { return Aws::Crt::Optional(DEPLOYMENT_STATUS_SUCCEEDED); } if (m_status.value() == Aws::Crt::String("FAILED")) { return Aws::Crt::Optional(DEPLOYMENT_STATUS_FAILED); } if (m_status.value() == Aws::Crt::String("CANCELED")) { return Aws::Crt::Optional(DEPLOYMENT_STATUS_CANCELED); } return Aws::Crt::Optional(); } const char *LocalDeployment::MODEL_NAME = "aws.greengrass#LocalDeployment"; Aws::Crt::String LocalDeployment::GetModelName() const noexcept { return LocalDeployment::MODEL_NAME; } Aws::Crt::ScopedResource LocalDeployment::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), LocalDeployment::s_customDeleter); shape->m_allocator = allocator; LocalDeployment::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void LocalDeployment::s_customDeleter(LocalDeployment *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ComponentDetails::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } if (m_version.has_value()) { payloadObject.WithString("version", m_version.value()); } if (m_state.has_value()) { payloadObject.WithString("state", m_state.value()); } if (m_configuration.has_value()) { payloadObject.WithObject("configuration", m_configuration.value()); } } void ComponentDetails::s_loadFromJsonView( ComponentDetails &componentDetails, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { componentDetails.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } if (jsonView.ValueExists("version")) { componentDetails.m_version = Aws::Crt::Optional(jsonView.GetString("version")); } if (jsonView.ValueExists("state")) { componentDetails.m_state = Aws::Crt::Optional(jsonView.GetString("state")); } if (jsonView.ValueExists("configuration")) { componentDetails.m_configuration = Aws::Crt::Optional(jsonView.GetJsonObject("configuration").Materialize()); } } void ComponentDetails::SetState(LifecycleState state) noexcept { switch (state) { case LIFECYCLE_STATE_RUNNING: m_state = Aws::Crt::String("RUNNING"); break; case LIFECYCLE_STATE_ERRORED: m_state = Aws::Crt::String("ERRORED"); break; case LIFECYCLE_STATE_NEW: m_state = Aws::Crt::String("NEW"); break; case LIFECYCLE_STATE_FINISHED: m_state = Aws::Crt::String("FINISHED"); break; case LIFECYCLE_STATE_INSTALLED: m_state = Aws::Crt::String("INSTALLED"); break; case LIFECYCLE_STATE_BROKEN: m_state = Aws::Crt::String("BROKEN"); break; case LIFECYCLE_STATE_STARTING: m_state = Aws::Crt::String("STARTING"); break; case LIFECYCLE_STATE_STOPPING: m_state = Aws::Crt::String("STOPPING"); break; default: break; } } Aws::Crt::Optional ComponentDetails::GetState() noexcept { if (!m_state.has_value()) return Aws::Crt::Optional(); if (m_state.value() == Aws::Crt::String("RUNNING")) { return Aws::Crt::Optional(LIFECYCLE_STATE_RUNNING); } if (m_state.value() == Aws::Crt::String("ERRORED")) { return Aws::Crt::Optional(LIFECYCLE_STATE_ERRORED); } if (m_state.value() == Aws::Crt::String("NEW")) { return Aws::Crt::Optional(LIFECYCLE_STATE_NEW); } if (m_state.value() == Aws::Crt::String("FINISHED")) { return Aws::Crt::Optional(LIFECYCLE_STATE_FINISHED); } if (m_state.value() == Aws::Crt::String("INSTALLED")) { return Aws::Crt::Optional(LIFECYCLE_STATE_INSTALLED); } if (m_state.value() == Aws::Crt::String("BROKEN")) { return Aws::Crt::Optional(LIFECYCLE_STATE_BROKEN); } if (m_state.value() == Aws::Crt::String("STARTING")) { return Aws::Crt::Optional(LIFECYCLE_STATE_STARTING); } if (m_state.value() == Aws::Crt::String("STOPPING")) { return Aws::Crt::Optional(LIFECYCLE_STATE_STOPPING); } return Aws::Crt::Optional(); } const char *ComponentDetails::MODEL_NAME = "aws.greengrass#ComponentDetails"; Aws::Crt::String ComponentDetails::GetModelName() const noexcept { return ComponentDetails::MODEL_NAME; } Aws::Crt::ScopedResource ComponentDetails::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), ComponentDetails::s_customDeleter); shape->m_allocator = allocator; ComponentDetails::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ComponentDetails::s_customDeleter(ComponentDetails *shape) noexcept { 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()) { payloadObject.WithString("posixUser", m_posixUser.value()); } if (m_windowsUser.has_value()) { payloadObject.WithString("windowsUser", m_windowsUser.value()); } if (m_systemResourceLimits.has_value()) { Aws::Crt::JsonObject systemResourceLimitsValue; m_systemResourceLimits.value().SerializeToJsonObject(systemResourceLimitsValue); payloadObject.WithObject("systemResourceLimits", std::move(systemResourceLimitsValue)); } } void RunWithInfo::s_loadFromJsonView(RunWithInfo &runWithInfo, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("posixUser")) { runWithInfo.m_posixUser = Aws::Crt::Optional(jsonView.GetString("posixUser")); } if (jsonView.ValueExists("windowsUser")) { runWithInfo.m_windowsUser = Aws::Crt::Optional(jsonView.GetString("windowsUser")); } if (jsonView.ValueExists("systemResourceLimits")) { runWithInfo.m_systemResourceLimits = SystemResourceLimits(); SystemResourceLimits::s_loadFromJsonView( runWithInfo.m_systemResourceLimits.value(), jsonView.GetJsonObject("systemResourceLimits")); } } const char *RunWithInfo::MODEL_NAME = "aws.greengrass#RunWithInfo"; Aws::Crt::String RunWithInfo::GetModelName() const noexcept { return RunWithInfo::MODEL_NAME; } Aws::Crt::ScopedResource RunWithInfo::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), RunWithInfo::s_customDeleter); shape->m_allocator = allocator; RunWithInfo::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void RunWithInfo::s_customDeleter(RunWithInfo *shape) noexcept { 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 { if (m_chosenMember == TAG_VALIDATE_CONFIGURATION_UPDATE_EVENT && m_validateConfigurationUpdateEvent.has_value()) { Aws::Crt::JsonObject validateConfigurationUpdateEventValue; m_validateConfigurationUpdateEvent.value().SerializeToJsonObject(validateConfigurationUpdateEventValue); payloadObject.WithObject( "validateConfigurationUpdateEvent", std::move(validateConfigurationUpdateEventValue)); } } void ValidateConfigurationUpdateEvents::s_loadFromJsonView( ValidateConfigurationUpdateEvents &validateConfigurationUpdateEvents, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("validateConfigurationUpdateEvent")) { validateConfigurationUpdateEvents.m_validateConfigurationUpdateEvent = ValidateConfigurationUpdateEvent(); ValidateConfigurationUpdateEvent::s_loadFromJsonView( validateConfigurationUpdateEvents.m_validateConfigurationUpdateEvent.value(), jsonView.GetJsonObject("validateConfigurationUpdateEvent")); validateConfigurationUpdateEvents.m_chosenMember = TAG_VALIDATE_CONFIGURATION_UPDATE_EVENT; } } ValidateConfigurationUpdateEvents &ValidateConfigurationUpdateEvents::operator=( const ValidateConfigurationUpdateEvents &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_VALIDATE_CONFIGURATION_UPDATE_EVENT) { m_validateConfigurationUpdateEvent = objectToCopy.m_validateConfigurationUpdateEvent; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *ValidateConfigurationUpdateEvents::MODEL_NAME = "aws.greengrass#ValidateConfigurationUpdateEvents"; Aws::Crt::String ValidateConfigurationUpdateEvents::GetModelName() const noexcept { return ValidateConfigurationUpdateEvents::MODEL_NAME; } Aws::Crt::ScopedResource ValidateConfigurationUpdateEvents::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), ValidateConfigurationUpdateEvents::s_customDeleter); shape->m_allocator = allocator; ValidateConfigurationUpdateEvents::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ValidateConfigurationUpdateEvents::s_customDeleter(ValidateConfigurationUpdateEvents *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscriptionResponseMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_JSON_MESSAGE && m_jsonMessage.has_value()) { Aws::Crt::JsonObject jsonMessageValue; m_jsonMessage.value().SerializeToJsonObject(jsonMessageValue); payloadObject.WithObject("jsonMessage", std::move(jsonMessageValue)); } else if (m_chosenMember == TAG_BINARY_MESSAGE && m_binaryMessage.has_value()) { Aws::Crt::JsonObject binaryMessageValue; m_binaryMessage.value().SerializeToJsonObject(binaryMessageValue); payloadObject.WithObject("binaryMessage", std::move(binaryMessageValue)); } } void SubscriptionResponseMessage::s_loadFromJsonView( SubscriptionResponseMessage &subscriptionResponseMessage, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("jsonMessage")) { subscriptionResponseMessage.m_jsonMessage = JsonMessage(); JsonMessage::s_loadFromJsonView( subscriptionResponseMessage.m_jsonMessage.value(), jsonView.GetJsonObject("jsonMessage")); subscriptionResponseMessage.m_chosenMember = TAG_JSON_MESSAGE; } else if (jsonView.ValueExists("binaryMessage")) { subscriptionResponseMessage.m_binaryMessage = BinaryMessage(); BinaryMessage::s_loadFromJsonView( subscriptionResponseMessage.m_binaryMessage.value(), jsonView.GetJsonObject("binaryMessage")); subscriptionResponseMessage.m_chosenMember = TAG_BINARY_MESSAGE; } } SubscriptionResponseMessage &SubscriptionResponseMessage::operator=( const SubscriptionResponseMessage &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_JSON_MESSAGE) { m_jsonMessage = objectToCopy.m_jsonMessage; m_chosenMember = objectToCopy.m_chosenMember; } else if (objectToCopy.m_chosenMember == TAG_BINARY_MESSAGE) { m_binaryMessage = objectToCopy.m_binaryMessage; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *SubscriptionResponseMessage::MODEL_NAME = "aws.greengrass#SubscriptionResponseMessage"; Aws::Crt::String SubscriptionResponseMessage::GetModelName() const noexcept { return SubscriptionResponseMessage::MODEL_NAME; } Aws::Crt::ScopedResource SubscriptionResponseMessage::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), SubscriptionResponseMessage::s_customDeleter); shape->m_allocator = allocator; SubscriptionResponseMessage::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscriptionResponseMessage::s_customDeleter(SubscriptionResponseMessage *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void IoTCoreMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_MESSAGE && m_message.has_value()) { Aws::Crt::JsonObject mQTTMessageValue; m_message.value().SerializeToJsonObject(mQTTMessageValue); payloadObject.WithObject("message", std::move(mQTTMessageValue)); } } void IoTCoreMessage::s_loadFromJsonView( IoTCoreMessage &ioTCoreMessage, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { ioTCoreMessage.m_message = MQTTMessage(); MQTTMessage::s_loadFromJsonView(ioTCoreMessage.m_message.value(), jsonView.GetJsonObject("message")); ioTCoreMessage.m_chosenMember = TAG_MESSAGE; } } IoTCoreMessage &IoTCoreMessage::operator=(const IoTCoreMessage &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_MESSAGE) { m_message = objectToCopy.m_message; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *IoTCoreMessage::MODEL_NAME = "aws.greengrass#IoTCoreMessage"; Aws::Crt::String IoTCoreMessage::GetModelName() const noexcept { return IoTCoreMessage::MODEL_NAME; } Aws::Crt::ScopedResource IoTCoreMessage::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), IoTCoreMessage::s_customDeleter); shape->m_allocator = allocator; IoTCoreMessage::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void IoTCoreMessage::s_customDeleter(IoTCoreMessage *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ConfigurationUpdateEvents::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_CONFIGURATION_UPDATE_EVENT && m_configurationUpdateEvent.has_value()) { Aws::Crt::JsonObject configurationUpdateEventValue; m_configurationUpdateEvent.value().SerializeToJsonObject(configurationUpdateEventValue); payloadObject.WithObject("configurationUpdateEvent", std::move(configurationUpdateEventValue)); } } void ConfigurationUpdateEvents::s_loadFromJsonView( ConfigurationUpdateEvents &configurationUpdateEvents, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("configurationUpdateEvent")) { configurationUpdateEvents.m_configurationUpdateEvent = ConfigurationUpdateEvent(); ConfigurationUpdateEvent::s_loadFromJsonView( configurationUpdateEvents.m_configurationUpdateEvent.value(), jsonView.GetJsonObject("configurationUpdateEvent")); configurationUpdateEvents.m_chosenMember = TAG_CONFIGURATION_UPDATE_EVENT; } } ConfigurationUpdateEvents &ConfigurationUpdateEvents::operator=( const ConfigurationUpdateEvents &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_CONFIGURATION_UPDATE_EVENT) { m_configurationUpdateEvent = objectToCopy.m_configurationUpdateEvent; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *ConfigurationUpdateEvents::MODEL_NAME = "aws.greengrass#ConfigurationUpdateEvents"; Aws::Crt::String ConfigurationUpdateEvents::GetModelName() const noexcept { return ConfigurationUpdateEvents::MODEL_NAME; } Aws::Crt::ScopedResource ConfigurationUpdateEvents::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), ConfigurationUpdateEvents::s_customDeleter); shape->m_allocator = allocator; ConfigurationUpdateEvents::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ConfigurationUpdateEvents::s_customDeleter(ConfigurationUpdateEvents *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ComponentUpdatePolicyEvents::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_PRE_UPDATE_EVENT && m_preUpdateEvent.has_value()) { Aws::Crt::JsonObject preComponentUpdateEventValue; m_preUpdateEvent.value().SerializeToJsonObject(preComponentUpdateEventValue); payloadObject.WithObject("preUpdateEvent", std::move(preComponentUpdateEventValue)); } else if (m_chosenMember == TAG_POST_UPDATE_EVENT && m_postUpdateEvent.has_value()) { Aws::Crt::JsonObject postComponentUpdateEventValue; m_postUpdateEvent.value().SerializeToJsonObject(postComponentUpdateEventValue); payloadObject.WithObject("postUpdateEvent", std::move(postComponentUpdateEventValue)); } } void ComponentUpdatePolicyEvents::s_loadFromJsonView( ComponentUpdatePolicyEvents &componentUpdatePolicyEvents, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("preUpdateEvent")) { componentUpdatePolicyEvents.m_preUpdateEvent = PreComponentUpdateEvent(); PreComponentUpdateEvent::s_loadFromJsonView( componentUpdatePolicyEvents.m_preUpdateEvent.value(), jsonView.GetJsonObject("preUpdateEvent")); componentUpdatePolicyEvents.m_chosenMember = TAG_PRE_UPDATE_EVENT; } else if (jsonView.ValueExists("postUpdateEvent")) { componentUpdatePolicyEvents.m_postUpdateEvent = PostComponentUpdateEvent(); PostComponentUpdateEvent::s_loadFromJsonView( componentUpdatePolicyEvents.m_postUpdateEvent.value(), jsonView.GetJsonObject("postUpdateEvent")); componentUpdatePolicyEvents.m_chosenMember = TAG_POST_UPDATE_EVENT; } } ComponentUpdatePolicyEvents &ComponentUpdatePolicyEvents::operator=( const ComponentUpdatePolicyEvents &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_PRE_UPDATE_EVENT) { m_preUpdateEvent = objectToCopy.m_preUpdateEvent; m_chosenMember = objectToCopy.m_chosenMember; } else if (objectToCopy.m_chosenMember == TAG_POST_UPDATE_EVENT) { m_postUpdateEvent = objectToCopy.m_postUpdateEvent; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *ComponentUpdatePolicyEvents::MODEL_NAME = "aws.greengrass#ComponentUpdatePolicyEvents"; Aws::Crt::String ComponentUpdatePolicyEvents::GetModelName() const noexcept { return ComponentUpdatePolicyEvents::MODEL_NAME; } Aws::Crt::ScopedResource ComponentUpdatePolicyEvents::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), ComponentUpdatePolicyEvents::s_customDeleter); shape->m_allocator = allocator; ComponentUpdatePolicyEvents::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ComponentUpdatePolicyEvents::s_customDeleter(ComponentUpdatePolicyEvents *shape) noexcept { 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()) { payloadObject.WithString("status", m_status.value()); } if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void ConfigurationValidityReport::s_loadFromJsonView( ConfigurationValidityReport &configurationValidityReport, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("status")) { configurationValidityReport.m_status = Aws::Crt::Optional(jsonView.GetString("status")); } if (jsonView.ValueExists("deploymentId")) { configurationValidityReport.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } if (jsonView.ValueExists("message")) { configurationValidityReport.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } void ConfigurationValidityReport::SetStatus(ConfigurationValidityStatus status) noexcept { switch (status) { case CONFIGURATION_VALIDITY_STATUS_ACCEPTED: m_status = Aws::Crt::String("ACCEPTED"); break; case CONFIGURATION_VALIDITY_STATUS_REJECTED: m_status = Aws::Crt::String("REJECTED"); break; default: break; } } Aws::Crt::Optional ConfigurationValidityReport::GetStatus() noexcept { if (!m_status.has_value()) return Aws::Crt::Optional(); if (m_status.value() == Aws::Crt::String("ACCEPTED")) { return Aws::Crt::Optional(CONFIGURATION_VALIDITY_STATUS_ACCEPTED); } if (m_status.value() == Aws::Crt::String("REJECTED")) { return Aws::Crt::Optional(CONFIGURATION_VALIDITY_STATUS_REJECTED); } return Aws::Crt::Optional(); } const char *ConfigurationValidityReport::MODEL_NAME = "aws.greengrass#ConfigurationValidityReport"; Aws::Crt::String ConfigurationValidityReport::GetModelName() const noexcept { return ConfigurationValidityReport::MODEL_NAME; } Aws::Crt::ScopedResource ConfigurationValidityReport::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), ConfigurationValidityReport::s_customDeleter); shape->m_allocator = allocator; ConfigurationValidityReport::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ConfigurationValidityReport::s_customDeleter(ConfigurationValidityReport *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PublishMessage::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_JSON_MESSAGE && m_jsonMessage.has_value()) { Aws::Crt::JsonObject jsonMessageValue; m_jsonMessage.value().SerializeToJsonObject(jsonMessageValue); payloadObject.WithObject("jsonMessage", std::move(jsonMessageValue)); } else if (m_chosenMember == TAG_BINARY_MESSAGE && m_binaryMessage.has_value()) { Aws::Crt::JsonObject binaryMessageValue; m_binaryMessage.value().SerializeToJsonObject(binaryMessageValue); payloadObject.WithObject("binaryMessage", std::move(binaryMessageValue)); } } void PublishMessage::s_loadFromJsonView( PublishMessage &publishMessage, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("jsonMessage")) { publishMessage.m_jsonMessage = JsonMessage(); JsonMessage::s_loadFromJsonView( publishMessage.m_jsonMessage.value(), jsonView.GetJsonObject("jsonMessage")); publishMessage.m_chosenMember = TAG_JSON_MESSAGE; } else if (jsonView.ValueExists("binaryMessage")) { publishMessage.m_binaryMessage = BinaryMessage(); BinaryMessage::s_loadFromJsonView( publishMessage.m_binaryMessage.value(), jsonView.GetJsonObject("binaryMessage")); publishMessage.m_chosenMember = TAG_BINARY_MESSAGE; } } PublishMessage &PublishMessage::operator=(const PublishMessage &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_JSON_MESSAGE) { m_jsonMessage = objectToCopy.m_jsonMessage; m_chosenMember = objectToCopy.m_chosenMember; } else if (objectToCopy.m_chosenMember == TAG_BINARY_MESSAGE) { m_binaryMessage = objectToCopy.m_binaryMessage; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *PublishMessage::MODEL_NAME = "aws.greengrass#PublishMessage"; Aws::Crt::String PublishMessage::GetModelName() const noexcept { return PublishMessage::MODEL_NAME; } Aws::Crt::ScopedResource PublishMessage::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), PublishMessage::s_customDeleter); shape->m_allocator = allocator; PublishMessage::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PublishMessage::s_customDeleter(PublishMessage *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SecretValue::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_SECRET_STRING && m_secretString.has_value()) { payloadObject.WithString("secretString", m_secretString.value()); } else if (m_chosenMember == TAG_SECRET_BINARY && m_secretBinary.has_value()) { if (m_secretBinary.value().size() > 0) { payloadObject.WithString("secretBinary", Aws::Crt::Base64Encode(m_secretBinary.value())); } } } void SecretValue::s_loadFromJsonView(SecretValue &secretValue, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("secretString")) { secretValue.m_secretString = Aws::Crt::Optional(jsonView.GetString("secretString")); secretValue.m_chosenMember = TAG_SECRET_STRING; } else if (jsonView.ValueExists("secretBinary")) { if (jsonView.GetString("secretBinary").size() > 0) { secretValue.m_secretBinary = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("secretBinary"))); } secretValue.m_chosenMember = TAG_SECRET_BINARY; } } SecretValue &SecretValue::operator=(const SecretValue &objectToCopy) noexcept { if (objectToCopy.m_chosenMember == TAG_SECRET_STRING) { m_secretString = objectToCopy.m_secretString; m_chosenMember = objectToCopy.m_chosenMember; } else if (objectToCopy.m_chosenMember == TAG_SECRET_BINARY) { m_secretBinary = objectToCopy.m_secretBinary; m_chosenMember = objectToCopy.m_chosenMember; } return *this; } const char *SecretValue::MODEL_NAME = "aws.greengrass#SecretValue"; Aws::Crt::String SecretValue::GetModelName() const noexcept { return SecretValue::MODEL_NAME; } Aws::Crt::ScopedResource SecretValue::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), SecretValue::s_customDeleter); shape->m_allocator = allocator; SecretValue::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SecretValue::s_customDeleter(SecretValue *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void CredentialDocument::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_chosenMember == TAG_MQTT_CREDENTIAL && m_mqttCredential.has_value()) { Aws::Crt::JsonObject mQTTCredentialValue; m_mqttCredential.value().SerializeToJsonObject(mQTTCredentialValue); payloadObject.WithObject("mqttCredential", std::move(mQTTCredentialValue)); } } 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 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()) { payloadObject.WithString("message", m_message.value()); } if (m_context.has_value()) { payloadObject.WithObject("context", m_context.value()); } } void ServiceError::s_loadFromJsonView(ServiceError &serviceError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { serviceError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } if (jsonView.ValueExists("context")) { serviceError.m_context = Aws::Crt::Optional(jsonView.GetJsonObject("context").Materialize()); } } const char *ServiceError::MODEL_NAME = "aws.greengrass#ServiceError"; Aws::Crt::String ServiceError::GetModelName() const noexcept { return ServiceError::MODEL_NAME; } Aws::Crt::ScopedResource ServiceError::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), ServiceError::s_customDeleter); shape->m_allocator = allocator; ServiceError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void ServiceError::s_customDeleter(ServiceError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void UnauthorizedError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void UnauthorizedError::s_loadFromJsonView( UnauthorizedError &unauthorizedError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { unauthorizedError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *UnauthorizedError::MODEL_NAME = "aws.greengrass#UnauthorizedError"; Aws::Crt::String UnauthorizedError::GetModelName() const noexcept { return UnauthorizedError::MODEL_NAME; } Aws::Crt::ScopedResource UnauthorizedError::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), UnauthorizedError::s_customDeleter); shape->m_allocator = allocator; UnauthorizedError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void UnauthorizedError::s_customDeleter(UnauthorizedError *shape) noexcept { OperationError::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")) { invalidTokenError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *InvalidTokenError::MODEL_NAME = "aws.greengrass#InvalidTokenError"; Aws::Crt::String InvalidTokenError::GetModelName() const noexcept { return InvalidTokenError::MODEL_NAME; } Aws::Crt::ScopedResource InvalidTokenError::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), InvalidTokenError::s_customDeleter); shape->m_allocator = allocator; InvalidTokenError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void InvalidTokenError::s_customDeleter(InvalidTokenError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void ValidateAuthorizationTokenResponse::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_isValid.has_value()) { payloadObject.WithBool("isValid", m_isValid.value()); } } void ValidateAuthorizationTokenResponse::s_loadFromJsonView( ValidateAuthorizationTokenResponse &validateAuthorizationTokenResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("isValid")) { validateAuthorizationTokenResponse.m_isValid = Aws::Crt::Optional(jsonView.GetBool("isValid")); } } const char *ValidateAuthorizationTokenResponse::MODEL_NAME = "aws.greengrass#ValidateAuthorizationTokenResponse"; Aws::Crt::String ValidateAuthorizationTokenResponse::GetModelName() const noexcept { return ValidateAuthorizationTokenResponse::MODEL_NAME; } Aws::Crt::ScopedResource ValidateAuthorizationTokenResponse::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), ValidateAuthorizationTokenResponse::s_customDeleter); shape->m_allocator = allocator; ValidateAuthorizationTokenResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ValidateAuthorizationTokenResponse::s_customDeleter(ValidateAuthorizationTokenResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ValidateAuthorizationTokenRequest::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_token.has_value()) { payloadObject.WithString("token", m_token.value()); } } void ValidateAuthorizationTokenRequest::s_loadFromJsonView( ValidateAuthorizationTokenRequest &validateAuthorizationTokenRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("token")) { validateAuthorizationTokenRequest.m_token = Aws::Crt::Optional(jsonView.GetString("token")); } } const char *ValidateAuthorizationTokenRequest::MODEL_NAME = "aws.greengrass#ValidateAuthorizationTokenRequest"; Aws::Crt::String ValidateAuthorizationTokenRequest::GetModelName() const noexcept { return ValidateAuthorizationTokenRequest::MODEL_NAME; } Aws::Crt::ScopedResource ValidateAuthorizationTokenRequest::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), ValidateAuthorizationTokenRequest::s_customDeleter); shape->m_allocator = allocator; ValidateAuthorizationTokenRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ValidateAuthorizationTokenRequest::s_customDeleter(ValidateAuthorizationTokenRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ConflictError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void ConflictError::s_loadFromJsonView( ConflictError &conflictError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { conflictError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *ConflictError::MODEL_NAME = "aws.greengrass#ConflictError"; Aws::Crt::String ConflictError::GetModelName() const noexcept { return ConflictError::MODEL_NAME; } Aws::Crt::ScopedResource ConflictError::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), ConflictError::s_customDeleter); shape->m_allocator = allocator; ConflictError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void ConflictError::s_customDeleter(ConflictError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void UpdateThingShadowResponse::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 UpdateThingShadowResponse::s_loadFromJsonView( UpdateThingShadowResponse &updateThingShadowResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("payload")) { if (jsonView.GetString("payload").size() > 0) { updateThingShadowResponse.m_payload = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("payload"))); } } } const char *UpdateThingShadowResponse::MODEL_NAME = "aws.greengrass#UpdateThingShadowResponse"; Aws::Crt::String UpdateThingShadowResponse::GetModelName() const noexcept { return UpdateThingShadowResponse::MODEL_NAME; } Aws::Crt::ScopedResource UpdateThingShadowResponse::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), UpdateThingShadowResponse::s_customDeleter); shape->m_allocator = allocator; UpdateThingShadowResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UpdateThingShadowResponse::s_customDeleter(UpdateThingShadowResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void UpdateThingShadowRequest::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()); } if (m_payload.has_value()) { if (m_payload.value().size() > 0) { payloadObject.WithString("payload", Aws::Crt::Base64Encode(m_payload.value())); } } } void UpdateThingShadowRequest::s_loadFromJsonView( UpdateThingShadowRequest &updateThingShadowRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("thingName")) { updateThingShadowRequest.m_thingName = Aws::Crt::Optional(jsonView.GetString("thingName")); } if (jsonView.ValueExists("shadowName")) { updateThingShadowRequest.m_shadowName = Aws::Crt::Optional(jsonView.GetString("shadowName")); } if (jsonView.ValueExists("payload")) { if (jsonView.GetString("payload").size() > 0) { updateThingShadowRequest.m_payload = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("payload"))); } } } const char *UpdateThingShadowRequest::MODEL_NAME = "aws.greengrass#UpdateThingShadowRequest"; Aws::Crt::String UpdateThingShadowRequest::GetModelName() const noexcept { return UpdateThingShadowRequest::MODEL_NAME; } Aws::Crt::ScopedResource UpdateThingShadowRequest::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), UpdateThingShadowRequest::s_customDeleter); shape->m_allocator = allocator; UpdateThingShadowRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UpdateThingShadowRequest::s_customDeleter(UpdateThingShadowRequest *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 { if (jsonView.ValueExists("message")) { resourceNotFoundError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } if (jsonView.ValueExists("resourceType")) { resourceNotFoundError.m_resourceType = Aws::Crt::Optional(jsonView.GetString("resourceType")); } if (jsonView.ValueExists("resourceName")) { resourceNotFoundError.m_resourceName = Aws::Crt::Optional(jsonView.GetString("resourceName")); } } const char *ResourceNotFoundError::MODEL_NAME = "aws.greengrass#ResourceNotFoundError"; Aws::Crt::String ResourceNotFoundError::GetModelName() const noexcept { return ResourceNotFoundError::MODEL_NAME; } Aws::Crt::ScopedResource ResourceNotFoundError::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), ResourceNotFoundError::s_customDeleter); shape->m_allocator = allocator; ResourceNotFoundError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void ResourceNotFoundError::s_customDeleter(ResourceNotFoundError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void UpdateStateResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void UpdateStateResponse::s_loadFromJsonView( UpdateStateResponse &updateStateResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)updateStateResponse; (void)jsonView; } const char *UpdateStateResponse::MODEL_NAME = "aws.greengrass#UpdateStateResponse"; Aws::Crt::String UpdateStateResponse::GetModelName() const noexcept { return UpdateStateResponse::MODEL_NAME; } Aws::Crt::ScopedResource UpdateStateResponse::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), UpdateStateResponse::s_customDeleter); shape->m_allocator = allocator; UpdateStateResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UpdateStateResponse::s_customDeleter(UpdateStateResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void UpdateStateRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_state.has_value()) { payloadObject.WithString("state", m_state.value()); } } void UpdateStateRequest::s_loadFromJsonView( UpdateStateRequest &updateStateRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("state")) { updateStateRequest.m_state = Aws::Crt::Optional(jsonView.GetString("state")); } } void UpdateStateRequest::SetState(ReportedLifecycleState state) noexcept { switch (state) { case REPORTED_LIFECYCLE_STATE_RUNNING: m_state = Aws::Crt::String("RUNNING"); break; case REPORTED_LIFECYCLE_STATE_ERRORED: m_state = Aws::Crt::String("ERRORED"); break; default: break; } } Aws::Crt::Optional UpdateStateRequest::GetState() noexcept { if (!m_state.has_value()) return Aws::Crt::Optional(); if (m_state.value() == Aws::Crt::String("RUNNING")) { return Aws::Crt::Optional(REPORTED_LIFECYCLE_STATE_RUNNING); } if (m_state.value() == Aws::Crt::String("ERRORED")) { return Aws::Crt::Optional(REPORTED_LIFECYCLE_STATE_ERRORED); } return Aws::Crt::Optional(); } const char *UpdateStateRequest::MODEL_NAME = "aws.greengrass#UpdateStateRequest"; Aws::Crt::String UpdateStateRequest::GetModelName() const noexcept { return UpdateStateRequest::MODEL_NAME; } Aws::Crt::ScopedResource UpdateStateRequest::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), UpdateStateRequest::s_customDeleter); shape->m_allocator = allocator; UpdateStateRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UpdateStateRequest::s_customDeleter(UpdateStateRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void FailedUpdateConditionCheckError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void FailedUpdateConditionCheckError::s_loadFromJsonView( FailedUpdateConditionCheckError &failedUpdateConditionCheckError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { failedUpdateConditionCheckError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *FailedUpdateConditionCheckError::MODEL_NAME = "aws.greengrass#FailedUpdateConditionCheckError"; Aws::Crt::String FailedUpdateConditionCheckError::GetModelName() const noexcept { return FailedUpdateConditionCheckError::MODEL_NAME; } Aws::Crt::ScopedResource FailedUpdateConditionCheckError::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), FailedUpdateConditionCheckError::s_customDeleter); shape->m_allocator = allocator; FailedUpdateConditionCheckError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void FailedUpdateConditionCheckError::s_customDeleter(FailedUpdateConditionCheckError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void UpdateConfigurationResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void UpdateConfigurationResponse::s_loadFromJsonView( UpdateConfigurationResponse &updateConfigurationResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)updateConfigurationResponse; (void)jsonView; } const char *UpdateConfigurationResponse::MODEL_NAME = "aws.greengrass#UpdateConfigurationResponse"; Aws::Crt::String UpdateConfigurationResponse::GetModelName() const noexcept { return UpdateConfigurationResponse::MODEL_NAME; } Aws::Crt::ScopedResource UpdateConfigurationResponse::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), UpdateConfigurationResponse::s_customDeleter); shape->m_allocator = allocator; UpdateConfigurationResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UpdateConfigurationResponse::s_customDeleter(UpdateConfigurationResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void UpdateConfigurationRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_keyPath.has_value()) { Aws::Crt::JsonObject keyPath; Aws::Crt::Vector keyPathJsonArray; for (const auto &keyPathItem : m_keyPath.value()) { Aws::Crt::JsonObject keyPathJsonArrayItem; keyPathJsonArrayItem.AsString(keyPathItem); keyPathJsonArray.emplace_back(std::move(keyPathJsonArrayItem)); } keyPath.AsArray(std::move(keyPathJsonArray)); payloadObject.WithObject("keyPath", std::move(keyPath)); } if (m_timestamp.has_value()) { payloadObject.WithDouble("timestamp", m_timestamp.value().SecondsWithMSPrecision()); } if (m_valueToMerge.has_value()) { payloadObject.WithObject("valueToMerge", m_valueToMerge.value()); } } void UpdateConfigurationRequest::s_loadFromJsonView( UpdateConfigurationRequest &updateConfigurationRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("keyPath")) { updateConfigurationRequest.m_keyPath = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath")) { Aws::Crt::Optional keyPathItem; keyPathItem = Aws::Crt::Optional(keyPathJsonView.AsString()); updateConfigurationRequest.m_keyPath.value().push_back(keyPathItem.value()); } } if (jsonView.ValueExists("timestamp")) { updateConfigurationRequest.m_timestamp = Aws::Crt::Optional(Aws::Crt::DateTime(jsonView.GetDouble("timestamp"))); } if (jsonView.ValueExists("valueToMerge")) { updateConfigurationRequest.m_valueToMerge = Aws::Crt::Optional(jsonView.GetJsonObject("valueToMerge").Materialize()); } } const char *UpdateConfigurationRequest::MODEL_NAME = "aws.greengrass#UpdateConfigurationRequest"; Aws::Crt::String UpdateConfigurationRequest::GetModelName() const noexcept { return UpdateConfigurationRequest::MODEL_NAME; } Aws::Crt::ScopedResource UpdateConfigurationRequest::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), UpdateConfigurationRequest::s_customDeleter); shape->m_allocator = allocator; UpdateConfigurationRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void UpdateConfigurationRequest::s_customDeleter(UpdateConfigurationRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToValidateConfigurationUpdatesResponse::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SubscribeToValidateConfigurationUpdatesResponse::s_loadFromJsonView( SubscribeToValidateConfigurationUpdatesResponse &subscribeToValidateConfigurationUpdatesResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)subscribeToValidateConfigurationUpdatesResponse; (void)jsonView; } const char *SubscribeToValidateConfigurationUpdatesResponse::MODEL_NAME = "aws.greengrass#SubscribeToValidateConfigurationUpdatesResponse"; Aws::Crt::String SubscribeToValidateConfigurationUpdatesResponse::GetModelName() const noexcept { return SubscribeToValidateConfigurationUpdatesResponse::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToValidateConfigurationUpdatesResponse:: 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), SubscribeToValidateConfigurationUpdatesResponse::s_customDeleter); shape->m_allocator = allocator; SubscribeToValidateConfigurationUpdatesResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToValidateConfigurationUpdatesResponse::s_customDeleter( SubscribeToValidateConfigurationUpdatesResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToValidateConfigurationUpdatesRequest::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SubscribeToValidateConfigurationUpdatesRequest::s_loadFromJsonView( SubscribeToValidateConfigurationUpdatesRequest &subscribeToValidateConfigurationUpdatesRequest, const Aws::Crt::JsonView &jsonView) noexcept { (void)subscribeToValidateConfigurationUpdatesRequest; (void)jsonView; } const char *SubscribeToValidateConfigurationUpdatesRequest::MODEL_NAME = "aws.greengrass#SubscribeToValidateConfigurationUpdatesRequest"; Aws::Crt::String SubscribeToValidateConfigurationUpdatesRequest::GetModelName() const noexcept { return SubscribeToValidateConfigurationUpdatesRequest::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToValidateConfigurationUpdatesRequest:: 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), SubscribeToValidateConfigurationUpdatesRequest::s_customDeleter); shape->m_allocator = allocator; SubscribeToValidateConfigurationUpdatesRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToValidateConfigurationUpdatesRequest::s_customDeleter( SubscribeToValidateConfigurationUpdatesRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToTopicResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_topicName.has_value()) { payloadObject.WithString("topicName", m_topicName.value()); } } void SubscribeToTopicResponse::s_loadFromJsonView( SubscribeToTopicResponse &subscribeToTopicResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("topicName")) { subscribeToTopicResponse.m_topicName = Aws::Crt::Optional(jsonView.GetString("topicName")); } } const char *SubscribeToTopicResponse::MODEL_NAME = "aws.greengrass#SubscribeToTopicResponse"; Aws::Crt::String SubscribeToTopicResponse::GetModelName() const noexcept { return SubscribeToTopicResponse::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToTopicResponse::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), SubscribeToTopicResponse::s_customDeleter); shape->m_allocator = allocator; SubscribeToTopicResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToTopicResponse::s_customDeleter(SubscribeToTopicResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToTopicRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_topic.has_value()) { payloadObject.WithString("topic", m_topic.value()); } if (m_receiveMode.has_value()) { payloadObject.WithString("receiveMode", m_receiveMode.value()); } } void SubscribeToTopicRequest::s_loadFromJsonView( SubscribeToTopicRequest &subscribeToTopicRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("topic")) { 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"; Aws::Crt::String SubscribeToTopicRequest::GetModelName() const noexcept { return SubscribeToTopicRequest::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToTopicRequest::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), SubscribeToTopicRequest::s_customDeleter); shape->m_allocator = allocator; SubscribeToTopicRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToTopicRequest::s_customDeleter(SubscribeToTopicRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToIoTCoreResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SubscribeToIoTCoreResponse::s_loadFromJsonView( SubscribeToIoTCoreResponse &subscribeToIoTCoreResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)subscribeToIoTCoreResponse; (void)jsonView; } const char *SubscribeToIoTCoreResponse::MODEL_NAME = "aws.greengrass#SubscribeToIoTCoreResponse"; Aws::Crt::String SubscribeToIoTCoreResponse::GetModelName() const noexcept { return SubscribeToIoTCoreResponse::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToIoTCoreResponse::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), SubscribeToIoTCoreResponse::s_customDeleter); shape->m_allocator = allocator; SubscribeToIoTCoreResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToIoTCoreResponse::s_customDeleter(SubscribeToIoTCoreResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToIoTCoreRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_topicName.has_value()) { payloadObject.WithString("topicName", m_topicName.value()); } if (m_qos.has_value()) { payloadObject.WithString("qos", m_qos.value()); } } void SubscribeToIoTCoreRequest::s_loadFromJsonView( SubscribeToIoTCoreRequest &subscribeToIoTCoreRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("topicName")) { subscribeToIoTCoreRequest.m_topicName = Aws::Crt::Optional(jsonView.GetString("topicName")); } if (jsonView.ValueExists("qos")) { subscribeToIoTCoreRequest.m_qos = Aws::Crt::Optional(jsonView.GetString("qos")); } } void SubscribeToIoTCoreRequest::SetQos(QOS qos) noexcept { switch (qos) { case QOS_AT_MOST_ONCE: m_qos = Aws::Crt::String("0"); break; case QOS_AT_LEAST_ONCE: m_qos = Aws::Crt::String("1"); break; default: break; } } Aws::Crt::Optional SubscribeToIoTCoreRequest::GetQos() noexcept { if (!m_qos.has_value()) return Aws::Crt::Optional(); if (m_qos.value() == Aws::Crt::String("0")) { return Aws::Crt::Optional(QOS_AT_MOST_ONCE); } if (m_qos.value() == Aws::Crt::String("1")) { return Aws::Crt::Optional(QOS_AT_LEAST_ONCE); } return Aws::Crt::Optional(); } const char *SubscribeToIoTCoreRequest::MODEL_NAME = "aws.greengrass#SubscribeToIoTCoreRequest"; Aws::Crt::String SubscribeToIoTCoreRequest::GetModelName() const noexcept { return SubscribeToIoTCoreRequest::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToIoTCoreRequest::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), SubscribeToIoTCoreRequest::s_customDeleter); shape->m_allocator = allocator; SubscribeToIoTCoreRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToIoTCoreRequest::s_customDeleter(SubscribeToIoTCoreRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToConfigurationUpdateResponse::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SubscribeToConfigurationUpdateResponse::s_loadFromJsonView( SubscribeToConfigurationUpdateResponse &subscribeToConfigurationUpdateResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)subscribeToConfigurationUpdateResponse; (void)jsonView; } const char *SubscribeToConfigurationUpdateResponse::MODEL_NAME = "aws.greengrass#SubscribeToConfigurationUpdateResponse"; Aws::Crt::String SubscribeToConfigurationUpdateResponse::GetModelName() const noexcept { return SubscribeToConfigurationUpdateResponse::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToConfigurationUpdateResponse::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), SubscribeToConfigurationUpdateResponse::s_customDeleter); shape->m_allocator = allocator; SubscribeToConfigurationUpdateResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToConfigurationUpdateResponse::s_customDeleter( SubscribeToConfigurationUpdateResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToConfigurationUpdateRequest::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } if (m_keyPath.has_value()) { Aws::Crt::JsonObject keyPath; Aws::Crt::Vector keyPathJsonArray; for (const auto &keyPathItem : m_keyPath.value()) { Aws::Crt::JsonObject keyPathJsonArrayItem; keyPathJsonArrayItem.AsString(keyPathItem); keyPathJsonArray.emplace_back(std::move(keyPathJsonArrayItem)); } keyPath.AsArray(std::move(keyPathJsonArray)); payloadObject.WithObject("keyPath", std::move(keyPath)); } } void SubscribeToConfigurationUpdateRequest::s_loadFromJsonView( SubscribeToConfigurationUpdateRequest &subscribeToConfigurationUpdateRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { subscribeToConfigurationUpdateRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } if (jsonView.ValueExists("keyPath")) { subscribeToConfigurationUpdateRequest.m_keyPath = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath")) { Aws::Crt::Optional keyPathItem; keyPathItem = Aws::Crt::Optional(keyPathJsonView.AsString()); subscribeToConfigurationUpdateRequest.m_keyPath.value().push_back(keyPathItem.value()); } } } const char *SubscribeToConfigurationUpdateRequest::MODEL_NAME = "aws.greengrass#SubscribeToConfigurationUpdateRequest"; Aws::Crt::String SubscribeToConfigurationUpdateRequest::GetModelName() const noexcept { return SubscribeToConfigurationUpdateRequest::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToConfigurationUpdateRequest::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), SubscribeToConfigurationUpdateRequest::s_customDeleter); shape->m_allocator = allocator; SubscribeToConfigurationUpdateRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToConfigurationUpdateRequest::s_customDeleter( SubscribeToConfigurationUpdateRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToComponentUpdatesResponse::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SubscribeToComponentUpdatesResponse::s_loadFromJsonView( SubscribeToComponentUpdatesResponse &subscribeToComponentUpdatesResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)subscribeToComponentUpdatesResponse; (void)jsonView; } const char *SubscribeToComponentUpdatesResponse::MODEL_NAME = "aws.greengrass#SubscribeToComponentUpdatesResponse"; Aws::Crt::String SubscribeToComponentUpdatesResponse::GetModelName() const noexcept { return SubscribeToComponentUpdatesResponse::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToComponentUpdatesResponse::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), SubscribeToComponentUpdatesResponse::s_customDeleter); shape->m_allocator = allocator; SubscribeToComponentUpdatesResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToComponentUpdatesResponse::s_customDeleter(SubscribeToComponentUpdatesResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToComponentUpdatesRequest::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SubscribeToComponentUpdatesRequest::s_loadFromJsonView( SubscribeToComponentUpdatesRequest &subscribeToComponentUpdatesRequest, const Aws::Crt::JsonView &jsonView) noexcept { (void)subscribeToComponentUpdatesRequest; (void)jsonView; } const char *SubscribeToComponentUpdatesRequest::MODEL_NAME = "aws.greengrass#SubscribeToComponentUpdatesRequest"; Aws::Crt::String SubscribeToComponentUpdatesRequest::GetModelName() const noexcept { return SubscribeToComponentUpdatesRequest::MODEL_NAME; } Aws::Crt::ScopedResource SubscribeToComponentUpdatesRequest::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), SubscribeToComponentUpdatesRequest::s_customDeleter); shape->m_allocator = allocator; SubscribeToComponentUpdatesRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SubscribeToComponentUpdatesRequest::s_customDeleter(SubscribeToComponentUpdatesRequest *shape) noexcept { 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 ComponentNotFoundError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void ComponentNotFoundError::s_loadFromJsonView( ComponentNotFoundError &componentNotFoundError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { componentNotFoundError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *ComponentNotFoundError::MODEL_NAME = "aws.greengrass#ComponentNotFoundError"; Aws::Crt::String ComponentNotFoundError::GetModelName() const noexcept { return ComponentNotFoundError::MODEL_NAME; } Aws::Crt::ScopedResource ComponentNotFoundError::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), ComponentNotFoundError::s_customDeleter); shape->m_allocator = allocator; ComponentNotFoundError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void ComponentNotFoundError::s_customDeleter(ComponentNotFoundError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void StopComponentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_stopStatus.has_value()) { payloadObject.WithString("stopStatus", m_stopStatus.value()); } if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void StopComponentResponse::s_loadFromJsonView( StopComponentResponse &stopComponentResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("stopStatus")) { stopComponentResponse.m_stopStatus = Aws::Crt::Optional(jsonView.GetString("stopStatus")); } if (jsonView.ValueExists("message")) { stopComponentResponse.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } void StopComponentResponse::SetStopStatus(RequestStatus stopStatus) noexcept { switch (stopStatus) { case REQUEST_STATUS_SUCCEEDED: m_stopStatus = Aws::Crt::String("SUCCEEDED"); break; case REQUEST_STATUS_FAILED: m_stopStatus = Aws::Crt::String("FAILED"); break; default: break; } } Aws::Crt::Optional StopComponentResponse::GetStopStatus() noexcept { if (!m_stopStatus.has_value()) return Aws::Crt::Optional(); if (m_stopStatus.value() == Aws::Crt::String("SUCCEEDED")) { return Aws::Crt::Optional(REQUEST_STATUS_SUCCEEDED); } if (m_stopStatus.value() == Aws::Crt::String("FAILED")) { return Aws::Crt::Optional(REQUEST_STATUS_FAILED); } return Aws::Crt::Optional(); } const char *StopComponentResponse::MODEL_NAME = "aws.greengrass#StopComponentResponse"; Aws::Crt::String StopComponentResponse::GetModelName() const noexcept { return StopComponentResponse::MODEL_NAME; } Aws::Crt::ScopedResource StopComponentResponse::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), StopComponentResponse::s_customDeleter); shape->m_allocator = allocator; StopComponentResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void StopComponentResponse::s_customDeleter(StopComponentResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void StopComponentRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } } void StopComponentRequest::s_loadFromJsonView( StopComponentRequest &stopComponentRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { stopComponentRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } } const char *StopComponentRequest::MODEL_NAME = "aws.greengrass#StopComponentRequest"; Aws::Crt::String StopComponentRequest::GetModelName() const noexcept { return StopComponentRequest::MODEL_NAME; } Aws::Crt::ScopedResource StopComponentRequest::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), StopComponentRequest::s_customDeleter); shape->m_allocator = allocator; StopComponentRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void StopComponentRequest::s_customDeleter(StopComponentRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SendConfigurationValidityReportResponse::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void SendConfigurationValidityReportResponse::s_loadFromJsonView( SendConfigurationValidityReportResponse &sendConfigurationValidityReportResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)sendConfigurationValidityReportResponse; (void)jsonView; } const char *SendConfigurationValidityReportResponse::MODEL_NAME = "aws.greengrass#SendConfigurationValidityReportResponse"; Aws::Crt::String SendConfigurationValidityReportResponse::GetModelName() const noexcept { return SendConfigurationValidityReportResponse::MODEL_NAME; } Aws::Crt::ScopedResource SendConfigurationValidityReportResponse::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), SendConfigurationValidityReportResponse::s_customDeleter); shape->m_allocator = allocator; SendConfigurationValidityReportResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SendConfigurationValidityReportResponse::s_customDeleter( SendConfigurationValidityReportResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SendConfigurationValidityReportRequest::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_configurationValidityReport.has_value()) { Aws::Crt::JsonObject configurationValidityReportValue; m_configurationValidityReport.value().SerializeToJsonObject(configurationValidityReportValue); payloadObject.WithObject("configurationValidityReport", std::move(configurationValidityReportValue)); } } void SendConfigurationValidityReportRequest::s_loadFromJsonView( SendConfigurationValidityReportRequest &sendConfigurationValidityReportRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("configurationValidityReport")) { sendConfigurationValidityReportRequest.m_configurationValidityReport = ConfigurationValidityReport(); ConfigurationValidityReport::s_loadFromJsonView( sendConfigurationValidityReportRequest.m_configurationValidityReport.value(), jsonView.GetJsonObject("configurationValidityReport")); } } const char *SendConfigurationValidityReportRequest::MODEL_NAME = "aws.greengrass#SendConfigurationValidityReportRequest"; Aws::Crt::String SendConfigurationValidityReportRequest::GetModelName() const noexcept { return SendConfigurationValidityReportRequest::MODEL_NAME; } Aws::Crt::ScopedResource SendConfigurationValidityReportRequest::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), SendConfigurationValidityReportRequest::s_customDeleter); shape->m_allocator = allocator; SendConfigurationValidityReportRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void SendConfigurationValidityReportRequest::s_customDeleter( SendConfigurationValidityReportRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ResumeComponentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void ResumeComponentResponse::s_loadFromJsonView( ResumeComponentResponse &resumeComponentResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)resumeComponentResponse; (void)jsonView; } const char *ResumeComponentResponse::MODEL_NAME = "aws.greengrass#ResumeComponentResponse"; Aws::Crt::String ResumeComponentResponse::GetModelName() const noexcept { return ResumeComponentResponse::MODEL_NAME; } Aws::Crt::ScopedResource ResumeComponentResponse::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), ResumeComponentResponse::s_customDeleter); shape->m_allocator = allocator; ResumeComponentResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ResumeComponentResponse::s_customDeleter(ResumeComponentResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ResumeComponentRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } } void ResumeComponentRequest::s_loadFromJsonView( ResumeComponentRequest &resumeComponentRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { resumeComponentRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } } const char *ResumeComponentRequest::MODEL_NAME = "aws.greengrass#ResumeComponentRequest"; Aws::Crt::String ResumeComponentRequest::GetModelName() const noexcept { return ResumeComponentRequest::MODEL_NAME; } Aws::Crt::ScopedResource ResumeComponentRequest::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), ResumeComponentRequest::s_customDeleter); shape->m_allocator = allocator; ResumeComponentRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ResumeComponentRequest::s_customDeleter(ResumeComponentRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void RestartComponentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_restartStatus.has_value()) { payloadObject.WithString("restartStatus", m_restartStatus.value()); } if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void RestartComponentResponse::s_loadFromJsonView( RestartComponentResponse &restartComponentResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("restartStatus")) { restartComponentResponse.m_restartStatus = Aws::Crt::Optional(jsonView.GetString("restartStatus")); } if (jsonView.ValueExists("message")) { restartComponentResponse.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } void RestartComponentResponse::SetRestartStatus(RequestStatus restartStatus) noexcept { switch (restartStatus) { case REQUEST_STATUS_SUCCEEDED: m_restartStatus = Aws::Crt::String("SUCCEEDED"); break; case REQUEST_STATUS_FAILED: m_restartStatus = Aws::Crt::String("FAILED"); break; default: break; } } Aws::Crt::Optional RestartComponentResponse::GetRestartStatus() noexcept { if (!m_restartStatus.has_value()) return Aws::Crt::Optional(); if (m_restartStatus.value() == Aws::Crt::String("SUCCEEDED")) { return Aws::Crt::Optional(REQUEST_STATUS_SUCCEEDED); } if (m_restartStatus.value() == Aws::Crt::String("FAILED")) { return Aws::Crt::Optional(REQUEST_STATUS_FAILED); } return Aws::Crt::Optional(); } const char *RestartComponentResponse::MODEL_NAME = "aws.greengrass#RestartComponentResponse"; Aws::Crt::String RestartComponentResponse::GetModelName() const noexcept { return RestartComponentResponse::MODEL_NAME; } Aws::Crt::ScopedResource RestartComponentResponse::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), RestartComponentResponse::s_customDeleter); shape->m_allocator = allocator; RestartComponentResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void RestartComponentResponse::s_customDeleter(RestartComponentResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void RestartComponentRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } } void RestartComponentRequest::s_loadFromJsonView( RestartComponentRequest &restartComponentRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { restartComponentRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } } const char *RestartComponentRequest::MODEL_NAME = "aws.greengrass#RestartComponentRequest"; Aws::Crt::String RestartComponentRequest::GetModelName() const noexcept { return RestartComponentRequest::MODEL_NAME; } Aws::Crt::ScopedResource RestartComponentRequest::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), RestartComponentRequest::s_customDeleter); shape->m_allocator = allocator; RestartComponentRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void RestartComponentRequest::s_customDeleter(RestartComponentRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PutComponentMetricResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void PutComponentMetricResponse::s_loadFromJsonView( PutComponentMetricResponse &putComponentMetricResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)putComponentMetricResponse; (void)jsonView; } const char *PutComponentMetricResponse::MODEL_NAME = "aws.greengrass#PutComponentMetricResponse"; Aws::Crt::String PutComponentMetricResponse::GetModelName() const noexcept { return PutComponentMetricResponse::MODEL_NAME; } Aws::Crt::ScopedResource PutComponentMetricResponse::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), PutComponentMetricResponse::s_customDeleter); shape->m_allocator = allocator; PutComponentMetricResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PutComponentMetricResponse::s_customDeleter(PutComponentMetricResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PutComponentMetricRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_metrics.has_value()) { Aws::Crt::JsonObject metricsList; Aws::Crt::Vector metricsListJsonArray; for (const auto &metricsListItem : m_metrics.value()) { Aws::Crt::JsonObject metricsListJsonArrayItem; metricsListItem.SerializeToJsonObject(metricsListJsonArrayItem); metricsListJsonArray.emplace_back(std::move(metricsListJsonArrayItem)); } metricsList.AsArray(std::move(metricsListJsonArray)); payloadObject.WithObject("metrics", std::move(metricsList)); } } void PutComponentMetricRequest::s_loadFromJsonView( PutComponentMetricRequest &putComponentMetricRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("metrics")) { putComponentMetricRequest.m_metrics = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &metricsListJsonView : jsonView.GetArray("metrics")) { Aws::Crt::Optional metricsListItem; metricsListItem = Metric(); Metric::s_loadFromJsonView(metricsListItem.value(), metricsListJsonView); putComponentMetricRequest.m_metrics.value().push_back(metricsListItem.value()); } } } const char *PutComponentMetricRequest::MODEL_NAME = "aws.greengrass#PutComponentMetricRequest"; Aws::Crt::String PutComponentMetricRequest::GetModelName() const noexcept { return PutComponentMetricRequest::MODEL_NAME; } Aws::Crt::ScopedResource PutComponentMetricRequest::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), PutComponentMetricRequest::s_customDeleter); shape->m_allocator = allocator; PutComponentMetricRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PutComponentMetricRequest::s_customDeleter(PutComponentMetricRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PublishToTopicResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void PublishToTopicResponse::s_loadFromJsonView( PublishToTopicResponse &publishToTopicResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)publishToTopicResponse; (void)jsonView; } const char *PublishToTopicResponse::MODEL_NAME = "aws.greengrass#PublishToTopicResponse"; Aws::Crt::String PublishToTopicResponse::GetModelName() const noexcept { return PublishToTopicResponse::MODEL_NAME; } Aws::Crt::ScopedResource PublishToTopicResponse::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), PublishToTopicResponse::s_customDeleter); shape->m_allocator = allocator; PublishToTopicResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PublishToTopicResponse::s_customDeleter(PublishToTopicResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PublishToTopicRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_topic.has_value()) { payloadObject.WithString("topic", m_topic.value()); } if (m_publishMessage.has_value()) { Aws::Crt::JsonObject publishMessageValue; m_publishMessage.value().SerializeToJsonObject(publishMessageValue); payloadObject.WithObject("publishMessage", std::move(publishMessageValue)); } } void PublishToTopicRequest::s_loadFromJsonView( PublishToTopicRequest &publishToTopicRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("topic")) { publishToTopicRequest.m_topic = Aws::Crt::Optional(jsonView.GetString("topic")); } if (jsonView.ValueExists("publishMessage")) { publishToTopicRequest.m_publishMessage = PublishMessage(); PublishMessage::s_loadFromJsonView( publishToTopicRequest.m_publishMessage.value(), jsonView.GetJsonObject("publishMessage")); } } const char *PublishToTopicRequest::MODEL_NAME = "aws.greengrass#PublishToTopicRequest"; Aws::Crt::String PublishToTopicRequest::GetModelName() const noexcept { return PublishToTopicRequest::MODEL_NAME; } Aws::Crt::ScopedResource PublishToTopicRequest::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), PublishToTopicRequest::s_customDeleter); shape->m_allocator = allocator; PublishToTopicRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PublishToTopicRequest::s_customDeleter(PublishToTopicRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PublishToIoTCoreResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void PublishToIoTCoreResponse::s_loadFromJsonView( PublishToIoTCoreResponse &publishToIoTCoreResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)publishToIoTCoreResponse; (void)jsonView; } const char *PublishToIoTCoreResponse::MODEL_NAME = "aws.greengrass#PublishToIoTCoreResponse"; Aws::Crt::String PublishToIoTCoreResponse::GetModelName() const noexcept { return PublishToIoTCoreResponse::MODEL_NAME; } Aws::Crt::ScopedResource PublishToIoTCoreResponse::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), PublishToIoTCoreResponse::s_customDeleter); shape->m_allocator = allocator; PublishToIoTCoreResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PublishToIoTCoreResponse::s_customDeleter(PublishToIoTCoreResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PublishToIoTCoreRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_topicName.has_value()) { payloadObject.WithString("topicName", m_topicName.value()); } if (m_qos.has_value()) { payloadObject.WithString("qos", m_qos.value()); } if (m_payload.has_value()) { if (m_payload.value().size() > 0) { payloadObject.WithString("payload", Aws::Crt::Base64Encode(m_payload.value())); } } if (m_retain.has_value()) { payloadObject.WithBool("retain", m_retain.value()); } if (m_userProperties.has_value()) { Aws::Crt::JsonObject listOfUserProperties; Aws::Crt::Vector listOfUserPropertiesJsonArray; for (const auto &listOfUserPropertiesItem : m_userProperties.value()) { Aws::Crt::JsonObject listOfUserPropertiesJsonArrayItem; listOfUserPropertiesItem.SerializeToJsonObject(listOfUserPropertiesJsonArrayItem); listOfUserPropertiesJsonArray.emplace_back(std::move(listOfUserPropertiesJsonArrayItem)); } listOfUserProperties.AsArray(std::move(listOfUserPropertiesJsonArray)); payloadObject.WithObject("userProperties", std::move(listOfUserProperties)); } if (m_messageExpiryIntervalSeconds.has_value()) { payloadObject.WithInt64("messageExpiryIntervalSeconds", m_messageExpiryIntervalSeconds.value()); } if (m_correlationData.has_value()) { if (m_correlationData.value().size() > 0) { payloadObject.WithString("correlationData", Aws::Crt::Base64Encode(m_correlationData.value())); } } if (m_responseTopic.has_value()) { payloadObject.WithString("responseTopic", m_responseTopic.value()); } if (m_payloadFormat.has_value()) { payloadObject.WithString("payloadFormat", m_payloadFormat.value()); } if (m_contentType.has_value()) { payloadObject.WithString("contentType", m_contentType.value()); } } void PublishToIoTCoreRequest::s_loadFromJsonView( PublishToIoTCoreRequest &publishToIoTCoreRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("topicName")) { publishToIoTCoreRequest.m_topicName = Aws::Crt::Optional(jsonView.GetString("topicName")); } if (jsonView.ValueExists("qos")) { publishToIoTCoreRequest.m_qos = Aws::Crt::Optional(jsonView.GetString("qos")); } if (jsonView.ValueExists("payload")) { if (jsonView.GetString("payload").size() > 0) { publishToIoTCoreRequest.m_payload = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("payload"))); } } if (jsonView.ValueExists("retain")) { publishToIoTCoreRequest.m_retain = Aws::Crt::Optional(jsonView.GetBool("retain")); } if (jsonView.ValueExists("userProperties")) { publishToIoTCoreRequest.m_userProperties = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &listOfUserPropertiesJsonView : jsonView.GetArray("userProperties")) { Aws::Crt::Optional listOfUserPropertiesItem; listOfUserPropertiesItem = UserProperty(); UserProperty::s_loadFromJsonView(listOfUserPropertiesItem.value(), listOfUserPropertiesJsonView); publishToIoTCoreRequest.m_userProperties.value().push_back(listOfUserPropertiesItem.value()); } } if (jsonView.ValueExists("messageExpiryIntervalSeconds")) { publishToIoTCoreRequest.m_messageExpiryIntervalSeconds = Aws::Crt::Optional(jsonView.GetInt64("messageExpiryIntervalSeconds")); } if (jsonView.ValueExists("correlationData")) { if (jsonView.GetString("correlationData").size() > 0) { publishToIoTCoreRequest.m_correlationData = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("correlationData"))); } } if (jsonView.ValueExists("responseTopic")) { publishToIoTCoreRequest.m_responseTopic = Aws::Crt::Optional(jsonView.GetString("responseTopic")); } if (jsonView.ValueExists("payloadFormat")) { publishToIoTCoreRequest.m_payloadFormat = Aws::Crt::Optional(jsonView.GetString("payloadFormat")); } if (jsonView.ValueExists("contentType")) { publishToIoTCoreRequest.m_contentType = Aws::Crt::Optional(jsonView.GetString("contentType")); } } void PublishToIoTCoreRequest::SetQos(QOS qos) noexcept { switch (qos) { case QOS_AT_MOST_ONCE: m_qos = Aws::Crt::String("0"); break; case QOS_AT_LEAST_ONCE: m_qos = Aws::Crt::String("1"); break; default: break; } } Aws::Crt::Optional PublishToIoTCoreRequest::GetQos() noexcept { if (!m_qos.has_value()) return Aws::Crt::Optional(); if (m_qos.value() == Aws::Crt::String("0")) { return Aws::Crt::Optional(QOS_AT_MOST_ONCE); } if (m_qos.value() == Aws::Crt::String("1")) { return Aws::Crt::Optional(QOS_AT_LEAST_ONCE); } return Aws::Crt::Optional(); } void PublishToIoTCoreRequest::SetPayloadFormat(PayloadFormat payloadFormat) noexcept { switch (payloadFormat) { case PAYLOAD_FORMAT_BYTES: m_payloadFormat = Aws::Crt::String("0"); break; case PAYLOAD_FORMAT_UTF8: m_payloadFormat = Aws::Crt::String("1"); break; default: break; } } Aws::Crt::Optional PublishToIoTCoreRequest::GetPayloadFormat() noexcept { if (!m_payloadFormat.has_value()) return Aws::Crt::Optional(); if (m_payloadFormat.value() == Aws::Crt::String("0")) { return Aws::Crt::Optional(PAYLOAD_FORMAT_BYTES); } if (m_payloadFormat.value() == Aws::Crt::String("1")) { return Aws::Crt::Optional(PAYLOAD_FORMAT_UTF8); } return Aws::Crt::Optional(); } const char *PublishToIoTCoreRequest::MODEL_NAME = "aws.greengrass#PublishToIoTCoreRequest"; Aws::Crt::String PublishToIoTCoreRequest::GetModelName() const noexcept { return PublishToIoTCoreRequest::MODEL_NAME; } Aws::Crt::ScopedResource PublishToIoTCoreRequest::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), PublishToIoTCoreRequest::s_customDeleter); shape->m_allocator = allocator; PublishToIoTCoreRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PublishToIoTCoreRequest::s_customDeleter(PublishToIoTCoreRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PauseComponentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void PauseComponentResponse::s_loadFromJsonView( PauseComponentResponse &pauseComponentResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)pauseComponentResponse; (void)jsonView; } const char *PauseComponentResponse::MODEL_NAME = "aws.greengrass#PauseComponentResponse"; Aws::Crt::String PauseComponentResponse::GetModelName() const noexcept { return PauseComponentResponse::MODEL_NAME; } Aws::Crt::ScopedResource PauseComponentResponse::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), PauseComponentResponse::s_customDeleter); shape->m_allocator = allocator; PauseComponentResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PauseComponentResponse::s_customDeleter(PauseComponentResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void PauseComponentRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } } void PauseComponentRequest::s_loadFromJsonView( PauseComponentRequest &pauseComponentRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { pauseComponentRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } } const char *PauseComponentRequest::MODEL_NAME = "aws.greengrass#PauseComponentRequest"; Aws::Crt::String PauseComponentRequest::GetModelName() const noexcept { return PauseComponentRequest::MODEL_NAME; } Aws::Crt::ScopedResource PauseComponentRequest::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), PauseComponentRequest::s_customDeleter); shape->m_allocator = allocator; PauseComponentRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void PauseComponentRequest::s_customDeleter(PauseComponentRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ListNamedShadowsForThingResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_results.has_value()) { Aws::Crt::JsonObject namedShadowList; Aws::Crt::Vector namedShadowListJsonArray; for (const auto &namedShadowListItem : m_results.value()) { Aws::Crt::JsonObject namedShadowListJsonArrayItem; namedShadowListJsonArrayItem.AsString(namedShadowListItem); namedShadowListJsonArray.emplace_back(std::move(namedShadowListJsonArrayItem)); } namedShadowList.AsArray(std::move(namedShadowListJsonArray)); payloadObject.WithObject("results", std::move(namedShadowList)); } if (m_timestamp.has_value()) { payloadObject.WithDouble("timestamp", m_timestamp.value().SecondsWithMSPrecision()); } if (m_nextToken.has_value()) { payloadObject.WithString("nextToken", m_nextToken.value()); } } void ListNamedShadowsForThingResponse::s_loadFromJsonView( ListNamedShadowsForThingResponse &listNamedShadowsForThingResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("results")) { listNamedShadowsForThingResponse.m_results = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &namedShadowListJsonView : jsonView.GetArray("results")) { Aws::Crt::Optional namedShadowListItem; namedShadowListItem = Aws::Crt::Optional(namedShadowListJsonView.AsString()); listNamedShadowsForThingResponse.m_results.value().push_back(namedShadowListItem.value()); } } if (jsonView.ValueExists("timestamp")) { listNamedShadowsForThingResponse.m_timestamp = Aws::Crt::Optional(Aws::Crt::DateTime(jsonView.GetDouble("timestamp"))); } if (jsonView.ValueExists("nextToken")) { listNamedShadowsForThingResponse.m_nextToken = Aws::Crt::Optional(jsonView.GetString("nextToken")); } } const char *ListNamedShadowsForThingResponse::MODEL_NAME = "aws.greengrass#ListNamedShadowsForThingResponse"; Aws::Crt::String ListNamedShadowsForThingResponse::GetModelName() const noexcept { return ListNamedShadowsForThingResponse::MODEL_NAME; } Aws::Crt::ScopedResource ListNamedShadowsForThingResponse::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), ListNamedShadowsForThingResponse::s_customDeleter); shape->m_allocator = allocator; ListNamedShadowsForThingResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ListNamedShadowsForThingResponse::s_customDeleter(ListNamedShadowsForThingResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ListNamedShadowsForThingRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_thingName.has_value()) { payloadObject.WithString("thingName", m_thingName.value()); } if (m_nextToken.has_value()) { payloadObject.WithString("nextToken", m_nextToken.value()); } if (m_pageSize.has_value()) { payloadObject.WithInteger("pageSize", m_pageSize.value()); } } void ListNamedShadowsForThingRequest::s_loadFromJsonView( ListNamedShadowsForThingRequest &listNamedShadowsForThingRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("thingName")) { listNamedShadowsForThingRequest.m_thingName = Aws::Crt::Optional(jsonView.GetString("thingName")); } if (jsonView.ValueExists("nextToken")) { listNamedShadowsForThingRequest.m_nextToken = Aws::Crt::Optional(jsonView.GetString("nextToken")); } if (jsonView.ValueExists("pageSize")) { listNamedShadowsForThingRequest.m_pageSize = Aws::Crt::Optional(jsonView.GetInteger("pageSize")); } } const char *ListNamedShadowsForThingRequest::MODEL_NAME = "aws.greengrass#ListNamedShadowsForThingRequest"; Aws::Crt::String ListNamedShadowsForThingRequest::GetModelName() const noexcept { return ListNamedShadowsForThingRequest::MODEL_NAME; } Aws::Crt::ScopedResource ListNamedShadowsForThingRequest::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), ListNamedShadowsForThingRequest::s_customDeleter); shape->m_allocator = allocator; ListNamedShadowsForThingRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ListNamedShadowsForThingRequest::s_customDeleter(ListNamedShadowsForThingRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ListLocalDeploymentsResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_localDeployments.has_value()) { Aws::Crt::JsonObject listOfLocalDeployments; Aws::Crt::Vector listOfLocalDeploymentsJsonArray; for (const auto &listOfLocalDeploymentsItem : m_localDeployments.value()) { Aws::Crt::JsonObject listOfLocalDeploymentsJsonArrayItem; listOfLocalDeploymentsItem.SerializeToJsonObject(listOfLocalDeploymentsJsonArrayItem); listOfLocalDeploymentsJsonArray.emplace_back(std::move(listOfLocalDeploymentsJsonArrayItem)); } listOfLocalDeployments.AsArray(std::move(listOfLocalDeploymentsJsonArray)); payloadObject.WithObject("localDeployments", std::move(listOfLocalDeployments)); } } void ListLocalDeploymentsResponse::s_loadFromJsonView( ListLocalDeploymentsResponse &listLocalDeploymentsResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("localDeployments")) { listLocalDeploymentsResponse.m_localDeployments = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &listOfLocalDeploymentsJsonView : jsonView.GetArray("localDeployments")) { Aws::Crt::Optional listOfLocalDeploymentsItem; listOfLocalDeploymentsItem = LocalDeployment(); LocalDeployment::s_loadFromJsonView( listOfLocalDeploymentsItem.value(), listOfLocalDeploymentsJsonView); listLocalDeploymentsResponse.m_localDeployments.value().push_back( listOfLocalDeploymentsItem.value()); } } } const char *ListLocalDeploymentsResponse::MODEL_NAME = "aws.greengrass#ListLocalDeploymentsResponse"; Aws::Crt::String ListLocalDeploymentsResponse::GetModelName() const noexcept { return ListLocalDeploymentsResponse::MODEL_NAME; } Aws::Crt::ScopedResource ListLocalDeploymentsResponse::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), ListLocalDeploymentsResponse::s_customDeleter); shape->m_allocator = allocator; ListLocalDeploymentsResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ListLocalDeploymentsResponse::s_customDeleter(ListLocalDeploymentsResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ListLocalDeploymentsRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void ListLocalDeploymentsRequest::s_loadFromJsonView( ListLocalDeploymentsRequest &listLocalDeploymentsRequest, const Aws::Crt::JsonView &jsonView) noexcept { (void)listLocalDeploymentsRequest; (void)jsonView; } const char *ListLocalDeploymentsRequest::MODEL_NAME = "aws.greengrass#ListLocalDeploymentsRequest"; Aws::Crt::String ListLocalDeploymentsRequest::GetModelName() const noexcept { return ListLocalDeploymentsRequest::MODEL_NAME; } Aws::Crt::ScopedResource ListLocalDeploymentsRequest::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), ListLocalDeploymentsRequest::s_customDeleter); shape->m_allocator = allocator; ListLocalDeploymentsRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ListLocalDeploymentsRequest::s_customDeleter(ListLocalDeploymentsRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ListComponentsResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_components.has_value()) { Aws::Crt::JsonObject listOfComponents; Aws::Crt::Vector listOfComponentsJsonArray; for (const auto &listOfComponentsItem : m_components.value()) { Aws::Crt::JsonObject listOfComponentsJsonArrayItem; listOfComponentsItem.SerializeToJsonObject(listOfComponentsJsonArrayItem); listOfComponentsJsonArray.emplace_back(std::move(listOfComponentsJsonArrayItem)); } listOfComponents.AsArray(std::move(listOfComponentsJsonArray)); payloadObject.WithObject("components", std::move(listOfComponents)); } } void ListComponentsResponse::s_loadFromJsonView( ListComponentsResponse &listComponentsResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("components")) { listComponentsResponse.m_components = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &listOfComponentsJsonView : jsonView.GetArray("components")) { Aws::Crt::Optional listOfComponentsItem; listOfComponentsItem = ComponentDetails(); ComponentDetails::s_loadFromJsonView(listOfComponentsItem.value(), listOfComponentsJsonView); listComponentsResponse.m_components.value().push_back(listOfComponentsItem.value()); } } } const char *ListComponentsResponse::MODEL_NAME = "aws.greengrass#ListComponentsResponse"; Aws::Crt::String ListComponentsResponse::GetModelName() const noexcept { return ListComponentsResponse::MODEL_NAME; } Aws::Crt::ScopedResource ListComponentsResponse::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), ListComponentsResponse::s_customDeleter); shape->m_allocator = allocator; ListComponentsResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ListComponentsResponse::s_customDeleter(ListComponentsResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void ListComponentsRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void ListComponentsRequest::s_loadFromJsonView( ListComponentsRequest &listComponentsRequest, const Aws::Crt::JsonView &jsonView) noexcept { (void)listComponentsRequest; (void)jsonView; } const char *ListComponentsRequest::MODEL_NAME = "aws.greengrass#ListComponentsRequest"; Aws::Crt::String ListComponentsRequest::GetModelName() const noexcept { return ListComponentsRequest::MODEL_NAME; } Aws::Crt::ScopedResource ListComponentsRequest::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), ListComponentsRequest::s_customDeleter); shape->m_allocator = allocator; ListComponentsRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void ListComponentsRequest::s_customDeleter(ListComponentsRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetThingShadowResponse::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 GetThingShadowResponse::s_loadFromJsonView( GetThingShadowResponse &getThingShadowResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("payload")) { if (jsonView.GetString("payload").size() > 0) { getThingShadowResponse.m_payload = Aws::Crt::Optional>( Aws::Crt::Base64Decode(jsonView.GetString("payload"))); } } } const char *GetThingShadowResponse::MODEL_NAME = "aws.greengrass#GetThingShadowResponse"; Aws::Crt::String GetThingShadowResponse::GetModelName() const noexcept { return GetThingShadowResponse::MODEL_NAME; } Aws::Crt::ScopedResource GetThingShadowResponse::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), GetThingShadowResponse::s_customDeleter); shape->m_allocator = allocator; GetThingShadowResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetThingShadowResponse::s_customDeleter(GetThingShadowResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetThingShadowRequest::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 GetThingShadowRequest::s_loadFromJsonView( GetThingShadowRequest &getThingShadowRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("thingName")) { getThingShadowRequest.m_thingName = Aws::Crt::Optional(jsonView.GetString("thingName")); } if (jsonView.ValueExists("shadowName")) { getThingShadowRequest.m_shadowName = Aws::Crt::Optional(jsonView.GetString("shadowName")); } } const char *GetThingShadowRequest::MODEL_NAME = "aws.greengrass#GetThingShadowRequest"; Aws::Crt::String GetThingShadowRequest::GetModelName() const noexcept { return GetThingShadowRequest::MODEL_NAME; } Aws::Crt::ScopedResource GetThingShadowRequest::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), GetThingShadowRequest::s_customDeleter); shape->m_allocator = allocator; GetThingShadowRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetThingShadowRequest::s_customDeleter(GetThingShadowRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetSecretValueResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_secretId.has_value()) { payloadObject.WithString("secretId", m_secretId.value()); } if (m_versionId.has_value()) { payloadObject.WithString("versionId", m_versionId.value()); } if (m_versionStage.has_value()) { Aws::Crt::JsonObject secretVersionList; Aws::Crt::Vector secretVersionListJsonArray; for (const auto &secretVersionListItem : m_versionStage.value()) { Aws::Crt::JsonObject secretVersionListJsonArrayItem; secretVersionListJsonArrayItem.AsString(secretVersionListItem); secretVersionListJsonArray.emplace_back(std::move(secretVersionListJsonArrayItem)); } secretVersionList.AsArray(std::move(secretVersionListJsonArray)); payloadObject.WithObject("versionStage", std::move(secretVersionList)); } if (m_secretValue.has_value()) { Aws::Crt::JsonObject secretValueValue; m_secretValue.value().SerializeToJsonObject(secretValueValue); payloadObject.WithObject("secretValue", std::move(secretValueValue)); } } void GetSecretValueResponse::s_loadFromJsonView( GetSecretValueResponse &getSecretValueResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("secretId")) { getSecretValueResponse.m_secretId = Aws::Crt::Optional(jsonView.GetString("secretId")); } if (jsonView.ValueExists("versionId")) { getSecretValueResponse.m_versionId = Aws::Crt::Optional(jsonView.GetString("versionId")); } if (jsonView.ValueExists("versionStage")) { getSecretValueResponse.m_versionStage = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &secretVersionListJsonView : jsonView.GetArray("versionStage")) { Aws::Crt::Optional secretVersionListItem; secretVersionListItem = Aws::Crt::Optional(secretVersionListJsonView.AsString()); getSecretValueResponse.m_versionStage.value().push_back(secretVersionListItem.value()); } } if (jsonView.ValueExists("secretValue")) { getSecretValueResponse.m_secretValue = SecretValue(); SecretValue::s_loadFromJsonView( getSecretValueResponse.m_secretValue.value(), jsonView.GetJsonObject("secretValue")); } } const char *GetSecretValueResponse::MODEL_NAME = "aws.greengrass#GetSecretValueResponse"; Aws::Crt::String GetSecretValueResponse::GetModelName() const noexcept { return GetSecretValueResponse::MODEL_NAME; } Aws::Crt::ScopedResource GetSecretValueResponse::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), GetSecretValueResponse::s_customDeleter); shape->m_allocator = allocator; GetSecretValueResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetSecretValueResponse::s_customDeleter(GetSecretValueResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetSecretValueRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_secretId.has_value()) { payloadObject.WithString("secretId", m_secretId.value()); } if (m_versionId.has_value()) { payloadObject.WithString("versionId", m_versionId.value()); } if (m_versionStage.has_value()) { payloadObject.WithString("versionStage", m_versionStage.value()); } } void GetSecretValueRequest::s_loadFromJsonView( GetSecretValueRequest &getSecretValueRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("secretId")) { getSecretValueRequest.m_secretId = Aws::Crt::Optional(jsonView.GetString("secretId")); } if (jsonView.ValueExists("versionId")) { getSecretValueRequest.m_versionId = Aws::Crt::Optional(jsonView.GetString("versionId")); } if (jsonView.ValueExists("versionStage")) { getSecretValueRequest.m_versionStage = Aws::Crt::Optional(jsonView.GetString("versionStage")); } } const char *GetSecretValueRequest::MODEL_NAME = "aws.greengrass#GetSecretValueRequest"; Aws::Crt::String GetSecretValueRequest::GetModelName() const noexcept { return GetSecretValueRequest::MODEL_NAME; } Aws::Crt::ScopedResource GetSecretValueRequest::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), GetSecretValueRequest::s_customDeleter); shape->m_allocator = allocator; GetSecretValueRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetSecretValueRequest::s_customDeleter(GetSecretValueRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetLocalDeploymentStatusResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deployment.has_value()) { Aws::Crt::JsonObject localDeploymentValue; m_deployment.value().SerializeToJsonObject(localDeploymentValue); payloadObject.WithObject("deployment", std::move(localDeploymentValue)); } } void GetLocalDeploymentStatusResponse::s_loadFromJsonView( GetLocalDeploymentStatusResponse &getLocalDeploymentStatusResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deployment")) { getLocalDeploymentStatusResponse.m_deployment = LocalDeployment(); LocalDeployment::s_loadFromJsonView( getLocalDeploymentStatusResponse.m_deployment.value(), jsonView.GetJsonObject("deployment")); } } const char *GetLocalDeploymentStatusResponse::MODEL_NAME = "aws.greengrass#GetLocalDeploymentStatusResponse"; Aws::Crt::String GetLocalDeploymentStatusResponse::GetModelName() const noexcept { return GetLocalDeploymentStatusResponse::MODEL_NAME; } Aws::Crt::ScopedResource GetLocalDeploymentStatusResponse::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), GetLocalDeploymentStatusResponse::s_customDeleter); shape->m_allocator = allocator; GetLocalDeploymentStatusResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetLocalDeploymentStatusResponse::s_customDeleter(GetLocalDeploymentStatusResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetLocalDeploymentStatusRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } } void GetLocalDeploymentStatusRequest::s_loadFromJsonView( GetLocalDeploymentStatusRequest &getLocalDeploymentStatusRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { getLocalDeploymentStatusRequest.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } } const char *GetLocalDeploymentStatusRequest::MODEL_NAME = "aws.greengrass#GetLocalDeploymentStatusRequest"; Aws::Crt::String GetLocalDeploymentStatusRequest::GetModelName() const noexcept { return GetLocalDeploymentStatusRequest::MODEL_NAME; } Aws::Crt::ScopedResource GetLocalDeploymentStatusRequest::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), GetLocalDeploymentStatusRequest::s_customDeleter); shape->m_allocator = allocator; GetLocalDeploymentStatusRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetLocalDeploymentStatusRequest::s_customDeleter(GetLocalDeploymentStatusRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetConfigurationResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } if (m_value.has_value()) { payloadObject.WithObject("value", m_value.value()); } } void GetConfigurationResponse::s_loadFromJsonView( GetConfigurationResponse &getConfigurationResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { getConfigurationResponse.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } if (jsonView.ValueExists("value")) { getConfigurationResponse.m_value = Aws::Crt::Optional(jsonView.GetJsonObject("value").Materialize()); } } const char *GetConfigurationResponse::MODEL_NAME = "aws.greengrass#GetConfigurationResponse"; Aws::Crt::String GetConfigurationResponse::GetModelName() const noexcept { return GetConfigurationResponse::MODEL_NAME; } Aws::Crt::ScopedResource GetConfigurationResponse::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), GetConfigurationResponse::s_customDeleter); shape->m_allocator = allocator; GetConfigurationResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetConfigurationResponse::s_customDeleter(GetConfigurationResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetConfigurationRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } if (m_keyPath.has_value()) { Aws::Crt::JsonObject keyPath; Aws::Crt::Vector keyPathJsonArray; for (const auto &keyPathItem : m_keyPath.value()) { Aws::Crt::JsonObject keyPathJsonArrayItem; keyPathJsonArrayItem.AsString(keyPathItem); keyPathJsonArray.emplace_back(std::move(keyPathJsonArrayItem)); } keyPath.AsArray(std::move(keyPathJsonArray)); payloadObject.WithObject("keyPath", std::move(keyPath)); } } void GetConfigurationRequest::s_loadFromJsonView( GetConfigurationRequest &getConfigurationRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { getConfigurationRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } if (jsonView.ValueExists("keyPath")) { getConfigurationRequest.m_keyPath = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &keyPathJsonView : jsonView.GetArray("keyPath")) { Aws::Crt::Optional keyPathItem; keyPathItem = Aws::Crt::Optional(keyPathJsonView.AsString()); getConfigurationRequest.m_keyPath.value().push_back(keyPathItem.value()); } } } const char *GetConfigurationRequest::MODEL_NAME = "aws.greengrass#GetConfigurationRequest"; Aws::Crt::String GetConfigurationRequest::GetModelName() const noexcept { return GetConfigurationRequest::MODEL_NAME; } Aws::Crt::ScopedResource GetConfigurationRequest::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), GetConfigurationRequest::s_customDeleter); shape->m_allocator = allocator; GetConfigurationRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetConfigurationRequest::s_customDeleter(GetConfigurationRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetComponentDetailsResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentDetails.has_value()) { Aws::Crt::JsonObject componentDetailsValue; m_componentDetails.value().SerializeToJsonObject(componentDetailsValue); payloadObject.WithObject("componentDetails", std::move(componentDetailsValue)); } } void GetComponentDetailsResponse::s_loadFromJsonView( GetComponentDetailsResponse &getComponentDetailsResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentDetails")) { getComponentDetailsResponse.m_componentDetails = ComponentDetails(); ComponentDetails::s_loadFromJsonView( getComponentDetailsResponse.m_componentDetails.value(), jsonView.GetJsonObject("componentDetails")); } } const char *GetComponentDetailsResponse::MODEL_NAME = "aws.greengrass#GetComponentDetailsResponse"; Aws::Crt::String GetComponentDetailsResponse::GetModelName() const noexcept { return GetComponentDetailsResponse::MODEL_NAME; } Aws::Crt::ScopedResource GetComponentDetailsResponse::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), GetComponentDetailsResponse::s_customDeleter); shape->m_allocator = allocator; GetComponentDetailsResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetComponentDetailsResponse::s_customDeleter(GetComponentDetailsResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetComponentDetailsRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_componentName.has_value()) { payloadObject.WithString("componentName", m_componentName.value()); } } void GetComponentDetailsRequest::s_loadFromJsonView( GetComponentDetailsRequest &getComponentDetailsRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("componentName")) { getComponentDetailsRequest.m_componentName = Aws::Crt::Optional(jsonView.GetString("componentName")); } } const char *GetComponentDetailsRequest::MODEL_NAME = "aws.greengrass#GetComponentDetailsRequest"; Aws::Crt::String GetComponentDetailsRequest::GetModelName() const noexcept { return GetComponentDetailsRequest::MODEL_NAME; } Aws::Crt::ScopedResource GetComponentDetailsRequest::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), GetComponentDetailsRequest::s_customDeleter); shape->m_allocator = allocator; GetComponentDetailsRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetComponentDetailsRequest::s_customDeleter(GetComponentDetailsRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void InvalidCredentialError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void InvalidCredentialError::s_loadFromJsonView( InvalidCredentialError &invalidCredentialError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { invalidCredentialError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *InvalidCredentialError::MODEL_NAME = "aws.greengrass#InvalidCredentialError"; Aws::Crt::String InvalidCredentialError::GetModelName() const noexcept { return InvalidCredentialError::MODEL_NAME; } Aws::Crt::ScopedResource InvalidCredentialError::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), InvalidCredentialError::s_customDeleter); shape->m_allocator = allocator; InvalidCredentialError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void InvalidCredentialError::s_customDeleter(InvalidCredentialError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void GetClientDeviceAuthTokenResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_clientDeviceAuthToken.has_value()) { payloadObject.WithString("clientDeviceAuthToken", m_clientDeviceAuthToken.value()); } } void GetClientDeviceAuthTokenResponse::s_loadFromJsonView( GetClientDeviceAuthTokenResponse &getClientDeviceAuthTokenResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("clientDeviceAuthToken")) { getClientDeviceAuthTokenResponse.m_clientDeviceAuthToken = Aws::Crt::Optional(jsonView.GetString("clientDeviceAuthToken")); } } const char *GetClientDeviceAuthTokenResponse::MODEL_NAME = "aws.greengrass#GetClientDeviceAuthTokenResponse"; Aws::Crt::String GetClientDeviceAuthTokenResponse::GetModelName() const noexcept { return GetClientDeviceAuthTokenResponse::MODEL_NAME; } Aws::Crt::ScopedResource GetClientDeviceAuthTokenResponse::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), GetClientDeviceAuthTokenResponse::s_customDeleter); shape->m_allocator = allocator; GetClientDeviceAuthTokenResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void GetClientDeviceAuthTokenResponse::s_customDeleter(GetClientDeviceAuthTokenResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void GetClientDeviceAuthTokenRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_credential.has_value()) { Aws::Crt::JsonObject credentialDocumentValue; m_credential.value().SerializeToJsonObject(credentialDocumentValue); payloadObject.WithObject("credential", std::move(credentialDocumentValue)); } } 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 DeferComponentUpdateResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { (void)payloadObject; } void DeferComponentUpdateResponse::s_loadFromJsonView( DeferComponentUpdateResponse &deferComponentUpdateResponse, const Aws::Crt::JsonView &jsonView) noexcept { (void)deferComponentUpdateResponse; (void)jsonView; } const char *DeferComponentUpdateResponse::MODEL_NAME = "aws.greengrass#DeferComponentUpdateResponse"; Aws::Crt::String DeferComponentUpdateResponse::GetModelName() const noexcept { return DeferComponentUpdateResponse::MODEL_NAME; } Aws::Crt::ScopedResource DeferComponentUpdateResponse::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), DeferComponentUpdateResponse::s_customDeleter); shape->m_allocator = allocator; DeferComponentUpdateResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void DeferComponentUpdateResponse::s_customDeleter(DeferComponentUpdateResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void DeferComponentUpdateRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } if (m_recheckAfterMs.has_value()) { payloadObject.WithInt64("recheckAfterMs", m_recheckAfterMs.value()); } } void DeferComponentUpdateRequest::s_loadFromJsonView( DeferComponentUpdateRequest &deferComponentUpdateRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { deferComponentUpdateRequest.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } if (jsonView.ValueExists("message")) { deferComponentUpdateRequest.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } if (jsonView.ValueExists("recheckAfterMs")) { deferComponentUpdateRequest.m_recheckAfterMs = Aws::Crt::Optional(jsonView.GetInt64("recheckAfterMs")); } } const char *DeferComponentUpdateRequest::MODEL_NAME = "aws.greengrass#DeferComponentUpdateRequest"; Aws::Crt::String DeferComponentUpdateRequest::GetModelName() const noexcept { return DeferComponentUpdateRequest::MODEL_NAME; } Aws::Crt::ScopedResource DeferComponentUpdateRequest::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), DeferComponentUpdateRequest::s_customDeleter); shape->m_allocator = allocator; DeferComponentUpdateRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void DeferComponentUpdateRequest::s_customDeleter(DeferComponentUpdateRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void InvalidArtifactsDirectoryPathError::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void InvalidArtifactsDirectoryPathError::s_loadFromJsonView( InvalidArtifactsDirectoryPathError &invalidArtifactsDirectoryPathError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { invalidArtifactsDirectoryPathError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *InvalidArtifactsDirectoryPathError::MODEL_NAME = "aws.greengrass#InvalidArtifactsDirectoryPathError"; Aws::Crt::String InvalidArtifactsDirectoryPathError::GetModelName() const noexcept { return InvalidArtifactsDirectoryPathError::MODEL_NAME; } Aws::Crt::ScopedResource InvalidArtifactsDirectoryPathError::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), InvalidArtifactsDirectoryPathError::s_customDeleter); shape->m_allocator = allocator; InvalidArtifactsDirectoryPathError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void InvalidArtifactsDirectoryPathError::s_customDeleter(InvalidArtifactsDirectoryPathError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void InvalidRecipeDirectoryPathError::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void InvalidRecipeDirectoryPathError::s_loadFromJsonView( InvalidRecipeDirectoryPathError &invalidRecipeDirectoryPathError, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { invalidRecipeDirectoryPathError.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *InvalidRecipeDirectoryPathError::MODEL_NAME = "aws.greengrass#InvalidRecipeDirectoryPathError"; Aws::Crt::String InvalidRecipeDirectoryPathError::GetModelName() const noexcept { return InvalidRecipeDirectoryPathError::MODEL_NAME; } Aws::Crt::ScopedResource InvalidRecipeDirectoryPathError::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), InvalidRecipeDirectoryPathError::s_customDeleter); shape->m_allocator = allocator; InvalidRecipeDirectoryPathError::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, OperationError::s_customDeleter); } void InvalidRecipeDirectoryPathError::s_customDeleter(InvalidRecipeDirectoryPathError *shape) noexcept { OperationError::s_customDeleter(static_cast(shape)); } void CreateLocalDeploymentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } } void CreateLocalDeploymentResponse::s_loadFromJsonView( CreateLocalDeploymentResponse &createLocalDeploymentResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { createLocalDeploymentResponse.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } } const char *CreateLocalDeploymentResponse::MODEL_NAME = "aws.greengrass#CreateLocalDeploymentResponse"; Aws::Crt::String CreateLocalDeploymentResponse::GetModelName() const noexcept { return CreateLocalDeploymentResponse::MODEL_NAME; } Aws::Crt::ScopedResource CreateLocalDeploymentResponse::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), CreateLocalDeploymentResponse::s_customDeleter); shape->m_allocator = allocator; CreateLocalDeploymentResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void CreateLocalDeploymentResponse::s_customDeleter(CreateLocalDeploymentResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void CreateLocalDeploymentRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_groupName.has_value()) { payloadObject.WithString("groupName", m_groupName.value()); } if (m_rootComponentVersionsToAdd.has_value()) { Aws::Crt::JsonObject componentToVersionMapValue; for (const auto &componentToVersionMapItem : m_rootComponentVersionsToAdd.value()) { Aws::Crt::JsonObject componentToVersionMapJsonObject; componentToVersionMapJsonObject.AsString(componentToVersionMapItem.second); componentToVersionMapValue.WithObject( componentToVersionMapItem.first, std::move(componentToVersionMapJsonObject)); } payloadObject.WithObject("rootComponentVersionsToAdd", std::move(componentToVersionMapValue)); } if (m_rootComponentsToRemove.has_value()) { Aws::Crt::JsonObject componentList; Aws::Crt::Vector componentListJsonArray; for (const auto &componentListItem : m_rootComponentsToRemove.value()) { Aws::Crt::JsonObject componentListJsonArrayItem; componentListJsonArrayItem.AsString(componentListItem); componentListJsonArray.emplace_back(std::move(componentListJsonArrayItem)); } componentList.AsArray(std::move(componentListJsonArray)); payloadObject.WithObject("rootComponentsToRemove", std::move(componentList)); } if (m_componentToConfiguration.has_value()) { Aws::Crt::JsonObject componentToConfigurationValue; for (const auto &componentToConfigurationItem : m_componentToConfiguration.value()) { Aws::Crt::JsonObject componentToConfigurationJsonObject; componentToConfigurationJsonObject.AsObject(componentToConfigurationItem.second); componentToConfigurationValue.WithObject( componentToConfigurationItem.first, std::move(componentToConfigurationJsonObject)); } payloadObject.WithObject("componentToConfiguration", std::move(componentToConfigurationValue)); } if (m_componentToRunWithInfo.has_value()) { Aws::Crt::JsonObject componentToRunWithInfoValue; for (const auto &componentToRunWithInfoItem : m_componentToRunWithInfo.value()) { Aws::Crt::JsonObject componentToRunWithInfoJsonObject; componentToRunWithInfoItem.second.SerializeToJsonObject(componentToRunWithInfoJsonObject); componentToRunWithInfoValue.WithObject( componentToRunWithInfoItem.first, std::move(componentToRunWithInfoJsonObject)); } payloadObject.WithObject("componentToRunWithInfo", std::move(componentToRunWithInfoValue)); } if (m_recipeDirectoryPath.has_value()) { payloadObject.WithString("recipeDirectoryPath", m_recipeDirectoryPath.value()); } if (m_artifactsDirectoryPath.has_value()) { payloadObject.WithString("artifactsDirectoryPath", m_artifactsDirectoryPath.value()); } if (m_failureHandlingPolicy.has_value()) { payloadObject.WithString("failureHandlingPolicy", m_failureHandlingPolicy.value()); } } void CreateLocalDeploymentRequest::s_loadFromJsonView( CreateLocalDeploymentRequest &createLocalDeploymentRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("groupName")) { createLocalDeploymentRequest.m_groupName = Aws::Crt::Optional(jsonView.GetString("groupName")); } if (jsonView.ValueExists("rootComponentVersionsToAdd")) { createLocalDeploymentRequest.m_rootComponentVersionsToAdd = Aws::Crt::Map(); for (const auto &componentToVersionMapPair : jsonView.GetJsonObject("rootComponentVersionsToAdd").GetAllObjects()) { Aws::Crt::Optional componentToVersionMapValue; componentToVersionMapValue = Aws::Crt::Optional(componentToVersionMapPair.second.AsString()); createLocalDeploymentRequest.m_rootComponentVersionsToAdd.value()[componentToVersionMapPair.first] = componentToVersionMapValue.value(); } } if (jsonView.ValueExists("rootComponentsToRemove")) { createLocalDeploymentRequest.m_rootComponentsToRemove = Aws::Crt::Vector(); for (const Aws::Crt::JsonView &componentListJsonView : jsonView.GetArray("rootComponentsToRemove")) { Aws::Crt::Optional componentListItem; componentListItem = Aws::Crt::Optional(componentListJsonView.AsString()); createLocalDeploymentRequest.m_rootComponentsToRemove.value().push_back(componentListItem.value()); } } if (jsonView.ValueExists("componentToConfiguration")) { createLocalDeploymentRequest.m_componentToConfiguration = Aws::Crt::Map(); for (const auto &componentToConfigurationPair : jsonView.GetJsonObject("componentToConfiguration").GetAllObjects()) { Aws::Crt::Optional componentToConfigurationValue; componentToConfigurationValue = Aws::Crt::Optional( componentToConfigurationPair.second.AsObject().Materialize()); createLocalDeploymentRequest.m_componentToConfiguration .value()[componentToConfigurationPair.first] = componentToConfigurationValue.value(); } } if (jsonView.ValueExists("componentToRunWithInfo")) { createLocalDeploymentRequest.m_componentToRunWithInfo = Aws::Crt::Map(); for (const auto &componentToRunWithInfoPair : jsonView.GetJsonObject("componentToRunWithInfo").GetAllObjects()) { Aws::Crt::Optional componentToRunWithInfoValue; componentToRunWithInfoValue = RunWithInfo(); RunWithInfo::s_loadFromJsonView( componentToRunWithInfoValue.value(), componentToRunWithInfoPair.second); createLocalDeploymentRequest.m_componentToRunWithInfo.value()[componentToRunWithInfoPair.first] = componentToRunWithInfoValue.value(); } } if (jsonView.ValueExists("recipeDirectoryPath")) { createLocalDeploymentRequest.m_recipeDirectoryPath = Aws::Crt::Optional(jsonView.GetString("recipeDirectoryPath")); } if (jsonView.ValueExists("artifactsDirectoryPath")) { createLocalDeploymentRequest.m_artifactsDirectoryPath = Aws::Crt::Optional(jsonView.GetString("artifactsDirectoryPath")); } if (jsonView.ValueExists("failureHandlingPolicy")) { createLocalDeploymentRequest.m_failureHandlingPolicy = Aws::Crt::Optional(jsonView.GetString("failureHandlingPolicy")); } } void CreateLocalDeploymentRequest::SetFailureHandlingPolicy( FailureHandlingPolicy failureHandlingPolicy) noexcept { switch (failureHandlingPolicy) { case FAILURE_HANDLING_POLICY_ROLLBACK: m_failureHandlingPolicy = Aws::Crt::String("ROLLBACK"); break; case FAILURE_HANDLING_POLICY_DO_NOTHING: m_failureHandlingPolicy = Aws::Crt::String("DO_NOTHING"); break; default: break; } } Aws::Crt::Optional CreateLocalDeploymentRequest::GetFailureHandlingPolicy() noexcept { if (!m_failureHandlingPolicy.has_value()) return Aws::Crt::Optional(); if (m_failureHandlingPolicy.value() == Aws::Crt::String("ROLLBACK")) { return Aws::Crt::Optional(FAILURE_HANDLING_POLICY_ROLLBACK); } if (m_failureHandlingPolicy.value() == Aws::Crt::String("DO_NOTHING")) { return Aws::Crt::Optional(FAILURE_HANDLING_POLICY_DO_NOTHING); } return Aws::Crt::Optional(); } const char *CreateLocalDeploymentRequest::MODEL_NAME = "aws.greengrass#CreateLocalDeploymentRequest"; Aws::Crt::String CreateLocalDeploymentRequest::GetModelName() const noexcept { return CreateLocalDeploymentRequest::MODEL_NAME; } Aws::Crt::ScopedResource CreateLocalDeploymentRequest::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), CreateLocalDeploymentRequest::s_customDeleter); shape->m_allocator = allocator; CreateLocalDeploymentRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void CreateLocalDeploymentRequest::s_customDeleter(CreateLocalDeploymentRequest *shape) noexcept { 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 CancelLocalDeploymentResponse::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_message.has_value()) { payloadObject.WithString("message", m_message.value()); } } void CancelLocalDeploymentResponse::s_loadFromJsonView( CancelLocalDeploymentResponse &cancelLocalDeploymentResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("message")) { cancelLocalDeploymentResponse.m_message = Aws::Crt::Optional(jsonView.GetString("message")); } } const char *CancelLocalDeploymentResponse::MODEL_NAME = "aws.greengrass#CancelLocalDeploymentResponse"; Aws::Crt::String CancelLocalDeploymentResponse::GetModelName() const noexcept { return CancelLocalDeploymentResponse::MODEL_NAME; } Aws::Crt::ScopedResource CancelLocalDeploymentResponse::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), CancelLocalDeploymentResponse::s_customDeleter); shape->m_allocator = allocator; CancelLocalDeploymentResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void CancelLocalDeploymentResponse::s_customDeleter(CancelLocalDeploymentResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void CancelLocalDeploymentRequest::SerializeToJsonObject(Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_deploymentId.has_value()) { payloadObject.WithString("deploymentId", m_deploymentId.value()); } } void CancelLocalDeploymentRequest::s_loadFromJsonView( CancelLocalDeploymentRequest &cancelLocalDeploymentRequest, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("deploymentId")) { cancelLocalDeploymentRequest.m_deploymentId = Aws::Crt::Optional(jsonView.GetString("deploymentId")); } } const char *CancelLocalDeploymentRequest::MODEL_NAME = "aws.greengrass#CancelLocalDeploymentRequest"; Aws::Crt::String CancelLocalDeploymentRequest::GetModelName() const noexcept { return CancelLocalDeploymentRequest::MODEL_NAME; } Aws::Crt::ScopedResource CancelLocalDeploymentRequest::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), CancelLocalDeploymentRequest::s_customDeleter); shape->m_allocator = allocator; CancelLocalDeploymentRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void CancelLocalDeploymentRequest::s_customDeleter(CancelLocalDeploymentRequest *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 AuthorizeClientDeviceActionResponse::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { if (m_isAuthorized.has_value()) { payloadObject.WithBool("isAuthorized", m_isAuthorized.value()); } } void AuthorizeClientDeviceActionResponse::s_loadFromJsonView( AuthorizeClientDeviceActionResponse &authorizeClientDeviceActionResponse, const Aws::Crt::JsonView &jsonView) noexcept { if (jsonView.ValueExists("isAuthorized")) { authorizeClientDeviceActionResponse.m_isAuthorized = Aws::Crt::Optional(jsonView.GetBool("isAuthorized")); } } const char *AuthorizeClientDeviceActionResponse::MODEL_NAME = "aws.greengrass#AuthorizeClientDeviceActionResponse"; Aws::Crt::String AuthorizeClientDeviceActionResponse::GetModelName() const noexcept { return AuthorizeClientDeviceActionResponse::MODEL_NAME; } Aws::Crt::ScopedResource AuthorizeClientDeviceActionResponse::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), AuthorizeClientDeviceActionResponse::s_customDeleter); shape->m_allocator = allocator; AuthorizeClientDeviceActionResponse::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void AuthorizeClientDeviceActionResponse::s_customDeleter(AuthorizeClientDeviceActionResponse *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void AuthorizeClientDeviceActionRequest::SerializeToJsonObject( Aws::Crt::JsonObject &payloadObject) const noexcept { 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 AuthorizeClientDeviceActionRequest::s_loadFromJsonView( AuthorizeClientDeviceActionRequest &authorizeClientDeviceActionRequest, const Aws::Crt::JsonView &jsonView) noexcept { 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 *AuthorizeClientDeviceActionRequest::MODEL_NAME = "aws.greengrass#AuthorizeClientDeviceActionRequest"; Aws::Crt::String AuthorizeClientDeviceActionRequest::GetModelName() const noexcept { return AuthorizeClientDeviceActionRequest::MODEL_NAME; } Aws::Crt::ScopedResource AuthorizeClientDeviceActionRequest::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), AuthorizeClientDeviceActionRequest::s_customDeleter); shape->m_allocator = allocator; AuthorizeClientDeviceActionRequest::s_loadFromJsonView(*shape, jsonView); auto operationResponse = static_cast(shape.release()); return Aws::Crt::ScopedResource(operationResponse, AbstractShapeBase::s_customDeleter); } void AuthorizeClientDeviceActionRequest::s_customDeleter(AuthorizeClientDeviceActionRequest *shape) noexcept { AbstractShapeBase::s_customDeleter(static_cast(shape)); } void SubscribeToIoTCoreStreamHandler::OnStreamEvent(Aws::Crt::ScopedResource response) { OnStreamEvent(static_cast(response.get())); } bool SubscribeToIoTCoreStreamHandler::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 && !streamShouldTerminate) streamShouldTerminate = OnStreamError(operationError.get()); return streamShouldTerminate; } SubscribeToIoTCoreOperationContext::SubscribeToIoTCoreOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource SubscribeToIoTCoreOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SubscribeToIoTCoreResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource SubscribeToIoTCoreOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return IoTCoreMessage::s_allocateFromPayload(stringView, allocator); } Aws::Crt::String SubscribeToIoTCoreOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToIoTCoreRequest"); } Aws::Crt::String SubscribeToIoTCoreOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToIoTCoreResponse"); } Aws::Crt::Optional SubscribeToIoTCoreOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#IoTCoreMessage"); } Aws::Crt::String SubscribeToIoTCoreOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToIoTCore"); } std::future SubscribeToIoTCoreOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return SubscribeToIoTCoreResult(GetOperationResult().get()); }); } SubscribeToIoTCoreOperation::SubscribeToIoTCoreOperation( ClientConnection &connection, std::shared_ptr streamHandler, const SubscribeToIoTCoreOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, streamHandler, operationContext, allocator) { } std::future SubscribeToIoTCoreOperation::Activate( const SubscribeToIoTCoreRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String SubscribeToIoTCoreOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } ResumeComponentOperationContext::ResumeComponentOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource ResumeComponentOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ResumeComponentResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource ResumeComponentOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String ResumeComponentOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ResumeComponentRequest"); } Aws::Crt::String ResumeComponentOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ResumeComponentResponse"); } Aws::Crt::Optional ResumeComponentOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String ResumeComponentOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#ResumeComponent"); } std::future ResumeComponentOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return ResumeComponentResult(GetOperationResult().get()); }); } ResumeComponentOperation::ResumeComponentOperation( ClientConnection &connection, const ResumeComponentOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future ResumeComponentOperation::Activate( const ResumeComponentRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String ResumeComponentOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } PublishToIoTCoreOperationContext::PublishToIoTCoreOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource PublishToIoTCoreOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return PublishToIoTCoreResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource PublishToIoTCoreOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String PublishToIoTCoreOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PublishToIoTCoreRequest"); } Aws::Crt::String PublishToIoTCoreOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PublishToIoTCoreResponse"); } Aws::Crt::Optional PublishToIoTCoreOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String PublishToIoTCoreOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#PublishToIoTCore"); } std::future PublishToIoTCoreOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return PublishToIoTCoreResult(GetOperationResult().get()); }); } PublishToIoTCoreOperation::PublishToIoTCoreOperation( ClientConnection &connection, const PublishToIoTCoreOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future PublishToIoTCoreOperation::Activate( const PublishToIoTCoreRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String PublishToIoTCoreOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } void SubscribeToConfigurationUpdateStreamHandler::OnStreamEvent( Aws::Crt::ScopedResource response) { OnStreamEvent(static_cast(response.get())); } bool SubscribeToConfigurationUpdateStreamHandler::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#ResourceNotFoundError") && !streamShouldTerminate) { streamShouldTerminate = OnStreamError(static_cast(operationError.get())); } if (operationError != nullptr && !streamShouldTerminate) streamShouldTerminate = OnStreamError(operationError.get()); return streamShouldTerminate; } SubscribeToConfigurationUpdateOperationContext::SubscribeToConfigurationUpdateOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource SubscribeToConfigurationUpdateOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SubscribeToConfigurationUpdateResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource SubscribeToConfigurationUpdateOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ConfigurationUpdateEvents::s_allocateFromPayload(stringView, allocator); } Aws::Crt::String SubscribeToConfigurationUpdateOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToConfigurationUpdateRequest"); } Aws::Crt::String SubscribeToConfigurationUpdateOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToConfigurationUpdateResponse"); } Aws::Crt::Optional SubscribeToConfigurationUpdateOperationContext:: GetStreamingResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ConfigurationUpdateEvents"); } Aws::Crt::String SubscribeToConfigurationUpdateOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToConfigurationUpdate"); } std::future SubscribeToConfigurationUpdateOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return SubscribeToConfigurationUpdateResult(GetOperationResult().get()); }); } SubscribeToConfigurationUpdateOperation::SubscribeToConfigurationUpdateOperation( ClientConnection &connection, std::shared_ptr streamHandler, const SubscribeToConfigurationUpdateOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, streamHandler, operationContext, allocator) { } std::future SubscribeToConfigurationUpdateOperation::Activate( const SubscribeToConfigurationUpdateRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String SubscribeToConfigurationUpdateOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } DeleteThingShadowOperationContext::DeleteThingShadowOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource DeleteThingShadowOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return DeleteThingShadowResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource DeleteThingShadowOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String DeleteThingShadowOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#DeleteThingShadowRequest"); } Aws::Crt::String DeleteThingShadowOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#DeleteThingShadowResponse"); } Aws::Crt::Optional DeleteThingShadowOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String DeleteThingShadowOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#DeleteThingShadow"); } std::future DeleteThingShadowOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return DeleteThingShadowResult(GetOperationResult().get()); }); } DeleteThingShadowOperation::DeleteThingShadowOperation( ClientConnection &connection, const DeleteThingShadowOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future DeleteThingShadowOperation::Activate( const DeleteThingShadowRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String DeleteThingShadowOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } PutComponentMetricOperationContext::PutComponentMetricOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource PutComponentMetricOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return PutComponentMetricResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource PutComponentMetricOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String PutComponentMetricOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PutComponentMetricRequest"); } Aws::Crt::String PutComponentMetricOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PutComponentMetricResponse"); } Aws::Crt::Optional PutComponentMetricOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String PutComponentMetricOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#PutComponentMetric"); } std::future PutComponentMetricOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return PutComponentMetricResult(GetOperationResult().get()); }); } PutComponentMetricOperation::PutComponentMetricOperation( ClientConnection &connection, const PutComponentMetricOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future PutComponentMetricOperation::Activate( const PutComponentMetricRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String PutComponentMetricOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } DeferComponentUpdateOperationContext::DeferComponentUpdateOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource DeferComponentUpdateOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return DeferComponentUpdateResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource DeferComponentUpdateOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String DeferComponentUpdateOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#DeferComponentUpdateRequest"); } Aws::Crt::String DeferComponentUpdateOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#DeferComponentUpdateResponse"); } Aws::Crt::Optional DeferComponentUpdateOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String DeferComponentUpdateOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#DeferComponentUpdate"); } std::future DeferComponentUpdateOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return DeferComponentUpdateResult(GetOperationResult().get()); }); } DeferComponentUpdateOperation::DeferComponentUpdateOperation( ClientConnection &connection, const DeferComponentUpdateOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future DeferComponentUpdateOperation::Activate( const DeferComponentUpdateRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String DeferComponentUpdateOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } void SubscribeToValidateConfigurationUpdatesStreamHandler::OnStreamEvent( Aws::Crt::ScopedResource response) { OnStreamEvent(static_cast(response.get())); } bool SubscribeToValidateConfigurationUpdatesStreamHandler::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 && !streamShouldTerminate) streamShouldTerminate = OnStreamError(operationError.get()); return streamShouldTerminate; } SubscribeToValidateConfigurationUpdatesOperationContext:: SubscribeToValidateConfigurationUpdatesOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource SubscribeToValidateConfigurationUpdatesOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SubscribeToValidateConfigurationUpdatesResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource SubscribeToValidateConfigurationUpdatesOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ValidateConfigurationUpdateEvents::s_allocateFromPayload(stringView, allocator); } Aws::Crt::String SubscribeToValidateConfigurationUpdatesOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToValidateConfigurationUpdatesRequest"); } Aws::Crt::String SubscribeToValidateConfigurationUpdatesOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToValidateConfigurationUpdatesResponse"); } Aws::Crt::Optional SubscribeToValidateConfigurationUpdatesOperationContext:: GetStreamingResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ValidateConfigurationUpdateEvents"); } Aws::Crt::String SubscribeToValidateConfigurationUpdatesOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToValidateConfigurationUpdates"); } std::future SubscribeToValidateConfigurationUpdatesOperation:: GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return SubscribeToValidateConfigurationUpdatesResult(GetOperationResult().get()); }); } SubscribeToValidateConfigurationUpdatesOperation::SubscribeToValidateConfigurationUpdatesOperation( ClientConnection &connection, std::shared_ptr streamHandler, const SubscribeToValidateConfigurationUpdatesOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, streamHandler, operationContext, allocator) { } std::future SubscribeToValidateConfigurationUpdatesOperation::Activate( const SubscribeToValidateConfigurationUpdatesRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String SubscribeToValidateConfigurationUpdatesOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } GetConfigurationOperationContext::GetConfigurationOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource GetConfigurationOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return GetConfigurationResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource GetConfigurationOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String GetConfigurationOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetConfigurationRequest"); } Aws::Crt::String GetConfigurationOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetConfigurationResponse"); } Aws::Crt::Optional GetConfigurationOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String GetConfigurationOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#GetConfiguration"); } std::future GetConfigurationOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return GetConfigurationResult(GetOperationResult().get()); }); } GetConfigurationOperation::GetConfigurationOperation( ClientConnection &connection, const GetConfigurationOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future GetConfigurationOperation::Activate( const GetConfigurationRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String GetConfigurationOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } void SubscribeToTopicStreamHandler::OnStreamEvent(Aws::Crt::ScopedResource response) { OnStreamEvent(static_cast(response.get())); } bool SubscribeToTopicStreamHandler::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#InvalidArgumentsError") && !streamShouldTerminate) { streamShouldTerminate = OnStreamError(static_cast(operationError.get())); } 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 && !streamShouldTerminate) streamShouldTerminate = OnStreamError(operationError.get()); return streamShouldTerminate; } SubscribeToTopicOperationContext::SubscribeToTopicOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource SubscribeToTopicOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SubscribeToTopicResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource SubscribeToTopicOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SubscriptionResponseMessage::s_allocateFromPayload(stringView, allocator); } Aws::Crt::String SubscribeToTopicOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToTopicRequest"); } Aws::Crt::String SubscribeToTopicOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToTopicResponse"); } Aws::Crt::Optional SubscribeToTopicOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscriptionResponseMessage"); } Aws::Crt::String SubscribeToTopicOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToTopic"); } std::future SubscribeToTopicOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return SubscribeToTopicResult(GetOperationResult().get()); }); } SubscribeToTopicOperation::SubscribeToTopicOperation( ClientConnection &connection, std::shared_ptr streamHandler, const SubscribeToTopicOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, streamHandler, operationContext, allocator) { } std::future SubscribeToTopicOperation::Activate( const SubscribeToTopicRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String SubscribeToTopicOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } GetComponentDetailsOperationContext::GetComponentDetailsOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource GetComponentDetailsOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return GetComponentDetailsResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource GetComponentDetailsOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String GetComponentDetailsOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetComponentDetailsRequest"); } Aws::Crt::String GetComponentDetailsOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetComponentDetailsResponse"); } Aws::Crt::Optional GetComponentDetailsOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String GetComponentDetailsOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#GetComponentDetails"); } std::future GetComponentDetailsOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return GetComponentDetailsResult(GetOperationResult().get()); }); } GetComponentDetailsOperation::GetComponentDetailsOperation( ClientConnection &connection, const GetComponentDetailsOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future GetComponentDetailsOperation::Activate( const GetComponentDetailsRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String GetComponentDetailsOperation::GetModelName() const noexcept { 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( m_asyncLaunchMode, [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) { } Aws::Crt::ScopedResource PublishToTopicOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return PublishToTopicResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource PublishToTopicOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String PublishToTopicOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PublishToTopicRequest"); } Aws::Crt::String PublishToTopicOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PublishToTopicResponse"); } Aws::Crt::Optional PublishToTopicOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String PublishToTopicOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#PublishToTopic"); } std::future PublishToTopicOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return PublishToTopicResult(GetOperationResult().get()); }); } PublishToTopicOperation::PublishToTopicOperation( ClientConnection &connection, const PublishToTopicOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future PublishToTopicOperation::Activate( const PublishToTopicRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String PublishToTopicOperation::GetModelName() const noexcept { 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(m_asyncLaunchMode, [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( m_asyncLaunchMode, [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( m_asyncLaunchMode, [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) { } Aws::Crt::ScopedResource ListComponentsOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ListComponentsResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource ListComponentsOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String ListComponentsOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ListComponentsRequest"); } Aws::Crt::String ListComponentsOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ListComponentsResponse"); } Aws::Crt::Optional ListComponentsOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String ListComponentsOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#ListComponents"); } std::future ListComponentsOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return ListComponentsResult(GetOperationResult().get()); }); } ListComponentsOperation::ListComponentsOperation( ClientConnection &connection, const ListComponentsOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future ListComponentsOperation::Activate( const ListComponentsRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String ListComponentsOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } CreateDebugPasswordOperationContext::CreateDebugPasswordOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource CreateDebugPasswordOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return CreateDebugPasswordResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource CreateDebugPasswordOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String CreateDebugPasswordOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#CreateDebugPasswordRequest"); } Aws::Crt::String CreateDebugPasswordOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#CreateDebugPasswordResponse"); } Aws::Crt::Optional CreateDebugPasswordOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String CreateDebugPasswordOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#CreateDebugPassword"); } std::future CreateDebugPasswordOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return CreateDebugPasswordResult(GetOperationResult().get()); }); } CreateDebugPasswordOperation::CreateDebugPasswordOperation( ClientConnection &connection, const CreateDebugPasswordOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future CreateDebugPasswordOperation::Activate( const CreateDebugPasswordRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String CreateDebugPasswordOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } GetThingShadowOperationContext::GetThingShadowOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource GetThingShadowOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return GetThingShadowResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource GetThingShadowOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String GetThingShadowOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetThingShadowRequest"); } Aws::Crt::String GetThingShadowOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetThingShadowResponse"); } Aws::Crt::Optional GetThingShadowOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String GetThingShadowOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#GetThingShadow"); } std::future GetThingShadowOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return GetThingShadowResult(GetOperationResult().get()); }); } GetThingShadowOperation::GetThingShadowOperation( ClientConnection &connection, const GetThingShadowOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future GetThingShadowOperation::Activate( const GetThingShadowRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String GetThingShadowOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } SendConfigurationValidityReportOperationContext::SendConfigurationValidityReportOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource SendConfigurationValidityReportOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SendConfigurationValidityReportResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource SendConfigurationValidityReportOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String SendConfigurationValidityReportOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SendConfigurationValidityReportRequest"); } Aws::Crt::String SendConfigurationValidityReportOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SendConfigurationValidityReportResponse"); } Aws::Crt::Optional SendConfigurationValidityReportOperationContext:: GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String SendConfigurationValidityReportOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#SendConfigurationValidityReport"); } std::future SendConfigurationValidityReportOperation:: GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return SendConfigurationValidityReportResult(GetOperationResult().get()); }); } SendConfigurationValidityReportOperation::SendConfigurationValidityReportOperation( ClientConnection &connection, const SendConfigurationValidityReportOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future SendConfigurationValidityReportOperation::Activate( const SendConfigurationValidityReportRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String SendConfigurationValidityReportOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } UpdateThingShadowOperationContext::UpdateThingShadowOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource UpdateThingShadowOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return UpdateThingShadowResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource UpdateThingShadowOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String UpdateThingShadowOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateThingShadowRequest"); } Aws::Crt::String UpdateThingShadowOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateThingShadowResponse"); } Aws::Crt::Optional UpdateThingShadowOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String UpdateThingShadowOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateThingShadow"); } std::future UpdateThingShadowOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return UpdateThingShadowResult(GetOperationResult().get()); }); } UpdateThingShadowOperation::UpdateThingShadowOperation( ClientConnection &connection, const UpdateThingShadowOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future UpdateThingShadowOperation::Activate( const UpdateThingShadowRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String UpdateThingShadowOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } UpdateConfigurationOperationContext::UpdateConfigurationOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource UpdateConfigurationOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return UpdateConfigurationResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource UpdateConfigurationOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String UpdateConfigurationOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateConfigurationRequest"); } Aws::Crt::String UpdateConfigurationOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateConfigurationResponse"); } Aws::Crt::Optional UpdateConfigurationOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String UpdateConfigurationOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateConfiguration"); } std::future UpdateConfigurationOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return UpdateConfigurationResult(GetOperationResult().get()); }); } UpdateConfigurationOperation::UpdateConfigurationOperation( ClientConnection &connection, const UpdateConfigurationOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future UpdateConfigurationOperation::Activate( const UpdateConfigurationRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String UpdateConfigurationOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } ValidateAuthorizationTokenOperationContext::ValidateAuthorizationTokenOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource ValidateAuthorizationTokenOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ValidateAuthorizationTokenResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource ValidateAuthorizationTokenOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String ValidateAuthorizationTokenOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ValidateAuthorizationTokenRequest"); } Aws::Crt::String ValidateAuthorizationTokenOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ValidateAuthorizationTokenResponse"); } Aws::Crt::Optional ValidateAuthorizationTokenOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String ValidateAuthorizationTokenOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#ValidateAuthorizationToken"); } std::future ValidateAuthorizationTokenOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return ValidateAuthorizationTokenResult(GetOperationResult().get()); }); } ValidateAuthorizationTokenOperation::ValidateAuthorizationTokenOperation( ClientConnection &connection, const ValidateAuthorizationTokenOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future ValidateAuthorizationTokenOperation::Activate( const ValidateAuthorizationTokenRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String ValidateAuthorizationTokenOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } RestartComponentOperationContext::RestartComponentOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource RestartComponentOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return RestartComponentResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource RestartComponentOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String RestartComponentOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#RestartComponentRequest"); } Aws::Crt::String RestartComponentOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#RestartComponentResponse"); } Aws::Crt::Optional RestartComponentOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String RestartComponentOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#RestartComponent"); } std::future RestartComponentOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return RestartComponentResult(GetOperationResult().get()); }); } RestartComponentOperation::RestartComponentOperation( ClientConnection &connection, const RestartComponentOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future RestartComponentOperation::Activate( const RestartComponentRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String RestartComponentOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } GetLocalDeploymentStatusOperationContext::GetLocalDeploymentStatusOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource GetLocalDeploymentStatusOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return GetLocalDeploymentStatusResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource GetLocalDeploymentStatusOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String GetLocalDeploymentStatusOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetLocalDeploymentStatusRequest"); } Aws::Crt::String GetLocalDeploymentStatusOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetLocalDeploymentStatusResponse"); } Aws::Crt::Optional GetLocalDeploymentStatusOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String GetLocalDeploymentStatusOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#GetLocalDeploymentStatus"); } std::future GetLocalDeploymentStatusOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return GetLocalDeploymentStatusResult(GetOperationResult().get()); }); } GetLocalDeploymentStatusOperation::GetLocalDeploymentStatusOperation( ClientConnection &connection, const GetLocalDeploymentStatusOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future GetLocalDeploymentStatusOperation::Activate( const GetLocalDeploymentStatusRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String GetLocalDeploymentStatusOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } GetSecretValueOperationContext::GetSecretValueOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource GetSecretValueOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return GetSecretValueResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource GetSecretValueOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String GetSecretValueOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetSecretValueRequest"); } Aws::Crt::String GetSecretValueOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#GetSecretValueResponse"); } Aws::Crt::Optional GetSecretValueOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String GetSecretValueOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#GetSecretValue"); } std::future GetSecretValueOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return GetSecretValueResult(GetOperationResult().get()); }); } GetSecretValueOperation::GetSecretValueOperation( ClientConnection &connection, const GetSecretValueOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future GetSecretValueOperation::Activate( const GetSecretValueRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String GetSecretValueOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } UpdateStateOperationContext::UpdateStateOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource UpdateStateOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return UpdateStateResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource UpdateStateOperationContext::AllocateStreamingResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String UpdateStateOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateStateRequest"); } Aws::Crt::String UpdateStateOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateStateResponse"); } Aws::Crt::Optional UpdateStateOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String UpdateStateOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#UpdateState"); } std::future UpdateStateOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return UpdateStateResult(GetOperationResult().get()); }); } UpdateStateOperation::UpdateStateOperation( ClientConnection &connection, const UpdateStateOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future UpdateStateOperation::Activate( const UpdateStateRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String UpdateStateOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } CancelLocalDeploymentOperationContext::CancelLocalDeploymentOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource CancelLocalDeploymentOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return CancelLocalDeploymentResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource CancelLocalDeploymentOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String CancelLocalDeploymentOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#CancelLocalDeploymentRequest"); } Aws::Crt::String CancelLocalDeploymentOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#CancelLocalDeploymentResponse"); } Aws::Crt::Optional CancelLocalDeploymentOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String CancelLocalDeploymentOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#CancelLocalDeployment"); } std::future CancelLocalDeploymentOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return CancelLocalDeploymentResult(GetOperationResult().get()); }); } CancelLocalDeploymentOperation::CancelLocalDeploymentOperation( ClientConnection &connection, const CancelLocalDeploymentOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future CancelLocalDeploymentOperation::Activate( const CancelLocalDeploymentRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String CancelLocalDeploymentOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } ListNamedShadowsForThingOperationContext::ListNamedShadowsForThingOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource ListNamedShadowsForThingOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ListNamedShadowsForThingResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource ListNamedShadowsForThingOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String ListNamedShadowsForThingOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ListNamedShadowsForThingRequest"); } Aws::Crt::String ListNamedShadowsForThingOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ListNamedShadowsForThingResponse"); } Aws::Crt::Optional ListNamedShadowsForThingOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String ListNamedShadowsForThingOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#ListNamedShadowsForThing"); } std::future ListNamedShadowsForThingOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return ListNamedShadowsForThingResult(GetOperationResult().get()); }); } ListNamedShadowsForThingOperation::ListNamedShadowsForThingOperation( ClientConnection &connection, const ListNamedShadowsForThingOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future ListNamedShadowsForThingOperation::Activate( const ListNamedShadowsForThingRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String ListNamedShadowsForThingOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } void SubscribeToComponentUpdatesStreamHandler::OnStreamEvent( Aws::Crt::ScopedResource response) { OnStreamEvent(static_cast(response.get())); } bool SubscribeToComponentUpdatesStreamHandler::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#ResourceNotFoundError") && !streamShouldTerminate) { streamShouldTerminate = OnStreamError(static_cast(operationError.get())); } if (operationError != nullptr && !streamShouldTerminate) streamShouldTerminate = OnStreamError(operationError.get()); return streamShouldTerminate; } SubscribeToComponentUpdatesOperationContext::SubscribeToComponentUpdatesOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource SubscribeToComponentUpdatesOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return SubscribeToComponentUpdatesResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource SubscribeToComponentUpdatesOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ComponentUpdatePolicyEvents::s_allocateFromPayload(stringView, allocator); } Aws::Crt::String SubscribeToComponentUpdatesOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToComponentUpdatesRequest"); } Aws::Crt::String SubscribeToComponentUpdatesOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToComponentUpdatesResponse"); } Aws::Crt::Optional SubscribeToComponentUpdatesOperationContext:: GetStreamingResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ComponentUpdatePolicyEvents"); } Aws::Crt::String SubscribeToComponentUpdatesOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#SubscribeToComponentUpdates"); } std::future SubscribeToComponentUpdatesOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return SubscribeToComponentUpdatesResult(GetOperationResult().get()); }); } SubscribeToComponentUpdatesOperation::SubscribeToComponentUpdatesOperation( ClientConnection &connection, std::shared_ptr streamHandler, const SubscribeToComponentUpdatesOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, streamHandler, operationContext, allocator) { } std::future SubscribeToComponentUpdatesOperation::Activate( const SubscribeToComponentUpdatesRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String SubscribeToComponentUpdatesOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } ListLocalDeploymentsOperationContext::ListLocalDeploymentsOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource ListLocalDeploymentsOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return ListLocalDeploymentsResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource ListLocalDeploymentsOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String ListLocalDeploymentsOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ListLocalDeploymentsRequest"); } Aws::Crt::String ListLocalDeploymentsOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#ListLocalDeploymentsResponse"); } Aws::Crt::Optional ListLocalDeploymentsOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String ListLocalDeploymentsOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#ListLocalDeployments"); } std::future ListLocalDeploymentsOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return ListLocalDeploymentsResult(GetOperationResult().get()); }); } ListLocalDeploymentsOperation::ListLocalDeploymentsOperation( ClientConnection &connection, const ListLocalDeploymentsOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future ListLocalDeploymentsOperation::Activate( const ListLocalDeploymentsRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String ListLocalDeploymentsOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } StopComponentOperationContext::StopComponentOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource StopComponentOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return StopComponentResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource StopComponentOperationContext::AllocateStreamingResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String StopComponentOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#StopComponentRequest"); } Aws::Crt::String StopComponentOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#StopComponentResponse"); } Aws::Crt::Optional StopComponentOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String StopComponentOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#StopComponent"); } std::future StopComponentOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return StopComponentResult(GetOperationResult().get()); }); } StopComponentOperation::StopComponentOperation( ClientConnection &connection, const StopComponentOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future StopComponentOperation::Activate( const StopComponentRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String StopComponentOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } PauseComponentOperationContext::PauseComponentOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource PauseComponentOperationContext::AllocateInitialResponseFromPayload( Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return PauseComponentResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource PauseComponentOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String PauseComponentOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PauseComponentRequest"); } Aws::Crt::String PauseComponentOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#PauseComponentResponse"); } Aws::Crt::Optional PauseComponentOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String PauseComponentOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#PauseComponent"); } std::future PauseComponentOperation::GetResult() noexcept { return std::async(m_asyncLaunchMode, [this]() { return PauseComponentResult(GetOperationResult().get()); }); } PauseComponentOperation::PauseComponentOperation( ClientConnection &connection, const PauseComponentOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future PauseComponentOperation::Activate( const PauseComponentRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String PauseComponentOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } CreateLocalDeploymentOperationContext::CreateLocalDeploymentOperationContext( const GreengrassCoreIpcServiceModel &serviceModel) noexcept : OperationModelContext(serviceModel) { } Aws::Crt::ScopedResource CreateLocalDeploymentOperationContext:: AllocateInitialResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { return CreateLocalDeploymentResponse::s_allocateFromPayload(stringView, allocator); } Aws::Crt::ScopedResource CreateLocalDeploymentOperationContext:: AllocateStreamingResponseFromPayload(Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { (void)stringView; (void)allocator; return nullptr; } Aws::Crt::String CreateLocalDeploymentOperationContext::GetRequestModelName() const noexcept { return Aws::Crt::String("aws.greengrass#CreateLocalDeploymentRequest"); } Aws::Crt::String CreateLocalDeploymentOperationContext::GetInitialResponseModelName() const noexcept { return Aws::Crt::String("aws.greengrass#CreateLocalDeploymentResponse"); } Aws::Crt::Optional CreateLocalDeploymentOperationContext::GetStreamingResponseModelName() const noexcept { return Aws::Crt::Optional(); } Aws::Crt::String CreateLocalDeploymentOperationContext::GetOperationName() const noexcept { return Aws::Crt::String("aws.greengrass#CreateLocalDeployment"); } std::future CreateLocalDeploymentOperation::GetResult() noexcept { return std::async( m_asyncLaunchMode, [this]() { return CreateLocalDeploymentResult(GetOperationResult().get()); }); } CreateLocalDeploymentOperation::CreateLocalDeploymentOperation( ClientConnection &connection, const CreateLocalDeploymentOperationContext &operationContext, Aws::Crt::Allocator *allocator) noexcept : ClientOperation(connection, nullptr, operationContext, allocator) { } std::future CreateLocalDeploymentOperation::Activate( const CreateLocalDeploymentRequest &request, OnMessageFlushCallback onMessageFlushCallback) noexcept { return ClientOperation::Activate(static_cast(&request), onMessageFlushCallback); } Aws::Crt::String CreateLocalDeploymentOperation::GetModelName() const noexcept { return m_operationModelContext.GetOperationName(); } GreengrassCoreIpcServiceModel::GreengrassCoreIpcServiceModel() noexcept : m_subscribeToIoTCoreOperationContext(*this), m_resumeComponentOperationContext(*this), m_publishToIoTCoreOperationContext(*this), m_subscribeToConfigurationUpdateOperationContext(*this), m_deleteThingShadowOperationContext(*this), m_putComponentMetricOperationContext(*this), m_deferComponentUpdateOperationContext(*this), m_subscribeToValidateConfigurationUpdatesOperationContext(*this), m_getConfigurationOperationContext(*this), m_subscribeToTopicOperationContext(*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), m_validateAuthorizationTokenOperationContext(*this), m_restartComponentOperationContext(*this), m_getLocalDeploymentStatusOperationContext(*this), m_getSecretValueOperationContext(*this), m_updateStateOperationContext(*this), m_cancelLocalDeploymentOperationContext(*this), m_listNamedShadowsForThingOperationContext(*this), m_subscribeToComponentUpdatesOperationContext(*this), m_listLocalDeploymentsOperationContext(*this), m_stopComponentOperationContext(*this), m_pauseComponentOperationContext(*this), m_createLocalDeploymentOperationContext(*this) { } Aws::Crt::ScopedResource GreengrassCoreIpcServiceModel::AllocateOperationErrorFromPayload( const Aws::Crt::String &errorModelName, Aws::Crt::StringView stringView, Aws::Crt::Allocator *allocator) const noexcept { auto it = m_modelNameToErrorResponse.find(errorModelName); if (it == m_modelNameToErrorResponse.end()) { return nullptr; } else { return it->second(stringView, allocator); } } void GreengrassCoreIpcServiceModel::AssignModelNameToErrorResponse( Aws::Crt::String modelName, ErrorResponseFactory factory) noexcept { m_modelNameToErrorResponse[modelName] = factory; } } // namespace Greengrass } // namespace Aws