/** * 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 QuickSight { namespace Model { Template::Template() : m_arnHasBeenSet(false), m_nameHasBeenSet(false), m_versionHasBeenSet(false), m_templateIdHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false), m_createdTimeHasBeenSet(false) { } Template::Template(JsonView jsonValue) : m_arnHasBeenSet(false), m_nameHasBeenSet(false), m_versionHasBeenSet(false), m_templateIdHasBeenSet(false), m_lastUpdatedTimeHasBeenSet(false), m_createdTimeHasBeenSet(false) { *this = jsonValue; } Template& Template::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("Version")) { m_version = jsonValue.GetObject("Version"); m_versionHasBeenSet = true; } if(jsonValue.ValueExists("TemplateId")) { m_templateId = jsonValue.GetString("TemplateId"); m_templateIdHasBeenSet = true; } if(jsonValue.ValueExists("LastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetDouble("LastUpdatedTime"); m_lastUpdatedTimeHasBeenSet = true; } if(jsonValue.ValueExists("CreatedTime")) { m_createdTime = jsonValue.GetDouble("CreatedTime"); m_createdTimeHasBeenSet = true; } return *this; } JsonValue Template::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("Arn", m_arn); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_versionHasBeenSet) { payload.WithObject("Version", m_version.Jsonize()); } if(m_templateIdHasBeenSet) { payload.WithString("TemplateId", m_templateId); } if(m_lastUpdatedTimeHasBeenSet) { payload.WithDouble("LastUpdatedTime", m_lastUpdatedTime.SecondsWithMSPrecision()); } if(m_createdTimeHasBeenSet) { payload.WithDouble("CreatedTime", m_createdTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace QuickSight } // namespace Aws