1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/elasticbeanstalk/model/CreatePlatformVersionResult.h>
7 #include <aws/core/utils/xml/XmlSerializer.h>
8 #include <aws/core/AmazonWebServiceResult.h>
9 #include <aws/core/utils/StringUtils.h>
10 #include <aws/core/utils/logging/LogMacros.h>
11 
12 #include <utility>
13 
14 using namespace Aws::ElasticBeanstalk::Model;
15 using namespace Aws::Utils::Xml;
16 using namespace Aws::Utils::Logging;
17 using namespace Aws::Utils;
18 using namespace Aws;
19 
CreatePlatformVersionResult()20 CreatePlatformVersionResult::CreatePlatformVersionResult()
21 {
22 }
23 
CreatePlatformVersionResult(const Aws::AmazonWebServiceResult<XmlDocument> & result)24 CreatePlatformVersionResult::CreatePlatformVersionResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
25 {
26   *this = result;
27 }
28 
operator =(const Aws::AmazonWebServiceResult<XmlDocument> & result)29 CreatePlatformVersionResult& CreatePlatformVersionResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
30 {
31   const XmlDocument& xmlDocument = result.GetPayload();
32   XmlNode rootNode = xmlDocument.GetRootElement();
33   XmlNode resultNode = rootNode;
34   if (!rootNode.IsNull() && (rootNode.GetName() != "CreatePlatformVersionResult"))
35   {
36     resultNode = rootNode.FirstChild("CreatePlatformVersionResult");
37   }
38 
39   if(!resultNode.IsNull())
40   {
41     XmlNode platformSummaryNode = resultNode.FirstChild("PlatformSummary");
42     if(!platformSummaryNode.IsNull())
43     {
44       m_platformSummary = platformSummaryNode;
45     }
46     XmlNode builderNode = resultNode.FirstChild("Builder");
47     if(!builderNode.IsNull())
48     {
49       m_builder = builderNode;
50     }
51   }
52 
53   if (!rootNode.IsNull()) {
54     XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
55     m_responseMetadata = responseMetadataNode;
56     AWS_LOGSTREAM_DEBUG("Aws::ElasticBeanstalk::Model::CreatePlatformVersionResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
57   }
58   return *this;
59 }
60