/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace IoTAnalytics { namespace Model { AddAttributesActivity::AddAttributesActivity() : m_nameHasBeenSet(false), m_attributesHasBeenSet(false), m_nextHasBeenSet(false) { } AddAttributesActivity::AddAttributesActivity(JsonView jsonValue) : m_nameHasBeenSet(false), m_attributesHasBeenSet(false), m_nextHasBeenSet(false) { *this = jsonValue; } AddAttributesActivity& AddAttributesActivity::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("attributes")) { Aws::Map attributesJsonMap = jsonValue.GetObject("attributes").GetAllObjects(); for(auto& attributesItem : attributesJsonMap) { m_attributes[attributesItem.first] = attributesItem.second.AsString(); } m_attributesHasBeenSet = true; } if(jsonValue.ValueExists("next")) { m_next = jsonValue.GetString("next"); m_nextHasBeenSet = true; } return *this; } JsonValue AddAttributesActivity::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_attributesHasBeenSet) { JsonValue attributesJsonMap; for(auto& attributesItem : m_attributes) { attributesJsonMap.WithString(attributesItem.first, attributesItem.second); } payload.WithObject("attributes", std::move(attributesJsonMap)); } if(m_nextHasBeenSet) { payload.WithString("next", m_next); } return payload; } } // namespace Model } // namespace IoTAnalytics } // namespace Aws