/** * 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::CloudWatchLogs::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetDataProtectionPolicyResult::GetDataProtectionPolicyResult() : m_lastUpdatedTime(0) { } GetDataProtectionPolicyResult::GetDataProtectionPolicyResult(const Aws::AmazonWebServiceResult& result) : m_lastUpdatedTime(0) { *this = result; } GetDataProtectionPolicyResult& GetDataProtectionPolicyResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("logGroupIdentifier")) { m_logGroupIdentifier = jsonValue.GetString("logGroupIdentifier"); } if(jsonValue.ValueExists("policyDocument")) { m_policyDocument = jsonValue.GetString("policyDocument"); } if(jsonValue.ValueExists("lastUpdatedTime")) { m_lastUpdatedTime = jsonValue.GetInt64("lastUpdatedTime"); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }