/** * 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 IoTFleetWise { namespace Model { VehicleSummary::VehicleSummary() : m_vehicleNameHasBeenSet(false), m_arnHasBeenSet(false), m_modelManifestArnHasBeenSet(false), m_decoderManifestArnHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModificationTimeHasBeenSet(false) { } VehicleSummary::VehicleSummary(JsonView jsonValue) : m_vehicleNameHasBeenSet(false), m_arnHasBeenSet(false), m_modelManifestArnHasBeenSet(false), m_decoderManifestArnHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModificationTimeHasBeenSet(false) { *this = jsonValue; } VehicleSummary& VehicleSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("vehicleName")) { m_vehicleName = jsonValue.GetString("vehicleName"); m_vehicleNameHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("modelManifestArn")) { m_modelManifestArn = jsonValue.GetString("modelManifestArn"); m_modelManifestArnHasBeenSet = true; } if(jsonValue.ValueExists("decoderManifestArn")) { m_decoderManifestArn = jsonValue.GetString("decoderManifestArn"); m_decoderManifestArnHasBeenSet = true; } if(jsonValue.ValueExists("creationTime")) { m_creationTime = jsonValue.GetDouble("creationTime"); m_creationTimeHasBeenSet = true; } if(jsonValue.ValueExists("lastModificationTime")) { m_lastModificationTime = jsonValue.GetDouble("lastModificationTime"); m_lastModificationTimeHasBeenSet = true; } return *this; } JsonValue VehicleSummary::Jsonize() const { JsonValue payload; if(m_vehicleNameHasBeenSet) { payload.WithString("vehicleName", m_vehicleName); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_modelManifestArnHasBeenSet) { payload.WithString("modelManifestArn", m_modelManifestArn); } if(m_decoderManifestArnHasBeenSet) { payload.WithString("decoderManifestArn", m_decoderManifestArn); } if(m_creationTimeHasBeenSet) { payload.WithDouble("creationTime", m_creationTime.SecondsWithMSPrecision()); } if(m_lastModificationTimeHasBeenSet) { payload.WithDouble("lastModificationTime", m_lastModificationTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace IoTFleetWise } // namespace Aws