/** * 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 { DecoderManifestSummary::DecoderManifestSummary() : m_nameHasBeenSet(false), m_arnHasBeenSet(false), m_modelManifestArnHasBeenSet(false), m_descriptionHasBeenSet(false), m_status(ManifestStatus::NOT_SET), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModificationTimeHasBeenSet(false) { } DecoderManifestSummary::DecoderManifestSummary(JsonView jsonValue) : m_nameHasBeenSet(false), m_arnHasBeenSet(false), m_modelManifestArnHasBeenSet(false), m_descriptionHasBeenSet(false), m_status(ManifestStatus::NOT_SET), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModificationTimeHasBeenSet(false) { *this = jsonValue; } DecoderManifestSummary& DecoderManifestSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = 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("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("status")) { m_status = ManifestStatusMapper::GetManifestStatusForName(jsonValue.GetString("status")); m_statusHasBeenSet = 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 DecoderManifestSummary::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_modelManifestArnHasBeenSet) { payload.WithString("modelManifestArn", m_modelManifestArn); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_statusHasBeenSet) { payload.WithString("status", ManifestStatusMapper::GetNameForManifestStatus(m_status)); } 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