/** * 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 NetworkFirewall { namespace Model { RuleGroup::RuleGroup() : m_ruleVariablesHasBeenSet(false), m_referenceSetsHasBeenSet(false), m_rulesSourceHasBeenSet(false), m_statefulRuleOptionsHasBeenSet(false) { } RuleGroup::RuleGroup(JsonView jsonValue) : m_ruleVariablesHasBeenSet(false), m_referenceSetsHasBeenSet(false), m_rulesSourceHasBeenSet(false), m_statefulRuleOptionsHasBeenSet(false) { *this = jsonValue; } RuleGroup& RuleGroup::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("RuleVariables")) { m_ruleVariables = jsonValue.GetObject("RuleVariables"); m_ruleVariablesHasBeenSet = true; } if(jsonValue.ValueExists("ReferenceSets")) { m_referenceSets = jsonValue.GetObject("ReferenceSets"); m_referenceSetsHasBeenSet = true; } if(jsonValue.ValueExists("RulesSource")) { m_rulesSource = jsonValue.GetObject("RulesSource"); m_rulesSourceHasBeenSet = true; } if(jsonValue.ValueExists("StatefulRuleOptions")) { m_statefulRuleOptions = jsonValue.GetObject("StatefulRuleOptions"); m_statefulRuleOptionsHasBeenSet = true; } return *this; } JsonValue RuleGroup::Jsonize() const { JsonValue payload; if(m_ruleVariablesHasBeenSet) { payload.WithObject("RuleVariables", m_ruleVariables.Jsonize()); } if(m_referenceSetsHasBeenSet) { payload.WithObject("ReferenceSets", m_referenceSets.Jsonize()); } if(m_rulesSourceHasBeenSet) { payload.WithObject("RulesSource", m_rulesSource.Jsonize()); } if(m_statefulRuleOptionsHasBeenSet) { payload.WithObject("StatefulRuleOptions", m_statefulRuleOptions.Jsonize()); } return payload; } } // namespace Model } // namespace NetworkFirewall } // namespace Aws