/** * 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 IoTRoboRunner { namespace Model { Site::Site() : m_arnHasBeenSet(false), m_nameHasBeenSet(false), m_countryCodeHasBeenSet(false), m_createdAtHasBeenSet(false) { } Site::Site(JsonView jsonValue) : m_arnHasBeenSet(false), m_nameHasBeenSet(false), m_countryCodeHasBeenSet(false), m_createdAtHasBeenSet(false) { *this = jsonValue; } Site& Site::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("countryCode")) { m_countryCode = jsonValue.GetString("countryCode"); m_countryCodeHasBeenSet = true; } if(jsonValue.ValueExists("createdAt")) { m_createdAt = jsonValue.GetDouble("createdAt"); m_createdAtHasBeenSet = true; } return *this; } JsonValue Site::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_countryCodeHasBeenSet) { payload.WithString("countryCode", m_countryCode); } if(m_createdAtHasBeenSet) { payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace IoTRoboRunner } // namespace Aws