/** * 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 kendra { namespace Model { FaqSummary::FaqSummary() : m_idHasBeenSet(false), m_nameHasBeenSet(false), m_status(FaqStatus::NOT_SET), m_statusHasBeenSet(false), m_createdAtHasBeenSet(false), m_updatedAtHasBeenSet(false), m_fileFormat(FaqFileFormat::NOT_SET), m_fileFormatHasBeenSet(false), m_languageCodeHasBeenSet(false) { } FaqSummary::FaqSummary(JsonView jsonValue) : m_idHasBeenSet(false), m_nameHasBeenSet(false), m_status(FaqStatus::NOT_SET), m_statusHasBeenSet(false), m_createdAtHasBeenSet(false), m_updatedAtHasBeenSet(false), m_fileFormat(FaqFileFormat::NOT_SET), m_fileFormatHasBeenSet(false), m_languageCodeHasBeenSet(false) { *this = jsonValue; } FaqSummary& FaqSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Id")) { m_id = jsonValue.GetString("Id"); m_idHasBeenSet = true; } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = FaqStatusMapper::GetFaqStatusForName(jsonValue.GetString("Status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("CreatedAt")) { m_createdAt = jsonValue.GetDouble("CreatedAt"); m_createdAtHasBeenSet = true; } if(jsonValue.ValueExists("UpdatedAt")) { m_updatedAt = jsonValue.GetDouble("UpdatedAt"); m_updatedAtHasBeenSet = true; } if(jsonValue.ValueExists("FileFormat")) { m_fileFormat = FaqFileFormatMapper::GetFaqFileFormatForName(jsonValue.GetString("FileFormat")); m_fileFormatHasBeenSet = true; } if(jsonValue.ValueExists("LanguageCode")) { m_languageCode = jsonValue.GetString("LanguageCode"); m_languageCodeHasBeenSet = true; } return *this; } JsonValue FaqSummary::Jsonize() const { JsonValue payload; if(m_idHasBeenSet) { payload.WithString("Id", m_id); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_statusHasBeenSet) { payload.WithString("Status", FaqStatusMapper::GetNameForFaqStatus(m_status)); } if(m_createdAtHasBeenSet) { payload.WithDouble("CreatedAt", m_createdAt.SecondsWithMSPrecision()); } if(m_updatedAtHasBeenSet) { payload.WithDouble("UpdatedAt", m_updatedAt.SecondsWithMSPrecision()); } if(m_fileFormatHasBeenSet) { payload.WithString("FileFormat", FaqFileFormatMapper::GetNameForFaqFileFormat(m_fileFormat)); } if(m_languageCodeHasBeenSet) { payload.WithString("LanguageCode", m_languageCode); } return payload; } } // namespace Model } // namespace kendra } // namespace Aws