/** * 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 SSM { namespace Model { OpsEntity::OpsEntity() : m_idHasBeenSet(false), m_dataHasBeenSet(false) { } OpsEntity::OpsEntity(JsonView jsonValue) : m_idHasBeenSet(false), m_dataHasBeenSet(false) { *this = jsonValue; } OpsEntity& OpsEntity::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Id")) { m_id = jsonValue.GetString("Id"); m_idHasBeenSet = true; } if(jsonValue.ValueExists("Data")) { Aws::Map dataJsonMap = jsonValue.GetObject("Data").GetAllObjects(); for(auto& dataItem : dataJsonMap) { m_data[dataItem.first] = dataItem.second.AsObject(); } m_dataHasBeenSet = true; } return *this; } JsonValue OpsEntity::Jsonize() const { JsonValue payload; if(m_idHasBeenSet) { payload.WithString("Id", m_id); } if(m_dataHasBeenSet) { JsonValue dataJsonMap; for(auto& dataItem : m_data) { dataJsonMap.WithObject(dataItem.first, dataItem.second.Jsonize()); } payload.WithObject("Data", std::move(dataJsonMap)); } return payload; } } // namespace Model } // namespace SSM } // namespace Aws