/** * 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::mgn::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; MarkAsArchivedResult::MarkAsArchivedResult() : m_isArchived(false) { } MarkAsArchivedResult::MarkAsArchivedResult(const Aws::AmazonWebServiceResult& result) : m_isArchived(false) { *this = result; } MarkAsArchivedResult& MarkAsArchivedResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); } if(jsonValue.ValueExists("dataReplicationInfo")) { m_dataReplicationInfo = jsonValue.GetObject("dataReplicationInfo"); } if(jsonValue.ValueExists("isArchived")) { m_isArchived = jsonValue.GetBool("isArchived"); } if(jsonValue.ValueExists("launchedInstance")) { m_launchedInstance = jsonValue.GetObject("launchedInstance"); } if(jsonValue.ValueExists("lifeCycle")) { m_lifeCycle = jsonValue.GetObject("lifeCycle"); } if(jsonValue.ValueExists("sourceProperties")) { m_sourceProperties = jsonValue.GetObject("sourceProperties"); } if(jsonValue.ValueExists("sourceServerID")) { m_sourceServerID = jsonValue.GetString("sourceServerID"); } if(jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for(auto& tagsItem : tagsJsonMap) { m_tags[tagsItem.first] = tagsItem.second.AsString(); } } return *this; }