/** * 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 SecurityHub { namespace Model { AwsS3BucketNotificationConfiguration::AwsS3BucketNotificationConfiguration() : m_configurationsHasBeenSet(false) { } AwsS3BucketNotificationConfiguration::AwsS3BucketNotificationConfiguration(JsonView jsonValue) : m_configurationsHasBeenSet(false) { *this = jsonValue; } AwsS3BucketNotificationConfiguration& AwsS3BucketNotificationConfiguration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Configurations")) { Aws::Utils::Array configurationsJsonList = jsonValue.GetArray("Configurations"); for(unsigned configurationsIndex = 0; configurationsIndex < configurationsJsonList.GetLength(); ++configurationsIndex) { m_configurations.push_back(configurationsJsonList[configurationsIndex].AsObject()); } m_configurationsHasBeenSet = true; } return *this; } JsonValue AwsS3BucketNotificationConfiguration::Jsonize() const { JsonValue payload; if(m_configurationsHasBeenSet) { Aws::Utils::Array configurationsJsonList(m_configurations.size()); for(unsigned configurationsIndex = 0; configurationsIndex < configurationsJsonList.GetLength(); ++configurationsIndex) { configurationsJsonList[configurationsIndex].AsObject(m_configurations[configurationsIndex].Jsonize()); } payload.WithArray("Configurations", std::move(configurationsJsonList)); } return payload; } } // namespace Model } // namespace SecurityHub } // namespace Aws