/** * 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 Connect { namespace Model { EvaluationFormSection::EvaluationFormSection() : m_titleHasBeenSet(false), m_refIdHasBeenSet(false), m_instructionsHasBeenSet(false), m_itemsHasBeenSet(false), m_weight(0.0), m_weightHasBeenSet(false) { } EvaluationFormSection::EvaluationFormSection(JsonView jsonValue) : m_titleHasBeenSet(false), m_refIdHasBeenSet(false), m_instructionsHasBeenSet(false), m_itemsHasBeenSet(false), m_weight(0.0), m_weightHasBeenSet(false) { *this = jsonValue; } EvaluationFormSection& EvaluationFormSection::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Title")) { m_title = jsonValue.GetString("Title"); m_titleHasBeenSet = true; } if(jsonValue.ValueExists("RefId")) { m_refId = jsonValue.GetString("RefId"); m_refIdHasBeenSet = true; } if(jsonValue.ValueExists("Instructions")) { m_instructions = jsonValue.GetString("Instructions"); m_instructionsHasBeenSet = true; } if(jsonValue.ValueExists("Items")) { Aws::Utils::Array itemsJsonList = jsonValue.GetArray("Items"); for(unsigned itemsIndex = 0; itemsIndex < itemsJsonList.GetLength(); ++itemsIndex) { m_items.push_back(itemsJsonList[itemsIndex].AsObject()); } m_itemsHasBeenSet = true; } if(jsonValue.ValueExists("Weight")) { m_weight = jsonValue.GetDouble("Weight"); m_weightHasBeenSet = true; } return *this; } JsonValue EvaluationFormSection::Jsonize() const { JsonValue payload; if(m_titleHasBeenSet) { payload.WithString("Title", m_title); } if(m_refIdHasBeenSet) { payload.WithString("RefId", m_refId); } if(m_instructionsHasBeenSet) { payload.WithString("Instructions", m_instructions); } if(m_itemsHasBeenSet) { Aws::Utils::Array itemsJsonList(m_items.size()); for(unsigned itemsIndex = 0; itemsIndex < itemsJsonList.GetLength(); ++itemsIndex) { itemsJsonList[itemsIndex].AsObject(m_items[itemsIndex].Jsonize()); } payload.WithArray("Items", std::move(itemsJsonList)); } if(m_weightHasBeenSet) { payload.WithDouble("Weight", m_weight); } return payload; } } // namespace Model } // namespace Connect } // namespace Aws