/** * 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 Panorama { namespace Model { NodeInterface::NodeInterface() : m_inputsHasBeenSet(false), m_outputsHasBeenSet(false) { } NodeInterface::NodeInterface(JsonView jsonValue) : m_inputsHasBeenSet(false), m_outputsHasBeenSet(false) { *this = jsonValue; } NodeInterface& NodeInterface::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Inputs")) { Aws::Utils::Array inputsJsonList = jsonValue.GetArray("Inputs"); for(unsigned inputsIndex = 0; inputsIndex < inputsJsonList.GetLength(); ++inputsIndex) { m_inputs.push_back(inputsJsonList[inputsIndex].AsObject()); } m_inputsHasBeenSet = true; } if(jsonValue.ValueExists("Outputs")) { Aws::Utils::Array outputsJsonList = jsonValue.GetArray("Outputs"); for(unsigned outputsIndex = 0; outputsIndex < outputsJsonList.GetLength(); ++outputsIndex) { m_outputs.push_back(outputsJsonList[outputsIndex].AsObject()); } m_outputsHasBeenSet = true; } return *this; } JsonValue NodeInterface::Jsonize() const { JsonValue payload; if(m_inputsHasBeenSet) { Aws::Utils::Array inputsJsonList(m_inputs.size()); for(unsigned inputsIndex = 0; inputsIndex < inputsJsonList.GetLength(); ++inputsIndex) { inputsJsonList[inputsIndex].AsObject(m_inputs[inputsIndex].Jsonize()); } payload.WithArray("Inputs", std::move(inputsJsonList)); } if(m_outputsHasBeenSet) { Aws::Utils::Array outputsJsonList(m_outputs.size()); for(unsigned outputsIndex = 0; outputsIndex < outputsJsonList.GetLength(); ++outputsIndex) { outputsJsonList[outputsIndex].AsObject(m_outputs[outputsIndex].Jsonize()); } payload.WithArray("Outputs", std::move(outputsJsonList)); } return payload; } } // namespace Model } // namespace Panorama } // namespace Aws