/** * 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::Kinesis::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; EnableEnhancedMonitoringResult::EnableEnhancedMonitoringResult() { } EnableEnhancedMonitoringResult::EnableEnhancedMonitoringResult(const Aws::AmazonWebServiceResult& result) { *this = result; } EnableEnhancedMonitoringResult& EnableEnhancedMonitoringResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("StreamName")) { m_streamName = jsonValue.GetString("StreamName"); } if(jsonValue.ValueExists("CurrentShardLevelMetrics")) { Array currentShardLevelMetricsJsonList = jsonValue.GetArray("CurrentShardLevelMetrics"); for(unsigned currentShardLevelMetricsIndex = 0; currentShardLevelMetricsIndex < currentShardLevelMetricsJsonList.GetLength(); ++currentShardLevelMetricsIndex) { m_currentShardLevelMetrics.push_back(MetricsNameMapper::GetMetricsNameForName(currentShardLevelMetricsJsonList[currentShardLevelMetricsIndex].AsString())); } } if(jsonValue.ValueExists("DesiredShardLevelMetrics")) { Array desiredShardLevelMetricsJsonList = jsonValue.GetArray("DesiredShardLevelMetrics"); for(unsigned desiredShardLevelMetricsIndex = 0; desiredShardLevelMetricsIndex < desiredShardLevelMetricsJsonList.GetLength(); ++desiredShardLevelMetricsIndex) { m_desiredShardLevelMetrics.push_back(MetricsNameMapper::GetMetricsNameForName(desiredShardLevelMetricsJsonList[desiredShardLevelMetricsIndex].AsString())); } } return *this; }