/** * 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::CodeStarNotifications::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListNotificationRulesResult::ListNotificationRulesResult() { } ListNotificationRulesResult::ListNotificationRulesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListNotificationRulesResult& ListNotificationRulesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("NextToken")) { m_nextToken = jsonValue.GetString("NextToken"); } if(jsonValue.ValueExists("NotificationRules")) { Aws::Utils::Array notificationRulesJsonList = jsonValue.GetArray("NotificationRules"); for(unsigned notificationRulesIndex = 0; notificationRulesIndex < notificationRulesJsonList.GetLength(); ++notificationRulesIndex) { m_notificationRules.push_back(notificationRulesJsonList[notificationRulesIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }