63 lines
1.3 KiB
C++
63 lines
1.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/codecommit/model/CreateRepositoryRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::CodeCommit::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateRepositoryRequest::CreateRepositoryRequest() :
|
|
m_repositoryNameHasBeenSet(false),
|
|
m_repositoryDescriptionHasBeenSet(false),
|
|
m_tagsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateRepositoryRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_repositoryNameHasBeenSet)
|
|
{
|
|
payload.WithString("repositoryName", m_repositoryName);
|
|
|
|
}
|
|
|
|
if(m_repositoryDescriptionHasBeenSet)
|
|
{
|
|
payload.WithString("repositoryDescription", m_repositoryDescription);
|
|
|
|
}
|
|
|
|
if(m_tagsHasBeenSet)
|
|
{
|
|
JsonValue tagsJsonMap;
|
|
for(auto& tagsItem : m_tags)
|
|
{
|
|
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
|
|
}
|
|
payload.WithObject("tags", std::move(tagsJsonMap));
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection CreateRepositoryRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreateRepository"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|