/** * 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 { ExportTaskS3Location::ExportTaskS3Location() : m_s3BucketHasBeenSet(false), m_s3PrefixHasBeenSet(false) { } ExportTaskS3Location::ExportTaskS3Location(const XmlNode& xmlNode) : m_s3BucketHasBeenSet(false), m_s3PrefixHasBeenSet(false) { *this = xmlNode; } ExportTaskS3Location& ExportTaskS3Location::operator =(const XmlNode& xmlNode) { XmlNode resultNode = xmlNode; if(!resultNode.IsNull()) { XmlNode s3BucketNode = resultNode.FirstChild("s3Bucket"); if(!s3BucketNode.IsNull()) { m_s3Bucket = Aws::Utils::Xml::DecodeEscapedXmlText(s3BucketNode.GetText()); m_s3BucketHasBeenSet = true; } XmlNode s3PrefixNode = resultNode.FirstChild("s3Prefix"); if(!s3PrefixNode.IsNull()) { m_s3Prefix = Aws::Utils::Xml::DecodeEscapedXmlText(s3PrefixNode.GetText()); m_s3PrefixHasBeenSet = true; } } return *this; } void ExportTaskS3Location::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { if(m_s3BucketHasBeenSet) { oStream << location << index << locationValue << ".S3Bucket=" << StringUtils::URLEncode(m_s3Bucket.c_str()) << "&"; } if(m_s3PrefixHasBeenSet) { oStream << location << index << locationValue << ".S3Prefix=" << StringUtils::URLEncode(m_s3Prefix.c_str()) << "&"; } } void ExportTaskS3Location::OutputToStream(Aws::OStream& oStream, const char* location) const { if(m_s3BucketHasBeenSet) { oStream << location << ".S3Bucket=" << StringUtils::URLEncode(m_s3Bucket.c_str()) << "&"; } if(m_s3PrefixHasBeenSet) { oStream << location << ".S3Prefix=" << StringUtils::URLEncode(m_s3Prefix.c_str()) << "&"; } } } // namespace Model } // namespace EC2 } // namespace Aws