/** * 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 { AutoMLContainerDefinition::AutoMLContainerDefinition() : m_imageHasBeenSet(false), m_modelDataUrlHasBeenSet(false), m_environmentHasBeenSet(false) { } AutoMLContainerDefinition::AutoMLContainerDefinition(JsonView jsonValue) : m_imageHasBeenSet(false), m_modelDataUrlHasBeenSet(false), m_environmentHasBeenSet(false) { *this = jsonValue; } AutoMLContainerDefinition& AutoMLContainerDefinition::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Image")) { m_image = jsonValue.GetString("Image"); m_imageHasBeenSet = true; } if(jsonValue.ValueExists("ModelDataUrl")) { m_modelDataUrl = jsonValue.GetString("ModelDataUrl"); m_modelDataUrlHasBeenSet = true; } if(jsonValue.ValueExists("Environment")) { Aws::Map environmentJsonMap = jsonValue.GetObject("Environment").GetAllObjects(); for(auto& environmentItem : environmentJsonMap) { m_environment[environmentItem.first] = environmentItem.second.AsString(); } m_environmentHasBeenSet = true; } return *this; } JsonValue AutoMLContainerDefinition::Jsonize() const { JsonValue payload; if(m_imageHasBeenSet) { payload.WithString("Image", m_image); } if(m_modelDataUrlHasBeenSet) { payload.WithString("ModelDataUrl", m_modelDataUrl); } if(m_environmentHasBeenSet) { JsonValue environmentJsonMap; for(auto& environmentItem : m_environment) { environmentJsonMap.WithString(environmentItem.first, environmentItem.second); } payload.WithObject("Environment", std::move(environmentJsonMap)); } return payload; } } // namespace Model } // namespace SageMaker } // namespace Aws