/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::Comprehend::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DetectKeyPhrasesResult::DetectKeyPhrasesResult() { } DetectKeyPhrasesResult::DetectKeyPhrasesResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DetectKeyPhrasesResult& DetectKeyPhrasesResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("KeyPhrases")) { Array keyPhrasesJsonList = jsonValue.GetArray("KeyPhrases"); for(unsigned keyPhrasesIndex = 0; keyPhrasesIndex < keyPhrasesJsonList.GetLength(); ++keyPhrasesIndex) { m_keyPhrases.push_back(keyPhrasesJsonList[keyPhrasesIndex].AsObject()); } } return *this; }