/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/iotwireless/model/WirelessGatewayStatistics.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace IoTWireless { namespace Model { WirelessGatewayStatistics::WirelessGatewayStatistics() : m_arnHasBeenSet(false), m_idHasBeenSet(false), m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_loRaWANHasBeenSet(false), m_lastUplinkReceivedAtHasBeenSet(false) { } WirelessGatewayStatistics::WirelessGatewayStatistics(JsonView jsonValue) : m_arnHasBeenSet(false), m_idHasBeenSet(false), m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_loRaWANHasBeenSet(false), m_lastUplinkReceivedAtHasBeenSet(false) { *this = jsonValue; } WirelessGatewayStatistics& WirelessGatewayStatistics::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("Description")) { m_description = jsonValue.GetString("Description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("LoRaWAN")) { m_loRaWAN = jsonValue.GetObject("LoRaWAN"); m_loRaWANHasBeenSet = true; } if(jsonValue.ValueExists("LastUplinkReceivedAt")) { m_lastUplinkReceivedAt = jsonValue.GetString("LastUplinkReceivedAt"); m_lastUplinkReceivedAtHasBeenSet = true; } return *this; } JsonValue WirelessGatewayStatistics::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_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_loRaWANHasBeenSet) { payload.WithObject("LoRaWAN", m_loRaWAN.Jsonize()); } if(m_lastUplinkReceivedAtHasBeenSet) { payload.WithString("LastUplinkReceivedAt", m_lastUplinkReceivedAt); } return payload; } } // namespace Model } // namespace IoTWireless } // namespace Aws