/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include using namespace Aws::CodeCommit::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; PostCommentForComparedCommitResult::PostCommentForComparedCommitResult() { } PostCommentForComparedCommitResult::PostCommentForComparedCommitResult(const Aws::AmazonWebServiceResult& result) { *this = result; } PostCommentForComparedCommitResult& PostCommentForComparedCommitResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("repositoryName")) { m_repositoryName = jsonValue.GetString("repositoryName"); } if(jsonValue.ValueExists("beforeCommitId")) { m_beforeCommitId = jsonValue.GetString("beforeCommitId"); } if(jsonValue.ValueExists("afterCommitId")) { m_afterCommitId = jsonValue.GetString("afterCommitId"); } if(jsonValue.ValueExists("beforeBlobId")) { m_beforeBlobId = jsonValue.GetString("beforeBlobId"); } if(jsonValue.ValueExists("afterBlobId")) { m_afterBlobId = jsonValue.GetString("afterBlobId"); } if(jsonValue.ValueExists("location")) { m_location = jsonValue.GetObject("location"); } if(jsonValue.ValueExists("comment")) { m_comment = jsonValue.GetObject("comment"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }