This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-config/source/model/ResourceCount.cpp

78 lines
1.5 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/config/model/ResourceCount.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
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