/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::WorkDocs::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetDocumentResult::GetDocumentResult() { } GetDocumentResult::GetDocumentResult(const Aws::AmazonWebServiceResult& result) { *this = result; } GetDocumentResult& GetDocumentResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Metadata")) { m_metadata = jsonValue.GetObject("Metadata"); } if(jsonValue.ValueExists("CustomMetadata")) { Aws::Map customMetadataJsonMap = jsonValue.GetObject("CustomMetadata").GetAllObjects(); for(auto& customMetadataItem : customMetadataJsonMap) { m_customMetadata[customMetadataItem.first] = customMetadataItem.second.AsString(); } } return *this; }