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-dynamodb/source/model/UpdateReplicationGroupMemberAction.cpp

113 lines
3.0 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/dynamodb/model/UpdateReplicationGroupMemberAction.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DynamoDB
{
namespace Model
{
UpdateReplicationGroupMemberAction::UpdateReplicationGroupMemberAction() :
m_regionNameHasBeenSet(false),
m_kMSMasterKeyIdHasBeenSet(false),
m_provisionedThroughputOverrideHasBeenSet(false),
m_globalSecondaryIndexesHasBeenSet(false)
{
}
UpdateReplicationGroupMemberAction::UpdateReplicationGroupMemberAction(JsonView jsonValue) :
m_regionNameHasBeenSet(false),
m_kMSMasterKeyIdHasBeenSet(false),
m_provisionedThroughputOverrideHasBeenSet(false),
m_globalSecondaryIndexesHasBeenSet(false)
{
*this = jsonValue;
}
UpdateReplicationGroupMemberAction& UpdateReplicationGroupMemberAction::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("RegionName"))
{
m_regionName = jsonValue.GetString("RegionName");
m_regionNameHasBeenSet = true;
}
if(jsonValue.ValueExists("KMSMasterKeyId"))
{
m_kMSMasterKeyId = jsonValue.GetString("KMSMasterKeyId");
m_kMSMasterKeyIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ProvisionedThroughputOverride"))
{
m_provisionedThroughputOverride = jsonValue.GetObject("ProvisionedThroughputOverride");
m_provisionedThroughputOverrideHasBeenSet = true;
}
if(jsonValue.ValueExists("GlobalSecondaryIndexes"))
{
Array<JsonView> globalSecondaryIndexesJsonList = jsonValue.GetArray("GlobalSecondaryIndexes");
for(unsigned globalSecondaryIndexesIndex = 0; globalSecondaryIndexesIndex < globalSecondaryIndexesJsonList.GetLength(); ++globalSecondaryIndexesIndex)
{
m_globalSecondaryIndexes.push_back(globalSecondaryIndexesJsonList[globalSecondaryIndexesIndex].AsObject());
}
m_globalSecondaryIndexesHasBeenSet = true;
}
return *this;
}
JsonValue UpdateReplicationGroupMemberAction::Jsonize() const
{
JsonValue payload;
if(m_regionNameHasBeenSet)
{
payload.WithString("RegionName", m_regionName);
}
if(m_kMSMasterKeyIdHasBeenSet)
{
payload.WithString("KMSMasterKeyId", m_kMSMasterKeyId);
}
if(m_provisionedThroughputOverrideHasBeenSet)
{
payload.WithObject("ProvisionedThroughputOverride", m_provisionedThroughputOverride.Jsonize());
}
if(m_globalSecondaryIndexesHasBeenSet)
{
Array<JsonValue> globalSecondaryIndexesJsonList(m_globalSecondaryIndexes.size());
for(unsigned globalSecondaryIndexesIndex = 0; globalSecondaryIndexesIndex < globalSecondaryIndexesJsonList.GetLength(); ++globalSecondaryIndexesIndex)
{
globalSecondaryIndexesJsonList[globalSecondaryIndexesIndex].AsObject(m_globalSecondaryIndexes[globalSecondaryIndexesIndex].Jsonize());
}
payload.WithArray("GlobalSecondaryIndexes", std::move(globalSecondaryIndexesJsonList));
}
return payload;
}
} // namespace Model
} // namespace DynamoDB
} // namespace Aws