/** * 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 AuditManager { namespace Model { ControlMetadata::ControlMetadata() : m_arnHasBeenSet(false), m_idHasBeenSet(false), m_nameHasBeenSet(false), m_controlSourcesHasBeenSet(false), m_createdAtHasBeenSet(false), m_lastUpdatedAtHasBeenSet(false) { } ControlMetadata::ControlMetadata(JsonView jsonValue) : m_arnHasBeenSet(false), m_idHasBeenSet(false), m_nameHasBeenSet(false), m_controlSourcesHasBeenSet(false), m_createdAtHasBeenSet(false), m_lastUpdatedAtHasBeenSet(false) { *this = jsonValue; } ControlMetadata& ControlMetadata::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } 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("controlSources")) { m_controlSources = jsonValue.GetString("controlSources"); m_controlSourcesHasBeenSet = true; } if(jsonValue.ValueExists("createdAt")) { m_createdAt = jsonValue.GetDouble("createdAt"); m_createdAtHasBeenSet = true; } if(jsonValue.ValueExists("lastUpdatedAt")) { m_lastUpdatedAt = jsonValue.GetDouble("lastUpdatedAt"); m_lastUpdatedAtHasBeenSet = true; } return *this; } JsonValue ControlMetadata::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_idHasBeenSet) { payload.WithString("id", m_id); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_controlSourcesHasBeenSet) { payload.WithString("controlSources", m_controlSources); } if(m_createdAtHasBeenSet) { payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision()); } if(m_lastUpdatedAtHasBeenSet) { payload.WithDouble("lastUpdatedAt", m_lastUpdatedAt.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace AuditManager } // namespace Aws