/** * 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 AppRegistry { namespace Model { ResourceInfo::ResourceInfo() : m_nameHasBeenSet(false), m_arnHasBeenSet(false), m_resourceType(ResourceType::NOT_SET), m_resourceTypeHasBeenSet(false), m_resourceDetailsHasBeenSet(false) { } ResourceInfo::ResourceInfo(JsonView jsonValue) : m_nameHasBeenSet(false), m_arnHasBeenSet(false), m_resourceType(ResourceType::NOT_SET), m_resourceTypeHasBeenSet(false), m_resourceDetailsHasBeenSet(false) { *this = jsonValue; } ResourceInfo& ResourceInfo::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("resourceType")) { m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType")); m_resourceTypeHasBeenSet = true; } if(jsonValue.ValueExists("resourceDetails")) { m_resourceDetails = jsonValue.GetObject("resourceDetails"); m_resourceDetailsHasBeenSet = true; } return *this; } JsonValue ResourceInfo::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_resourceTypeHasBeenSet) { payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType)); } if(m_resourceDetailsHasBeenSet) { payload.WithObject("resourceDetails", m_resourceDetails.Jsonize()); } return payload; } } // namespace Model } // namespace AppRegistry } // namespace Aws