1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/sqs/model/SendMessageBatchResultEntry.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace SQS
{
namespace Model
{
SendMessageBatchResultEntry::SendMessageBatchResultEntry() :
m_idHasBeenSet(false),
m_messageIdHasBeenSet(false),
m_mD5OfMessageBodyHasBeenSet(false),
m_mD5OfMessageAttributesHasBeenSet(false),
m_mD5OfMessageSystemAttributesHasBeenSet(false),
m_sequenceNumberHasBeenSet(false)
{
}
SendMessageBatchResultEntry::SendMessageBatchResultEntry(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_messageIdHasBeenSet(false),
m_mD5OfMessageBodyHasBeenSet(false),
m_mD5OfMessageAttributesHasBeenSet(false),
m_mD5OfMessageSystemAttributesHasBeenSet(false),
m_sequenceNumberHasBeenSet(false)
{
*this = xmlNode;
}
SendMessageBatchResultEntry& SendMessageBatchResultEntry::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode messageIdNode = resultNode.FirstChild("MessageId");
if(!messageIdNode.IsNull())
{
m_messageId = Aws::Utils::Xml::DecodeEscapedXmlText(messageIdNode.GetText());
m_messageIdHasBeenSet = true;
}
XmlNode mD5OfMessageBodyNode = resultNode.FirstChild("MD5OfMessageBody");
if(!mD5OfMessageBodyNode.IsNull())
{
m_mD5OfMessageBody = Aws::Utils::Xml::DecodeEscapedXmlText(mD5OfMessageBodyNode.GetText());
m_mD5OfMessageBodyHasBeenSet = true;
}
XmlNode mD5OfMessageAttributesNode = resultNode.FirstChild("MD5OfMessageAttributes");
if(!mD5OfMessageAttributesNode.IsNull())
{
m_mD5OfMessageAttributes = Aws::Utils::Xml::DecodeEscapedXmlText(mD5OfMessageAttributesNode.GetText());
m_mD5OfMessageAttributesHasBeenSet = true;
}
XmlNode mD5OfMessageSystemAttributesNode = resultNode.FirstChild("MD5OfMessageSystemAttributes");
if(!mD5OfMessageSystemAttributesNode.IsNull())
{
m_mD5OfMessageSystemAttributes = Aws::Utils::Xml::DecodeEscapedXmlText(mD5OfMessageSystemAttributesNode.GetText());
m_mD5OfMessageSystemAttributesHasBeenSet = true;
}
XmlNode sequenceNumberNode = resultNode.FirstChild("SequenceNumber");
if(!sequenceNumberNode.IsNull())
{
m_sequenceNumber = Aws::Utils::Xml::DecodeEscapedXmlText(sequenceNumberNode.GetText());
m_sequenceNumberHasBeenSet = true;
}
}
return *this;
}
void SendMessageBatchResultEntry::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_idHasBeenSet)
{
oStream << location << index << locationValue << ".Id=" << StringUtils::URLEncode(m_id.c_str()) << "&";
}
if(m_messageIdHasBeenSet)
{
oStream << location << index << locationValue << ".MessageId=" << StringUtils::URLEncode(m_messageId.c_str()) << "&";
}
if(m_mD5OfMessageBodyHasBeenSet)
{
oStream << location << index << locationValue << ".MD5OfMessageBody=" << StringUtils::URLEncode(m_mD5OfMessageBody.c_str()) << "&";
}
if(m_mD5OfMessageAttributesHasBeenSet)
{
oStream << location << index << locationValue << ".MD5OfMessageAttributes=" << StringUtils::URLEncode(m_mD5OfMessageAttributes.c_str()) << "&";
}
if(m_mD5OfMessageSystemAttributesHasBeenSet)
{
oStream << location << index << locationValue << ".MD5OfMessageSystemAttributes=" << StringUtils::URLEncode(m_mD5OfMessageSystemAttributes.c_str()) << "&";
}
if(m_sequenceNumberHasBeenSet)
{
oStream << location << index << locationValue << ".SequenceNumber=" << StringUtils::URLEncode(m_sequenceNumber.c_str()) << "&";
}
}
void SendMessageBatchResultEntry::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_idHasBeenSet)
{
oStream << location << ".Id=" << StringUtils::URLEncode(m_id.c_str()) << "&";
}
if(m_messageIdHasBeenSet)
{
oStream << location << ".MessageId=" << StringUtils::URLEncode(m_messageId.c_str()) << "&";
}
if(m_mD5OfMessageBodyHasBeenSet)
{
oStream << location << ".MD5OfMessageBody=" << StringUtils::URLEncode(m_mD5OfMessageBody.c_str()) << "&";
}
if(m_mD5OfMessageAttributesHasBeenSet)
{
oStream << location << ".MD5OfMessageAttributes=" << StringUtils::URLEncode(m_mD5OfMessageAttributes.c_str()) << "&";
}
if(m_mD5OfMessageSystemAttributesHasBeenSet)
{
oStream << location << ".MD5OfMessageSystemAttributes=" << StringUtils::URLEncode(m_mD5OfMessageSystemAttributes.c_str()) << "&";
}
if(m_sequenceNumberHasBeenSet)
{
oStream << location << ".SequenceNumber=" << StringUtils::URLEncode(m_sequenceNumber.c_str()) << "&";
}
}
} // namespace Model
} // namespace SQS
} // namespace Aws
|