This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-redshift/source/model/ResizeClusterMessage.cpp

143 lines
4.2 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/redshift/model/ResizeClusterMessage.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 Redshift
{
namespace Model
{
ResizeClusterMessage::ResizeClusterMessage() :
m_clusterIdentifierHasBeenSet(false),
m_clusterTypeHasBeenSet(false),
m_nodeTypeHasBeenSet(false),
m_numberOfNodes(0),
m_numberOfNodesHasBeenSet(false),
m_classic(false),
m_classicHasBeenSet(false)
{
}
ResizeClusterMessage::ResizeClusterMessage(const XmlNode& xmlNode) :
m_clusterIdentifierHasBeenSet(false),
m_clusterTypeHasBeenSet(false),
m_nodeTypeHasBeenSet(false),
m_numberOfNodes(0),
m_numberOfNodesHasBeenSet(false),
m_classic(false),
m_classicHasBeenSet(false)
{
*this = xmlNode;
}
ResizeClusterMessage& ResizeClusterMessage::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode clusterIdentifierNode = resultNode.FirstChild("ClusterIdentifier");
if(!clusterIdentifierNode.IsNull())
{
m_clusterIdentifier = Aws::Utils::Xml::DecodeEscapedXmlText(clusterIdentifierNode.GetText());
m_clusterIdentifierHasBeenSet = true;
}
XmlNode clusterTypeNode = resultNode.FirstChild("ClusterType");
if(!clusterTypeNode.IsNull())
{
m_clusterType = Aws::Utils::Xml::DecodeEscapedXmlText(clusterTypeNode.GetText());
m_clusterTypeHasBeenSet = true;
}
XmlNode nodeTypeNode = resultNode.FirstChild("NodeType");
if(!nodeTypeNode.IsNull())
{
m_nodeType = Aws::Utils::Xml::DecodeEscapedXmlText(nodeTypeNode.GetText());
m_nodeTypeHasBeenSet = true;
}
XmlNode numberOfNodesNode = resultNode.FirstChild("NumberOfNodes");
if(!numberOfNodesNode.IsNull())
{
m_numberOfNodes = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(numberOfNodesNode.GetText()).c_str()).c_str());
m_numberOfNodesHasBeenSet = true;
}
XmlNode classicNode = resultNode.FirstChild("Classic");
if(!classicNode.IsNull())
{
m_classic = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(classicNode.GetText()).c_str()).c_str());
m_classicHasBeenSet = true;
}
}
return *this;
}
void ResizeClusterMessage::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_clusterIdentifierHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterIdentifier=" << StringUtils::URLEncode(m_clusterIdentifier.c_str()) << "&";
}
if(m_clusterTypeHasBeenSet)
{
oStream << location << index << locationValue << ".ClusterType=" << StringUtils::URLEncode(m_clusterType.c_str()) << "&";
}
if(m_nodeTypeHasBeenSet)
{
oStream << location << index << locationValue << ".NodeType=" << StringUtils::URLEncode(m_nodeType.c_str()) << "&";
}
if(m_numberOfNodesHasBeenSet)
{
oStream << location << index << locationValue << ".NumberOfNodes=" << m_numberOfNodes << "&";
}
if(m_classicHasBeenSet)
{
oStream << location << index << locationValue << ".Classic=" << std::boolalpha << m_classic << "&";
}
}
void ResizeClusterMessage::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_clusterIdentifierHasBeenSet)
{
oStream << location << ".ClusterIdentifier=" << StringUtils::URLEncode(m_clusterIdentifier.c_str()) << "&";
}
if(m_clusterTypeHasBeenSet)
{
oStream << location << ".ClusterType=" << StringUtils::URLEncode(m_clusterType.c_str()) << "&";
}
if(m_nodeTypeHasBeenSet)
{
oStream << location << ".NodeType=" << StringUtils::URLEncode(m_nodeType.c_str()) << "&";
}
if(m_numberOfNodesHasBeenSet)
{
oStream << location << ".NumberOfNodes=" << m_numberOfNodes << "&";
}
if(m_classicHasBeenSet)
{
oStream << location << ".Classic=" << std::boolalpha << m_classic << "&";
}
}
} // namespace Model
} // namespace Redshift
} // namespace Aws