1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/comprehendmedical/model/InferICD10CMResult.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 #include <aws/core/AmazonWebServiceResult.h> 9 #include <aws/core/utils/StringUtils.h> 10 #include <aws/core/utils/UnreferencedParam.h> 11 12 #include <utility> 13 14 using namespace Aws::ComprehendMedical::Model; 15 using namespace Aws::Utils::Json; 16 using namespace Aws::Utils; 17 using namespace Aws; 18 InferICD10CMResult()19InferICD10CMResult::InferICD10CMResult() 20 { 21 } 22 InferICD10CMResult(const Aws::AmazonWebServiceResult<JsonValue> & result)23InferICD10CMResult::InferICD10CMResult(const Aws::AmazonWebServiceResult<JsonValue>& result) 24 { 25 *this = result; 26 } 27 operator =(const Aws::AmazonWebServiceResult<JsonValue> & result)28InferICD10CMResult& InferICD10CMResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result) 29 { 30 JsonView jsonValue = result.GetPayload().View(); 31 if(jsonValue.ValueExists("Entities")) 32 { 33 Array<JsonView> entitiesJsonList = jsonValue.GetArray("Entities"); 34 for(unsigned entitiesIndex = 0; entitiesIndex < entitiesJsonList.GetLength(); ++entitiesIndex) 35 { 36 m_entities.push_back(entitiesJsonList[entitiesIndex].AsObject()); 37 } 38 } 39 40 if(jsonValue.ValueExists("PaginationToken")) 41 { 42 m_paginationToken = jsonValue.GetString("PaginationToken"); 43 44 } 45 46 if(jsonValue.ValueExists("ModelVersion")) 47 { 48 m_modelVersion = jsonValue.GetString("ModelVersion"); 49 50 } 51 52 53 54 return *this; 55 } 56