/** * 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::Glue::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; BatchGetTriggersResult::BatchGetTriggersResult() { } BatchGetTriggersResult::BatchGetTriggersResult(const Aws::AmazonWebServiceResult& result) { *this = result; } BatchGetTriggersResult& BatchGetTriggersResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Triggers")) { Aws::Utils::Array triggersJsonList = jsonValue.GetArray("Triggers"); for(unsigned triggersIndex = 0; triggersIndex < triggersJsonList.GetLength(); ++triggersIndex) { m_triggers.push_back(triggersJsonList[triggersIndex].AsObject()); } } if(jsonValue.ValueExists("TriggersNotFound")) { Aws::Utils::Array triggersNotFoundJsonList = jsonValue.GetArray("TriggersNotFound"); for(unsigned triggersNotFoundIndex = 0; triggersNotFoundIndex < triggersNotFoundJsonList.GetLength(); ++triggersNotFoundIndex) { m_triggersNotFound.push_back(triggersNotFoundJsonList[triggersNotFoundIndex].AsString()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }