/** * 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 Inspector2 { namespace Model { PackageAggregationResponse::PackageAggregationResponse() : m_accountIdHasBeenSet(false), m_packageNameHasBeenSet(false), m_severityCountsHasBeenSet(false) { } PackageAggregationResponse::PackageAggregationResponse(JsonView jsonValue) : m_accountIdHasBeenSet(false), m_packageNameHasBeenSet(false), m_severityCountsHasBeenSet(false) { *this = jsonValue; } PackageAggregationResponse& PackageAggregationResponse::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("accountId")) { m_accountId = jsonValue.GetString("accountId"); m_accountIdHasBeenSet = true; } if(jsonValue.ValueExists("packageName")) { m_packageName = jsonValue.GetString("packageName"); m_packageNameHasBeenSet = true; } if(jsonValue.ValueExists("severityCounts")) { m_severityCounts = jsonValue.GetObject("severityCounts"); m_severityCountsHasBeenSet = true; } return *this; } JsonValue PackageAggregationResponse::Jsonize() const { JsonValue payload; if(m_accountIdHasBeenSet) { payload.WithString("accountId", m_accountId); } if(m_packageNameHasBeenSet) { payload.WithString("packageName", m_packageName); } if(m_severityCountsHasBeenSet) { payload.WithObject("severityCounts", m_severityCounts.Jsonize()); } return payload; } } // namespace Model } // namespace Inspector2 } // namespace Aws