/** * 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::BillingConductor::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; ListPricingPlansResult::ListPricingPlansResult() { } ListPricingPlansResult::ListPricingPlansResult(const Aws::AmazonWebServiceResult& result) { *this = result; } ListPricingPlansResult& ListPricingPlansResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("BillingPeriod")) { m_billingPeriod = jsonValue.GetString("BillingPeriod"); } if(jsonValue.ValueExists("PricingPlans")) { Aws::Utils::Array pricingPlansJsonList = jsonValue.GetArray("PricingPlans"); for(unsigned pricingPlansIndex = 0; pricingPlansIndex < pricingPlansJsonList.GetLength(); ++pricingPlansIndex) { m_pricingPlans.push_back(pricingPlansJsonList[pricingPlansIndex].AsObject()); } } if(jsonValue.ValueExists("NextToken")) { m_nextToken = jsonValue.GetString("NextToken"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }