1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/neptune/model/ValidDBInstanceModificationsMessage.h>
7 #include <aws/core/utils/xml/XmlSerializer.h>
8 #include <aws/core/utils/StringUtils.h>
9 #include <aws/core/utils/memory/stl/AWSStringStream.h>
10
11 #include <utility>
12
13 using namespace Aws::Utils::Xml;
14 using namespace Aws::Utils;
15
16 namespace Aws
17 {
18 namespace Neptune
19 {
20 namespace Model
21 {
22
ValidDBInstanceModificationsMessage()23 ValidDBInstanceModificationsMessage::ValidDBInstanceModificationsMessage() :
24 m_storageHasBeenSet(false)
25 {
26 }
27
ValidDBInstanceModificationsMessage(const XmlNode & xmlNode)28 ValidDBInstanceModificationsMessage::ValidDBInstanceModificationsMessage(const XmlNode& xmlNode) :
29 m_storageHasBeenSet(false)
30 {
31 *this = xmlNode;
32 }
33
operator =(const XmlNode & xmlNode)34 ValidDBInstanceModificationsMessage& ValidDBInstanceModificationsMessage::operator =(const XmlNode& xmlNode)
35 {
36 XmlNode resultNode = xmlNode;
37
38 if(!resultNode.IsNull())
39 {
40 XmlNode storageNode = resultNode.FirstChild("Storage");
41 if(!storageNode.IsNull())
42 {
43 XmlNode storageMember = storageNode.FirstChild("ValidStorageOptions");
44 while(!storageMember.IsNull())
45 {
46 m_storage.push_back(storageMember);
47 storageMember = storageMember.NextNode("ValidStorageOptions");
48 }
49
50 m_storageHasBeenSet = true;
51 }
52 }
53
54 return *this;
55 }
56
OutputToStream(Aws::OStream & oStream,const char * location,unsigned index,const char * locationValue) const57 void ValidDBInstanceModificationsMessage::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
58 {
59 if(m_storageHasBeenSet)
60 {
61 unsigned storageIdx = 1;
62 for(auto& item : m_storage)
63 {
64 Aws::StringStream storageSs;
65 storageSs << location << index << locationValue << ".ValidStorageOptions." << storageIdx++;
66 item.OutputToStream(oStream, storageSs.str().c_str());
67 }
68 }
69
70 }
71
OutputToStream(Aws::OStream & oStream,const char * location) const72 void ValidDBInstanceModificationsMessage::OutputToStream(Aws::OStream& oStream, const char* location) const
73 {
74 if(m_storageHasBeenSet)
75 {
76 unsigned storageIdx = 1;
77 for(auto& item : m_storage)
78 {
79 Aws::StringStream storageSs;
80 storageSs << location << ".ValidStorageOptions." << storageIdx++;
81 item.OutputToStream(oStream, storageSs.str().c_str());
82 }
83 }
84 }
85
86 } // namespace Model
87 } // namespace Neptune
88 } // namespace Aws
89