88 lines
2.3 KiB
C++
88 lines
2.3 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/monitoring/model/ResourceNotFoundException.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 CloudWatch
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
ResourceNotFoundException::ResourceNotFoundException() :
|
|
m_resourceTypeHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
ResourceNotFoundException::ResourceNotFoundException(const XmlNode& xmlNode) :
|
|
m_resourceTypeHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false)
|
|
{
|
|
*this = xmlNode;
|
|
}
|
|
|
|
ResourceNotFoundException& ResourceNotFoundException::operator =(const XmlNode& xmlNode)
|
|
{
|
|
XmlNode resultNode = xmlNode;
|
|
|
|
if(!resultNode.IsNull())
|
|
{
|
|
XmlNode resourceTypeNode = resultNode.FirstChild("ResourceType");
|
|
if(!resourceTypeNode.IsNull())
|
|
{
|
|
m_resourceType = Aws::Utils::Xml::DecodeEscapedXmlText(resourceTypeNode.GetText());
|
|
m_resourceTypeHasBeenSet = true;
|
|
}
|
|
XmlNode resourceIdNode = resultNode.FirstChild("ResourceId");
|
|
if(!resourceIdNode.IsNull())
|
|
{
|
|
m_resourceId = Aws::Utils::Xml::DecodeEscapedXmlText(resourceIdNode.GetText());
|
|
m_resourceIdHasBeenSet = true;
|
|
}
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
void ResourceNotFoundException::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
|
|
{
|
|
if(m_resourceTypeHasBeenSet)
|
|
{
|
|
oStream << location << index << locationValue << ".ResourceType=" << StringUtils::URLEncode(m_resourceType.c_str()) << "&";
|
|
}
|
|
|
|
if(m_resourceIdHasBeenSet)
|
|
{
|
|
oStream << location << index << locationValue << ".ResourceId=" << StringUtils::URLEncode(m_resourceId.c_str()) << "&";
|
|
}
|
|
|
|
}
|
|
|
|
void ResourceNotFoundException::OutputToStream(Aws::OStream& oStream, const char* location) const
|
|
{
|
|
if(m_resourceTypeHasBeenSet)
|
|
{
|
|
oStream << location << ".ResourceType=" << StringUtils::URLEncode(m_resourceType.c_str()) << "&";
|
|
}
|
|
if(m_resourceIdHasBeenSet)
|
|
{
|
|
oStream << location << ".ResourceId=" << StringUtils::URLEncode(m_resourceId.c_str()) << "&";
|
|
}
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace CloudWatch
|
|
} // namespace Aws
|