/** * 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; UpdatePricingPlanResult::UpdatePricingPlanResult() : m_size(0), m_lastModifiedTime(0) { } UpdatePricingPlanResult::UpdatePricingPlanResult(const Aws::AmazonWebServiceResult& result) : m_size(0), m_lastModifiedTime(0) { *this = result; } UpdatePricingPlanResult& UpdatePricingPlanResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); 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("Size")) { m_size = jsonValue.GetInt64("Size"); } if(jsonValue.ValueExists("LastModifiedTime")) { m_lastModifiedTime = jsonValue.GetInt64("LastModifiedTime"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }