/** * 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 ChimeSDKMediaPipelines { namespace Model { RealTimeAlertConfiguration::RealTimeAlertConfiguration() : m_disabled(false), m_disabledHasBeenSet(false), m_rulesHasBeenSet(false) { } RealTimeAlertConfiguration::RealTimeAlertConfiguration(JsonView jsonValue) : m_disabled(false), m_disabledHasBeenSet(false), m_rulesHasBeenSet(false) { *this = jsonValue; } RealTimeAlertConfiguration& RealTimeAlertConfiguration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Disabled")) { m_disabled = jsonValue.GetBool("Disabled"); m_disabledHasBeenSet = true; } if(jsonValue.ValueExists("Rules")) { Aws::Utils::Array rulesJsonList = jsonValue.GetArray("Rules"); for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex) { m_rules.push_back(rulesJsonList[rulesIndex].AsObject()); } m_rulesHasBeenSet = true; } return *this; } JsonValue RealTimeAlertConfiguration::Jsonize() const { JsonValue payload; if(m_disabledHasBeenSet) { payload.WithBool("Disabled", m_disabled); } if(m_rulesHasBeenSet) { Aws::Utils::Array rulesJsonList(m_rules.size()); for(unsigned rulesIndex = 0; rulesIndex < rulesJsonList.GetLength(); ++rulesIndex) { rulesJsonList[rulesIndex].AsObject(m_rules[rulesIndex].Jsonize()); } payload.WithArray("Rules", std::move(rulesJsonList)); } return payload; } } // namespace Model } // namespace ChimeSDKMediaPipelines } // namespace Aws