/** * 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 SageMaker { namespace Model { ProcessingOutputConfig::ProcessingOutputConfig() : m_outputsHasBeenSet(false), m_kmsKeyIdHasBeenSet(false) { } ProcessingOutputConfig::ProcessingOutputConfig(JsonView jsonValue) : m_outputsHasBeenSet(false), m_kmsKeyIdHasBeenSet(false) { *this = jsonValue; } ProcessingOutputConfig& ProcessingOutputConfig::operator =(JsonView jsonValue) { 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; } if(jsonValue.ValueExists("KmsKeyId")) { m_kmsKeyId = jsonValue.GetString("KmsKeyId"); m_kmsKeyIdHasBeenSet = true; } return *this; } JsonValue ProcessingOutputConfig::Jsonize() const { JsonValue payload; 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)); } if(m_kmsKeyIdHasBeenSet) { payload.WithString("KmsKeyId", m_kmsKeyId); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws