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-glue/source/model/S3Target.cpp

98 lines
2.0 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/glue/model/S3Target.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Glue
{
namespace Model
{
S3Target::S3Target() :
m_pathHasBeenSet(false),
m_exclusionsHasBeenSet(false),
m_connectionNameHasBeenSet(false)
{
}
S3Target::S3Target(JsonView jsonValue) :
m_pathHasBeenSet(false),
m_exclusionsHasBeenSet(false),
m_connectionNameHasBeenSet(false)
{
*this = jsonValue;
}
S3Target& S3Target::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Path"))
{
m_path = jsonValue.GetString("Path");
m_pathHasBeenSet = true;
}
if(jsonValue.ValueExists("Exclusions"))
{
Array<JsonView> exclusionsJsonList = jsonValue.GetArray("Exclusions");
for(unsigned exclusionsIndex = 0; exclusionsIndex < exclusionsJsonList.GetLength(); ++exclusionsIndex)
{
m_exclusions.push_back(exclusionsJsonList[exclusionsIndex].AsString());
}
m_exclusionsHasBeenSet = true;
}
if(jsonValue.ValueExists("ConnectionName"))
{
m_connectionName = jsonValue.GetString("ConnectionName");
m_connectionNameHasBeenSet = true;
}
return *this;
}
JsonValue S3Target::Jsonize() const
{
JsonValue payload;
if(m_pathHasBeenSet)
{
payload.WithString("Path", m_path);
}
if(m_exclusionsHasBeenSet)
{
Array<JsonValue> exclusionsJsonList(m_exclusions.size());
for(unsigned exclusionsIndex = 0; exclusionsIndex < exclusionsJsonList.GetLength(); ++exclusionsIndex)
{
exclusionsJsonList[exclusionsIndex].AsString(m_exclusions[exclusionsIndex]);
}
payload.WithArray("Exclusions", std::move(exclusionsJsonList));
}
if(m_connectionNameHasBeenSet)
{
payload.WithString("ConnectionName", m_connectionName);
}
return payload;
}
} // namespace Model
} // namespace Glue
} // namespace Aws