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-ram/source/model/ResourceSharePermissionSummary.cpp

165 lines
3.2 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ram/model/ResourceSharePermissionSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace RAM
{
namespace Model
{
ResourceSharePermissionSummary::ResourceSharePermissionSummary() :
m_arnHasBeenSet(false),
m_versionHasBeenSet(false),
m_defaultVersion(false),
m_defaultVersionHasBeenSet(false),
m_nameHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_statusHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_lastUpdatedTimeHasBeenSet(false)
{
}
ResourceSharePermissionSummary::ResourceSharePermissionSummary(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_versionHasBeenSet(false),
m_defaultVersion(false),
m_defaultVersionHasBeenSet(false),
m_nameHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_statusHasBeenSet(false),
m_creationTimeHasBeenSet(false),
m_lastUpdatedTimeHasBeenSet(false)
{
*this = jsonValue;
}
ResourceSharePermissionSummary& ResourceSharePermissionSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
m_versionHasBeenSet = true;
}
if(jsonValue.ValueExists("defaultVersion"))
{
m_defaultVersion = jsonValue.GetBool("defaultVersion");
m_defaultVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = jsonValue.GetString("resourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetString("status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("creationTime"))
{
m_creationTime = jsonValue.GetDouble("creationTime");
m_creationTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("lastUpdatedTime"))
{
m_lastUpdatedTime = jsonValue.GetDouble("lastUpdatedTime");
m_lastUpdatedTimeHasBeenSet = true;
}
return *this;
}
JsonValue ResourceSharePermissionSummary::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_versionHasBeenSet)
{
payload.WithString("version", m_version);
}
if(m_defaultVersionHasBeenSet)
{
payload.WithBool("defaultVersion", m_defaultVersion);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", m_resourceType);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", m_status);
}
if(m_creationTimeHasBeenSet)
{
payload.WithDouble("creationTime", m_creationTime.SecondsWithMSPrecision());
}
if(m_lastUpdatedTimeHasBeenSet)
{
payload.WithDouble("lastUpdatedTime", m_lastUpdatedTime.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace RAM
} // namespace Aws