1/*
2* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3*
4* Licensed under the Apache License, Version 2.0 (the "License").
5* You may not use this file except in compliance with the License.
6* A copy of the License is located at
7*
8* http://aws.amazon.com/apache2.0
9*
10* or in the "license" file accompanying this file. This file is distributed
11* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12* express or implied. See the License for the specific language governing
13* permissions and limitations under the License.
14*/
15
16#include <aws/s3/model/GetBucketNotificationConfigurationResult.h>
17#include <aws/core/utils/xml/XmlSerializer.h>
18#include <aws/core/AmazonWebServiceResult.h>
19#include <aws/core/utils/StringUtils.h>
20
21#include <utility>
22
23using namespace Aws::S3::Model;
24using namespace Aws::Utils::Xml;
25using namespace Aws::Utils;
26using namespace Aws;
27
28GetBucketNotificationConfigurationResult::GetBucketNotificationConfigurationResult()
29{
30}
31
32GetBucketNotificationConfigurationResult::GetBucketNotificationConfigurationResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
33{
34 *this = result;
35}
36
37GetBucketNotificationConfigurationResult& GetBucketNotificationConfigurationResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
38{
39 const XmlDocument& xmlDocument = result.GetPayload();
40 XmlNode resultNode = xmlDocument.GetRootElement();
41
42 if(!resultNode.IsNull())
43 {
44 XmlNode topicConfigurationsNode = resultNode.FirstChild("TopicConfiguration");
45 if(!topicConfigurationsNode.IsNull())
46 {
47 XmlNode topicConfigurationMember = topicConfigurationsNode;
48 while(!topicConfigurationMember.IsNull())
49 {
50 m_topicConfigurations.push_back(topicConfigurationMember);
51 topicConfigurationMember = topicConfigurationMember.NextNode("TopicConfiguration");
52 }
53
54 }
55 XmlNode queueConfigurationsNode = resultNode.FirstChild("QueueConfiguration");
56 if(!queueConfigurationsNode.IsNull())
57 {
58 XmlNode queueConfigurationMember = queueConfigurationsNode;
59 while(!queueConfigurationMember.IsNull())
60 {
61 m_queueConfigurations.push_back(queueConfigurationMember);
62 queueConfigurationMember = queueConfigurationMember.NextNode("QueueConfiguration");
63 }
64
65 }
66 XmlNode lambdaFunctionConfigurationsNode = resultNode.FirstChild("CloudFunctionConfiguration");
67 if(!lambdaFunctionConfigurationsNode.IsNull())
68 {
69 XmlNode cloudFunctionConfigurationMember = lambdaFunctionConfigurationsNode;
70 while(!cloudFunctionConfigurationMember.IsNull())
71 {
72 m_lambdaFunctionConfigurations.push_back(cloudFunctionConfigurationMember);
73 cloudFunctionConfigurationMember = cloudFunctionConfigurationMember.NextNode("CloudFunctionConfiguration");
74 }
75
76 }
77 }
78
79 return *this;
80}
81