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-datasync/source/model/OnPremConfig.cpp

68 lines
1.4 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/datasync/model/OnPremConfig.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace DataSync
{
namespace Model
{
OnPremConfig::OnPremConfig() :
m_agentArnsHasBeenSet(false)
{
}
OnPremConfig::OnPremConfig(JsonView jsonValue) :
m_agentArnsHasBeenSet(false)
{
*this = jsonValue;
}
OnPremConfig& OnPremConfig::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AgentArns"))
{
Array<JsonView> agentArnsJsonList = jsonValue.GetArray("AgentArns");
for(unsigned agentArnsIndex = 0; agentArnsIndex < agentArnsJsonList.GetLength(); ++agentArnsIndex)
{
m_agentArns.push_back(agentArnsJsonList[agentArnsIndex].AsString());
}
m_agentArnsHasBeenSet = true;
}
return *this;
}
JsonValue OnPremConfig::Jsonize() const
{
JsonValue payload;
if(m_agentArnsHasBeenSet)
{
Array<JsonValue> agentArnsJsonList(m_agentArns.size());
for(unsigned agentArnsIndex = 0; agentArnsIndex < agentArnsJsonList.GetLength(); ++agentArnsIndex)
{
agentArnsJsonList[agentArnsIndex].AsString(m_agentArns[agentArnsIndex]);
}
payload.WithArray("AgentArns", std::move(agentArnsJsonList));
}
return payload;
}
} // namespace Model
} // namespace DataSync
} // namespace Aws