/** * 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::WorkMail::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetDefaultRetentionPolicyResult::GetDefaultRetentionPolicyResult() { } GetDefaultRetentionPolicyResult::GetDefaultRetentionPolicyResult(const Aws::AmazonWebServiceResult& result) { *this = result; } GetDefaultRetentionPolicyResult& GetDefaultRetentionPolicyResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Id")) { m_id = jsonValue.GetString("Id"); } if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); } if(jsonValue.ValueExists("FolderConfigurations")) { Aws::Utils::Array folderConfigurationsJsonList = jsonValue.GetArray("FolderConfigurations"); for(unsigned folderConfigurationsIndex = 0; folderConfigurationsIndex < folderConfigurationsJsonList.GetLength(); ++folderConfigurationsIndex) { m_folderConfigurations.push_back(folderConfigurationsJsonList[folderConfigurationsIndex].AsObject()); } } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }