/** * 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::KendraRanking::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeRescoreExecutionPlanResult::DescribeRescoreExecutionPlanResult() : m_status(RescoreExecutionPlanStatus::NOT_SET) { } DescribeRescoreExecutionPlanResult::DescribeRescoreExecutionPlanResult(const Aws::AmazonWebServiceResult& result) : m_status(RescoreExecutionPlanStatus::NOT_SET) { *this = result; } DescribeRescoreExecutionPlanResult& DescribeRescoreExecutionPlanResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Id")) { m_id = jsonValue.GetString("Id"); } if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); } if(jsonValue.ValueExists("CapacityUnits")) { m_capacityUnits = jsonValue.GetObject("CapacityUnits"); } if(jsonValue.ValueExists("CreatedAt")) { m_createdAt = jsonValue.GetDouble("CreatedAt"); } if(jsonValue.ValueExists("UpdatedAt")) { m_updatedAt = jsonValue.GetDouble("UpdatedAt"); } if(jsonValue.ValueExists("Status")) { m_status = RescoreExecutionPlanStatusMapper::GetRescoreExecutionPlanStatusForName(jsonValue.GetString("Status")); } if(jsonValue.ValueExists("ErrorMessage")) { m_errorMessage = jsonValue.GetString("ErrorMessage"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }