/** * 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 SimSpaceWeaver { namespace Model { LoggingConfiguration::LoggingConfiguration() : m_destinationsHasBeenSet(false) { } LoggingConfiguration::LoggingConfiguration(JsonView jsonValue) : m_destinationsHasBeenSet(false) { *this = jsonValue; } LoggingConfiguration& LoggingConfiguration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Destinations")) { Aws::Utils::Array destinationsJsonList = jsonValue.GetArray("Destinations"); for(unsigned destinationsIndex = 0; destinationsIndex < destinationsJsonList.GetLength(); ++destinationsIndex) { m_destinations.push_back(destinationsJsonList[destinationsIndex].AsObject()); } m_destinationsHasBeenSet = true; } return *this; } JsonValue LoggingConfiguration::Jsonize() const { JsonValue payload; if(m_destinationsHasBeenSet) { Aws::Utils::Array destinationsJsonList(m_destinations.size()); for(unsigned destinationsIndex = 0; destinationsIndex < destinationsJsonList.GetLength(); ++destinationsIndex) { destinationsJsonList[destinationsIndex].AsObject(m_destinations[destinationsIndex].Jsonize()); } payload.WithArray("Destinations", std::move(destinationsJsonList)); } return payload; } } // namespace Model } // namespace SimSpaceWeaver } // namespace Aws