/** * 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 SSMIncidents { namespace Model { ItemIdentifier::ItemIdentifier() : m_type(ItemType::NOT_SET), m_typeHasBeenSet(false), m_valueHasBeenSet(false) { } ItemIdentifier::ItemIdentifier(JsonView jsonValue) : m_type(ItemType::NOT_SET), m_typeHasBeenSet(false), m_valueHasBeenSet(false) { *this = jsonValue; } ItemIdentifier& ItemIdentifier::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("type")) { m_type = ItemTypeMapper::GetItemTypeForName(jsonValue.GetString("type")); m_typeHasBeenSet = true; } if(jsonValue.ValueExists("value")) { m_value = jsonValue.GetObject("value"); m_valueHasBeenSet = true; } return *this; } JsonValue ItemIdentifier::Jsonize() const { JsonValue payload; if(m_typeHasBeenSet) { payload.WithString("type", ItemTypeMapper::GetNameForItemType(m_type)); } if(m_valueHasBeenSet) { payload.WithObject("value", m_value.Jsonize()); } return payload; } } // namespace Model } // namespace SSMIncidents } // namespace Aws