64 lines
1.2 KiB
C++
64 lines
1.2 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/schemas/model/CreateSchemaRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Schemas::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateSchemaRequest::CreateSchemaRequest() :
|
|
m_contentHasBeenSet(false),
|
|
m_descriptionHasBeenSet(false),
|
|
m_registryNameHasBeenSet(false),
|
|
m_schemaNameHasBeenSet(false),
|
|
m_tagsHasBeenSet(false),
|
|
m_type(Type::NOT_SET),
|
|
m_typeHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateSchemaRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_contentHasBeenSet)
|
|
{
|
|
payload.WithString("Content", m_content);
|
|
|
|
}
|
|
|
|
if(m_descriptionHasBeenSet)
|
|
{
|
|
payload.WithString("Description", m_description);
|
|
|
|
}
|
|
|
|
if(m_tagsHasBeenSet)
|
|
{
|
|
JsonValue tagsJsonMap;
|
|
for(auto& tagsItem : m_tags)
|
|
{
|
|
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
|
|
}
|
|
payload.WithObject("tags", std::move(tagsJsonMap));
|
|
|
|
}
|
|
|
|
if(m_typeHasBeenSet)
|
|
{
|
|
payload.WithString("Type", TypeMapper::GetNameForType(m_type));
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
|
|
|
|
|