/** * 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 ConfigService { namespace Model { ResourceCount::ResourceCount() : m_resourceType(ResourceType::NOT_SET), m_resourceTypeHasBeenSet(false), m_count(0), m_countHasBeenSet(false) { } ResourceCount::ResourceCount(JsonView jsonValue) : m_resourceType(ResourceType::NOT_SET), m_resourceTypeHasBeenSet(false), m_count(0), m_countHasBeenSet(false) { *this = jsonValue; } ResourceCount& ResourceCount::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("resourceType")) { m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType")); m_resourceTypeHasBeenSet = true; } if(jsonValue.ValueExists("count")) { m_count = jsonValue.GetInt64("count"); m_countHasBeenSet = true; } return *this; } JsonValue ResourceCount::Jsonize() const { JsonValue payload; if(m_resourceTypeHasBeenSet) { payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType)); } if(m_countHasBeenSet) { payload.WithInt64("count", m_count); } return payload; } } // namespace Model } // namespace ConfigService } // namespace Aws