/** * 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 IoT { namespace Model { ViolationEventOccurrenceRange::ViolationEventOccurrenceRange() : m_startTimeHasBeenSet(false), m_endTimeHasBeenSet(false) { } ViolationEventOccurrenceRange::ViolationEventOccurrenceRange(JsonView jsonValue) : m_startTimeHasBeenSet(false), m_endTimeHasBeenSet(false) { *this = jsonValue; } ViolationEventOccurrenceRange& ViolationEventOccurrenceRange::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("startTime")) { m_startTime = jsonValue.GetDouble("startTime"); m_startTimeHasBeenSet = true; } if(jsonValue.ValueExists("endTime")) { m_endTime = jsonValue.GetDouble("endTime"); m_endTimeHasBeenSet = true; } return *this; } JsonValue ViolationEventOccurrenceRange::Jsonize() const { JsonValue payload; if(m_startTimeHasBeenSet) { payload.WithDouble("startTime", m_startTime.SecondsWithMSPrecision()); } if(m_endTimeHasBeenSet) { payload.WithDouble("endTime", m_endTime.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace IoT } // namespace Aws