/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include 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::PseudoRandomUUID()), 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; }