1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/email/model/DescribeActiveReceiptRuleSetResult.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::SES::Model;
15 using namespace Aws::Utils::Xml;
16 using namespace Aws::Utils::Logging;
17 using namespace Aws::Utils;
18 using namespace Aws;
19 
DescribeActiveReceiptRuleSetResult()20 DescribeActiveReceiptRuleSetResult::DescribeActiveReceiptRuleSetResult()
21 {
22 }
23 
DescribeActiveReceiptRuleSetResult(const Aws::AmazonWebServiceResult<XmlDocument> & result)24 DescribeActiveReceiptRuleSetResult::DescribeActiveReceiptRuleSetResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
25 {
26   *this = result;
27 }
28 
operator =(const Aws::AmazonWebServiceResult<XmlDocument> & result)29 DescribeActiveReceiptRuleSetResult& DescribeActiveReceiptRuleSetResult::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() != "DescribeActiveReceiptRuleSetResult"))
35   {
36     resultNode = rootNode.FirstChild("DescribeActiveReceiptRuleSetResult");
37   }
38 
39   if(!resultNode.IsNull())
40   {
41     XmlNode metadataNode = resultNode.FirstChild("Metadata");
42     if(!metadataNode.IsNull())
43     {
44       m_metadata = metadataNode;
45     }
46     XmlNode rulesNode = resultNode.FirstChild("Rules");
47     if(!rulesNode.IsNull())
48     {
49       XmlNode rulesMember = rulesNode.FirstChild("member");
50       while(!rulesMember.IsNull())
51       {
52         m_rules.push_back(rulesMember);
53         rulesMember = rulesMember.NextNode("member");
54       }
55 
56     }
57   }
58 
59   if (!rootNode.IsNull()) {
60     XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
61     m_responseMetadata = responseMetadataNode;
62     AWS_LOGSTREAM_DEBUG("Aws::SES::Model::DescribeActiveReceiptRuleSetResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
63   }
64   return *this;
65 }
66