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-codecommit/source/model/PostCommentForPullRequestRequest.cpp

87 lines
1.8 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/PostCommentForPullRequestRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PostCommentForPullRequestRequest::PostCommentForPullRequestRequest() :
m_pullRequestIdHasBeenSet(false),
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_locationHasBeenSet(false),
m_contentHasBeenSet(false),
m_clientRequestToken(Aws::Utils::UUID::RandomUUID()),
m_clientRequestTokenHasBeenSet(true)
{
}
Aws::String PostCommentForPullRequestRequest::SerializePayload() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_beforeCommitIdHasBeenSet)
{
payload.WithString("beforeCommitId", m_beforeCommitId);
}
if(m_afterCommitIdHasBeenSet)
{
payload.WithString("afterCommitId", m_afterCommitId);
}
if(m_locationHasBeenSet)
{
payload.WithObject("location", m_location.Jsonize());
}
if(m_contentHasBeenSet)
{
payload.WithString("content", m_content);
}
if(m_clientRequestTokenHasBeenSet)
{
payload.WithString("clientRequestToken", m_clientRequestToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PostCommentForPullRequestRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.PostCommentForPullRequest"));
return headers;
}