/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include using namespace Aws::Utils::Xml; using namespace Aws::Utils; namespace Aws { namespace EC2 { namespace Model { GroupIdentifier::GroupIdentifier() : m_groupNameHasBeenSet(false), m_groupIdHasBeenSet(false) { } GroupIdentifier::GroupIdentifier(const XmlNode& xmlNode) : m_groupNameHasBeenSet(false), m_groupIdHasBeenSet(false) { *this = xmlNode; } GroupIdentifier& GroupIdentifier::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode groupNameNode = resultNode.FirstChild("groupName"); if(!groupNameNode.IsNull()) { m_groupName = Aws::Utils::Xml::DecodeEscapedXmlText(groupNameNode.GetText()); m_groupNameHasBeenSet = true; } XmlNode groupIdNode = resultNode.FirstChild("groupId"); if(!groupIdNode.IsNull()) { m_groupId = Aws::Utils::Xml::DecodeEscapedXmlText(groupIdNode.GetText()); m_groupIdHasBeenSet = true; } } return *this; } void GroupIdentifier::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_groupNameHasBeenSet) { oStream << location << index << locationValue << ".GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; } if(m_groupIdHasBeenSet) { oStream << location << index << locationValue << ".GroupId=" << StringUtils::URLEncode(m_groupId.c_str()) << "&"; } } void GroupIdentifier::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_groupNameHasBeenSet) { oStream << location << ".GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; } if(m_groupIdHasBeenSet) { oStream << location << ".GroupId=" << StringUtils::URLEncode(m_groupId.c_str()) << "&"; } } } // namespace Model } // namespace EC2 } // namespace Aws