/** * 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::Kinesis::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; DescribeLimitsResult::DescribeLimitsResult() : m_shardLimit(0), m_openShardCount(0), m_onDemandStreamCount(0), m_onDemandStreamCountLimit(0) { } DescribeLimitsResult::DescribeLimitsResult(const Aws::AmazonWebServiceResult& result) : m_shardLimit(0), m_openShardCount(0), m_onDemandStreamCount(0), m_onDemandStreamCountLimit(0) { *this = result; } DescribeLimitsResult& DescribeLimitsResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("ShardLimit")) { m_shardLimit = jsonValue.GetInteger("ShardLimit"); } if(jsonValue.ValueExists("OpenShardCount")) { m_openShardCount = jsonValue.GetInteger("OpenShardCount"); } if(jsonValue.ValueExists("OnDemandStreamCount")) { m_onDemandStreamCount = jsonValue.GetInteger("OnDemandStreamCount"); } if(jsonValue.ValueExists("OnDemandStreamCountLimit")) { m_onDemandStreamCountLimit = jsonValue.GetInteger("OnDemandStreamCountLimit"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }