/** * 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 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")) { Aws::Utils::Array 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) { Aws::Utils::Array 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