/** * 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 VPCLattice { namespace Model { RuleSummary::RuleSummary() : m_arnHasBeenSet(false), m_createdAtHasBeenSet(false), m_idHasBeenSet(false), m_isDefault(false), m_isDefaultHasBeenSet(false), m_lastUpdatedAtHasBeenSet(false), m_nameHasBeenSet(false), m_priority(0), m_priorityHasBeenSet(false) { } RuleSummary::RuleSummary(JsonView jsonValue) : m_arnHasBeenSet(false), m_createdAtHasBeenSet(false), m_idHasBeenSet(false), m_isDefault(false), m_isDefaultHasBeenSet(false), m_lastUpdatedAtHasBeenSet(false), m_nameHasBeenSet(false), m_priority(0), m_priorityHasBeenSet(false) { *this = jsonValue; } RuleSummary& RuleSummary::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("createdAt")) { m_createdAt = jsonValue.GetString("createdAt"); m_createdAtHasBeenSet = true; } if(jsonValue.ValueExists("id")) { m_id = jsonValue.GetString("id"); m_idHasBeenSet = true; } if(jsonValue.ValueExists("isDefault")) { m_isDefault = jsonValue.GetBool("isDefault"); m_isDefaultHasBeenSet = true; } if(jsonValue.ValueExists("lastUpdatedAt")) { m_lastUpdatedAt = jsonValue.GetString("lastUpdatedAt"); m_lastUpdatedAtHasBeenSet = true; } if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("priority")) { m_priority = jsonValue.GetInteger("priority"); m_priorityHasBeenSet = true; } return *this; } JsonValue RuleSummary::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_createdAtHasBeenSet) { payload.WithString("createdAt", m_createdAt.ToGmtString(Aws::Utils::DateFormat::ISO_8601)); } if(m_idHasBeenSet) { payload.WithString("id", m_id); } if(m_isDefaultHasBeenSet) { payload.WithBool("isDefault", m_isDefault); } if(m_lastUpdatedAtHasBeenSet) { payload.WithString("lastUpdatedAt", m_lastUpdatedAt.ToGmtString(Aws::Utils::DateFormat::ISO_8601)); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_priorityHasBeenSet) { payload.WithInteger("priority", m_priority); } return payload; } } // namespace Model } // namespace VPCLattice } // namespace Aws