/** * 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::ForecastService::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeForecastResult::DescribeForecastResult() { } DescribeForecastResult::DescribeForecastResult(const Aws::AmazonWebServiceResult& result) { *this = result; } DescribeForecastResult& DescribeForecastResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ForecastArn")) { m_forecastArn = jsonValue.GetString("ForecastArn"); } if(jsonValue.ValueExists("ForecastName")) { m_forecastName = jsonValue.GetString("ForecastName"); } if(jsonValue.ValueExists("ForecastTypes")) { Array forecastTypesJsonList = jsonValue.GetArray("ForecastTypes"); for(unsigned forecastTypesIndex = 0; forecastTypesIndex < forecastTypesJsonList.GetLength(); ++forecastTypesIndex) { m_forecastTypes.push_back(forecastTypesJsonList[forecastTypesIndex].AsString()); } } if(jsonValue.ValueExists("PredictorArn")) { m_predictorArn = jsonValue.GetString("PredictorArn"); } if(jsonValue.ValueExists("DatasetGroupArn")) { m_datasetGroupArn = jsonValue.GetString("DatasetGroupArn"); } if(jsonValue.ValueExists("Status")) { m_status = jsonValue.GetString("Status"); } if(jsonValue.ValueExists("Message")) { m_message = jsonValue.GetString("Message"); } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetDouble("CreationTime"); } if(jsonValue.ValueExists("LastModificationTime")) { m_lastModificationTime = jsonValue.GetDouble("LastModificationTime"); } return *this; }