/** * 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 ForecastService { namespace Model { MonitorSummary::MonitorSummary() : m_monitorArnHasBeenSet(false), m_monitorNameHasBeenSet(false), m_resourceArnHasBeenSet(false), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModificationTimeHasBeenSet(false) { } MonitorSummary::MonitorSummary(JsonView jsonValue) : m_monitorArnHasBeenSet(false), m_monitorNameHasBeenSet(false), m_resourceArnHasBeenSet(false), m_statusHasBeenSet(false), m_creationTimeHasBeenSet(false), m_lastModificationTimeHasBeenSet(false) { *this = jsonValue; } MonitorSummary& MonitorSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("MonitorArn")) { m_monitorArn = jsonValue.GetString("MonitorArn"); m_monitorArnHasBeenSet = true; } if(jsonValue.ValueExists("MonitorName")) { m_monitorName = jsonValue.GetString("MonitorName"); m_monitorNameHasBeenSet = true; } if(jsonValue.ValueExists("ResourceArn")) { m_resourceArn = jsonValue.GetString("ResourceArn"); m_resourceArnHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = 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 MonitorSummary::Jsonize() const { JsonValue payload; if(m_monitorArnHasBeenSet) { payload.WithString("MonitorArn", m_monitorArn); } if(m_monitorNameHasBeenSet) { payload.WithString("MonitorName", m_monitorName); } if(m_resourceArnHasBeenSet) { payload.WithString("ResourceArn", m_resourceArn); } if(m_statusHasBeenSet) { payload.WithString("Status", 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 ForecastService } // namespace Aws