feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,159 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/AlarmHistoryItem.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
{
AlarmHistoryItem::AlarmHistoryItem() :
m_alarmNameHasBeenSet(false),
m_alarmType(AlarmType::NOT_SET),
m_alarmTypeHasBeenSet(false),
m_timestampHasBeenSet(false),
m_historyItemType(HistoryItemType::NOT_SET),
m_historyItemTypeHasBeenSet(false),
m_historySummaryHasBeenSet(false),
m_historyDataHasBeenSet(false)
{
}
AlarmHistoryItem::AlarmHistoryItem(const XmlNode& xmlNode) :
m_alarmNameHasBeenSet(false),
m_alarmType(AlarmType::NOT_SET),
m_alarmTypeHasBeenSet(false),
m_timestampHasBeenSet(false),
m_historyItemType(HistoryItemType::NOT_SET),
m_historyItemTypeHasBeenSet(false),
m_historySummaryHasBeenSet(false),
m_historyDataHasBeenSet(false)
{
*this = xmlNode;
}
AlarmHistoryItem& AlarmHistoryItem::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode alarmNameNode = resultNode.FirstChild("AlarmName");
if(!alarmNameNode.IsNull())
{
m_alarmName = Aws::Utils::Xml::DecodeEscapedXmlText(alarmNameNode.GetText());
m_alarmNameHasBeenSet = true;
}
XmlNode alarmTypeNode = resultNode.FirstChild("AlarmType");
if(!alarmTypeNode.IsNull())
{
m_alarmType = AlarmTypeMapper::GetAlarmTypeForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(alarmTypeNode.GetText()).c_str()).c_str());
m_alarmTypeHasBeenSet = true;
}
XmlNode timestampNode = resultNode.FirstChild("Timestamp");
if(!timestampNode.IsNull())
{
m_timestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(timestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_timestampHasBeenSet = true;
}
XmlNode historyItemTypeNode = resultNode.FirstChild("HistoryItemType");
if(!historyItemTypeNode.IsNull())
{
m_historyItemType = HistoryItemTypeMapper::GetHistoryItemTypeForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(historyItemTypeNode.GetText()).c_str()).c_str());
m_historyItemTypeHasBeenSet = true;
}
XmlNode historySummaryNode = resultNode.FirstChild("HistorySummary");
if(!historySummaryNode.IsNull())
{
m_historySummary = Aws::Utils::Xml::DecodeEscapedXmlText(historySummaryNode.GetText());
m_historySummaryHasBeenSet = true;
}
XmlNode historyDataNode = resultNode.FirstChild("HistoryData");
if(!historyDataNode.IsNull())
{
m_historyData = Aws::Utils::Xml::DecodeEscapedXmlText(historyDataNode.GetText());
m_historyDataHasBeenSet = true;
}
}
return *this;
}
void AlarmHistoryItem::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_alarmNameHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmTypeHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmType=" << AlarmTypeMapper::GetNameForAlarmType(m_alarmType) << "&";
}
if(m_timestampHasBeenSet)
{
oStream << location << index << locationValue << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_historyItemTypeHasBeenSet)
{
oStream << location << index << locationValue << ".HistoryItemType=" << HistoryItemTypeMapper::GetNameForHistoryItemType(m_historyItemType) << "&";
}
if(m_historySummaryHasBeenSet)
{
oStream << location << index << locationValue << ".HistorySummary=" << StringUtils::URLEncode(m_historySummary.c_str()) << "&";
}
if(m_historyDataHasBeenSet)
{
oStream << location << index << locationValue << ".HistoryData=" << StringUtils::URLEncode(m_historyData.c_str()) << "&";
}
}
void AlarmHistoryItem::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_alarmNameHasBeenSet)
{
oStream << location << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmTypeHasBeenSet)
{
oStream << location << ".AlarmType=" << AlarmTypeMapper::GetNameForAlarmType(m_alarmType) << "&";
}
if(m_timestampHasBeenSet)
{
oStream << location << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_historyItemTypeHasBeenSet)
{
oStream << location << ".HistoryItemType=" << HistoryItemTypeMapper::GetNameForHistoryItemType(m_historyItemType) << "&";
}
if(m_historySummaryHasBeenSet)
{
oStream << location << ".HistorySummary=" << StringUtils::URLEncode(m_historySummary.c_str()) << "&";
}
if(m_historyDataHasBeenSet)
{
oStream << location << ".HistoryData=" << StringUtils::URLEncode(m_historyData.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/AlarmType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace AlarmTypeMapper
{
static const int CompositeAlarm_HASH = HashingUtils::HashString("CompositeAlarm");
static const int MetricAlarm_HASH = HashingUtils::HashString("MetricAlarm");
AlarmType GetAlarmTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CompositeAlarm_HASH)
{
return AlarmType::CompositeAlarm;
}
else if (hashCode == MetricAlarm_HASH)
{
return AlarmType::MetricAlarm;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AlarmType>(hashCode);
}
return AlarmType::NOT_SET;
}
Aws::String GetNameForAlarmType(AlarmType enumValue)
{
switch(enumValue)
{
case AlarmType::CompositeAlarm:
return "CompositeAlarm";
case AlarmType::MetricAlarm:
return "MetricAlarm";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AlarmTypeMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,179 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/AnomalyDetector.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
{
AnomalyDetector::AnomalyDetector() :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statHasBeenSet(false),
m_configurationHasBeenSet(false),
m_stateValue(AnomalyDetectorStateValue::NOT_SET),
m_stateValueHasBeenSet(false)
{
}
AnomalyDetector::AnomalyDetector(const XmlNode& xmlNode) :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statHasBeenSet(false),
m_configurationHasBeenSet(false),
m_stateValue(AnomalyDetectorStateValue::NOT_SET),
m_stateValueHasBeenSet(false)
{
*this = xmlNode;
}
AnomalyDetector& AnomalyDetector::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode namespaceNode = resultNode.FirstChild("Namespace");
if(!namespaceNode.IsNull())
{
m_namespace = Aws::Utils::Xml::DecodeEscapedXmlText(namespaceNode.GetText());
m_namespaceHasBeenSet = true;
}
XmlNode metricNameNode = resultNode.FirstChild("MetricName");
if(!metricNameNode.IsNull())
{
m_metricName = Aws::Utils::Xml::DecodeEscapedXmlText(metricNameNode.GetText());
m_metricNameHasBeenSet = true;
}
XmlNode dimensionsNode = resultNode.FirstChild("Dimensions");
if(!dimensionsNode.IsNull())
{
XmlNode dimensionsMember = dimensionsNode.FirstChild("member");
while(!dimensionsMember.IsNull())
{
m_dimensions.push_back(dimensionsMember);
dimensionsMember = dimensionsMember.NextNode("member");
}
m_dimensionsHasBeenSet = true;
}
XmlNode statNode = resultNode.FirstChild("Stat");
if(!statNode.IsNull())
{
m_stat = Aws::Utils::Xml::DecodeEscapedXmlText(statNode.GetText());
m_statHasBeenSet = true;
}
XmlNode configurationNode = resultNode.FirstChild("Configuration");
if(!configurationNode.IsNull())
{
m_configuration = configurationNode;
m_configurationHasBeenSet = true;
}
XmlNode stateValueNode = resultNode.FirstChild("StateValue");
if(!stateValueNode.IsNull())
{
m_stateValue = AnomalyDetectorStateValueMapper::GetAnomalyDetectorStateValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(stateValueNode.GetText()).c_str()).c_str());
m_stateValueHasBeenSet = true;
}
}
return *this;
}
void AnomalyDetector::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_namespaceHasBeenSet)
{
oStream << location << index << locationValue << ".Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
oStream << location << index << locationValue << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << index << locationValue << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
if(m_statHasBeenSet)
{
oStream << location << index << locationValue << ".Stat=" << StringUtils::URLEncode(m_stat.c_str()) << "&";
}
if(m_configurationHasBeenSet)
{
Aws::StringStream configurationLocationAndMemberSs;
configurationLocationAndMemberSs << location << index << locationValue << ".Configuration";
m_configuration.OutputToStream(oStream, configurationLocationAndMemberSs.str().c_str());
}
if(m_stateValueHasBeenSet)
{
oStream << location << index << locationValue << ".StateValue=" << AnomalyDetectorStateValueMapper::GetNameForAnomalyDetectorStateValue(m_stateValue) << "&";
}
}
void AnomalyDetector::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_namespaceHasBeenSet)
{
oStream << location << ".Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
oStream << location << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
if(m_statHasBeenSet)
{
oStream << location << ".Stat=" << StringUtils::URLEncode(m_stat.c_str()) << "&";
}
if(m_configurationHasBeenSet)
{
Aws::String configurationLocationAndMember(location);
configurationLocationAndMember += ".Configuration";
m_configuration.OutputToStream(oStream, configurationLocationAndMember.c_str());
}
if(m_stateValueHasBeenSet)
{
oStream << location << ".StateValue=" << AnomalyDetectorStateValueMapper::GetNameForAnomalyDetectorStateValue(m_stateValue) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/AnomalyDetectorConfiguration.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
{
AnomalyDetectorConfiguration::AnomalyDetectorConfiguration() :
m_excludedTimeRangesHasBeenSet(false),
m_metricTimezoneHasBeenSet(false)
{
}
AnomalyDetectorConfiguration::AnomalyDetectorConfiguration(const XmlNode& xmlNode) :
m_excludedTimeRangesHasBeenSet(false),
m_metricTimezoneHasBeenSet(false)
{
*this = xmlNode;
}
AnomalyDetectorConfiguration& AnomalyDetectorConfiguration::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode excludedTimeRangesNode = resultNode.FirstChild("ExcludedTimeRanges");
if(!excludedTimeRangesNode.IsNull())
{
XmlNode excludedTimeRangesMember = excludedTimeRangesNode.FirstChild("member");
while(!excludedTimeRangesMember.IsNull())
{
m_excludedTimeRanges.push_back(excludedTimeRangesMember);
excludedTimeRangesMember = excludedTimeRangesMember.NextNode("member");
}
m_excludedTimeRangesHasBeenSet = true;
}
XmlNode metricTimezoneNode = resultNode.FirstChild("MetricTimezone");
if(!metricTimezoneNode.IsNull())
{
m_metricTimezone = Aws::Utils::Xml::DecodeEscapedXmlText(metricTimezoneNode.GetText());
m_metricTimezoneHasBeenSet = true;
}
}
return *this;
}
void AnomalyDetectorConfiguration::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_excludedTimeRangesHasBeenSet)
{
unsigned excludedTimeRangesIdx = 1;
for(auto& item : m_excludedTimeRanges)
{
Aws::StringStream excludedTimeRangesSs;
excludedTimeRangesSs << location << index << locationValue << ".ExcludedTimeRanges.member." << excludedTimeRangesIdx++;
item.OutputToStream(oStream, excludedTimeRangesSs.str().c_str());
}
}
if(m_metricTimezoneHasBeenSet)
{
oStream << location << index << locationValue << ".MetricTimezone=" << StringUtils::URLEncode(m_metricTimezone.c_str()) << "&";
}
}
void AnomalyDetectorConfiguration::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_excludedTimeRangesHasBeenSet)
{
unsigned excludedTimeRangesIdx = 1;
for(auto& item : m_excludedTimeRanges)
{
Aws::StringStream excludedTimeRangesSs;
excludedTimeRangesSs << location << ".ExcludedTimeRanges.member." << excludedTimeRangesIdx++;
item.OutputToStream(oStream, excludedTimeRangesSs.str().c_str());
}
}
if(m_metricTimezoneHasBeenSet)
{
oStream << location << ".MetricTimezone=" << StringUtils::URLEncode(m_metricTimezone.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/AnomalyDetectorStateValue.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace AnomalyDetectorStateValueMapper
{
static const int PENDING_TRAINING_HASH = HashingUtils::HashString("PENDING_TRAINING");
static const int TRAINED_INSUFFICIENT_DATA_HASH = HashingUtils::HashString("TRAINED_INSUFFICIENT_DATA");
static const int TRAINED_HASH = HashingUtils::HashString("TRAINED");
AnomalyDetectorStateValue GetAnomalyDetectorStateValueForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == PENDING_TRAINING_HASH)
{
return AnomalyDetectorStateValue::PENDING_TRAINING;
}
else if (hashCode == TRAINED_INSUFFICIENT_DATA_HASH)
{
return AnomalyDetectorStateValue::TRAINED_INSUFFICIENT_DATA;
}
else if (hashCode == TRAINED_HASH)
{
return AnomalyDetectorStateValue::TRAINED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AnomalyDetectorStateValue>(hashCode);
}
return AnomalyDetectorStateValue::NOT_SET;
}
Aws::String GetNameForAnomalyDetectorStateValue(AnomalyDetectorStateValue enumValue)
{
switch(enumValue)
{
case AnomalyDetectorStateValue::PENDING_TRAINING:
return "PENDING_TRAINING";
case AnomalyDetectorStateValue::TRAINED_INSUFFICIENT_DATA:
return "TRAINED_INSUFFICIENT_DATA";
case AnomalyDetectorStateValue::TRAINED:
return "TRAINED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AnomalyDetectorStateValueMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ComparisonOperator.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace ComparisonOperatorMapper
{
static const int GreaterThanOrEqualToThreshold_HASH = HashingUtils::HashString("GreaterThanOrEqualToThreshold");
static const int GreaterThanThreshold_HASH = HashingUtils::HashString("GreaterThanThreshold");
static const int LessThanThreshold_HASH = HashingUtils::HashString("LessThanThreshold");
static const int LessThanOrEqualToThreshold_HASH = HashingUtils::HashString("LessThanOrEqualToThreshold");
static const int LessThanLowerOrGreaterThanUpperThreshold_HASH = HashingUtils::HashString("LessThanLowerOrGreaterThanUpperThreshold");
static const int LessThanLowerThreshold_HASH = HashingUtils::HashString("LessThanLowerThreshold");
static const int GreaterThanUpperThreshold_HASH = HashingUtils::HashString("GreaterThanUpperThreshold");
ComparisonOperator GetComparisonOperatorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == GreaterThanOrEqualToThreshold_HASH)
{
return ComparisonOperator::GreaterThanOrEqualToThreshold;
}
else if (hashCode == GreaterThanThreshold_HASH)
{
return ComparisonOperator::GreaterThanThreshold;
}
else if (hashCode == LessThanThreshold_HASH)
{
return ComparisonOperator::LessThanThreshold;
}
else if (hashCode == LessThanOrEqualToThreshold_HASH)
{
return ComparisonOperator::LessThanOrEqualToThreshold;
}
else if (hashCode == LessThanLowerOrGreaterThanUpperThreshold_HASH)
{
return ComparisonOperator::LessThanLowerOrGreaterThanUpperThreshold;
}
else if (hashCode == LessThanLowerThreshold_HASH)
{
return ComparisonOperator::LessThanLowerThreshold;
}
else if (hashCode == GreaterThanUpperThreshold_HASH)
{
return ComparisonOperator::GreaterThanUpperThreshold;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComparisonOperator>(hashCode);
}
return ComparisonOperator::NOT_SET;
}
Aws::String GetNameForComparisonOperator(ComparisonOperator enumValue)
{
switch(enumValue)
{
case ComparisonOperator::GreaterThanOrEqualToThreshold:
return "GreaterThanOrEqualToThreshold";
case ComparisonOperator::GreaterThanThreshold:
return "GreaterThanThreshold";
case ComparisonOperator::LessThanThreshold:
return "LessThanThreshold";
case ComparisonOperator::LessThanOrEqualToThreshold:
return "LessThanOrEqualToThreshold";
case ComparisonOperator::LessThanLowerOrGreaterThanUpperThreshold:
return "LessThanLowerOrGreaterThanUpperThreshold";
case ComparisonOperator::LessThanLowerThreshold:
return "LessThanLowerThreshold";
case ComparisonOperator::GreaterThanUpperThreshold:
return "GreaterThanUpperThreshold";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComparisonOperatorMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,320 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/CompositeAlarm.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
{
CompositeAlarm::CompositeAlarm() :
m_actionsEnabled(false),
m_actionsEnabledHasBeenSet(false),
m_alarmActionsHasBeenSet(false),
m_alarmArnHasBeenSet(false),
m_alarmConfigurationUpdatedTimestampHasBeenSet(false),
m_alarmDescriptionHasBeenSet(false),
m_alarmNameHasBeenSet(false),
m_alarmRuleHasBeenSet(false),
m_insufficientDataActionsHasBeenSet(false),
m_oKActionsHasBeenSet(false),
m_stateReasonHasBeenSet(false),
m_stateReasonDataHasBeenSet(false),
m_stateUpdatedTimestampHasBeenSet(false),
m_stateValue(StateValue::NOT_SET),
m_stateValueHasBeenSet(false)
{
}
CompositeAlarm::CompositeAlarm(const XmlNode& xmlNode) :
m_actionsEnabled(false),
m_actionsEnabledHasBeenSet(false),
m_alarmActionsHasBeenSet(false),
m_alarmArnHasBeenSet(false),
m_alarmConfigurationUpdatedTimestampHasBeenSet(false),
m_alarmDescriptionHasBeenSet(false),
m_alarmNameHasBeenSet(false),
m_alarmRuleHasBeenSet(false),
m_insufficientDataActionsHasBeenSet(false),
m_oKActionsHasBeenSet(false),
m_stateReasonHasBeenSet(false),
m_stateReasonDataHasBeenSet(false),
m_stateUpdatedTimestampHasBeenSet(false),
m_stateValue(StateValue::NOT_SET),
m_stateValueHasBeenSet(false)
{
*this = xmlNode;
}
CompositeAlarm& CompositeAlarm::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode actionsEnabledNode = resultNode.FirstChild("ActionsEnabled");
if(!actionsEnabledNode.IsNull())
{
m_actionsEnabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(actionsEnabledNode.GetText()).c_str()).c_str());
m_actionsEnabledHasBeenSet = true;
}
XmlNode alarmActionsNode = resultNode.FirstChild("AlarmActions");
if(!alarmActionsNode.IsNull())
{
XmlNode alarmActionsMember = alarmActionsNode.FirstChild("member");
while(!alarmActionsMember.IsNull())
{
m_alarmActions.push_back(alarmActionsMember.GetText());
alarmActionsMember = alarmActionsMember.NextNode("member");
}
m_alarmActionsHasBeenSet = true;
}
XmlNode alarmArnNode = resultNode.FirstChild("AlarmArn");
if(!alarmArnNode.IsNull())
{
m_alarmArn = Aws::Utils::Xml::DecodeEscapedXmlText(alarmArnNode.GetText());
m_alarmArnHasBeenSet = true;
}
XmlNode alarmConfigurationUpdatedTimestampNode = resultNode.FirstChild("AlarmConfigurationUpdatedTimestamp");
if(!alarmConfigurationUpdatedTimestampNode.IsNull())
{
m_alarmConfigurationUpdatedTimestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(alarmConfigurationUpdatedTimestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_alarmConfigurationUpdatedTimestampHasBeenSet = true;
}
XmlNode alarmDescriptionNode = resultNode.FirstChild("AlarmDescription");
if(!alarmDescriptionNode.IsNull())
{
m_alarmDescription = Aws::Utils::Xml::DecodeEscapedXmlText(alarmDescriptionNode.GetText());
m_alarmDescriptionHasBeenSet = true;
}
XmlNode alarmNameNode = resultNode.FirstChild("AlarmName");
if(!alarmNameNode.IsNull())
{
m_alarmName = Aws::Utils::Xml::DecodeEscapedXmlText(alarmNameNode.GetText());
m_alarmNameHasBeenSet = true;
}
XmlNode alarmRuleNode = resultNode.FirstChild("AlarmRule");
if(!alarmRuleNode.IsNull())
{
m_alarmRule = Aws::Utils::Xml::DecodeEscapedXmlText(alarmRuleNode.GetText());
m_alarmRuleHasBeenSet = true;
}
XmlNode insufficientDataActionsNode = resultNode.FirstChild("InsufficientDataActions");
if(!insufficientDataActionsNode.IsNull())
{
XmlNode insufficientDataActionsMember = insufficientDataActionsNode.FirstChild("member");
while(!insufficientDataActionsMember.IsNull())
{
m_insufficientDataActions.push_back(insufficientDataActionsMember.GetText());
insufficientDataActionsMember = insufficientDataActionsMember.NextNode("member");
}
m_insufficientDataActionsHasBeenSet = true;
}
XmlNode oKActionsNode = resultNode.FirstChild("OKActions");
if(!oKActionsNode.IsNull())
{
XmlNode oKActionsMember = oKActionsNode.FirstChild("member");
while(!oKActionsMember.IsNull())
{
m_oKActions.push_back(oKActionsMember.GetText());
oKActionsMember = oKActionsMember.NextNode("member");
}
m_oKActionsHasBeenSet = true;
}
XmlNode stateReasonNode = resultNode.FirstChild("StateReason");
if(!stateReasonNode.IsNull())
{
m_stateReason = Aws::Utils::Xml::DecodeEscapedXmlText(stateReasonNode.GetText());
m_stateReasonHasBeenSet = true;
}
XmlNode stateReasonDataNode = resultNode.FirstChild("StateReasonData");
if(!stateReasonDataNode.IsNull())
{
m_stateReasonData = Aws::Utils::Xml::DecodeEscapedXmlText(stateReasonDataNode.GetText());
m_stateReasonDataHasBeenSet = true;
}
XmlNode stateUpdatedTimestampNode = resultNode.FirstChild("StateUpdatedTimestamp");
if(!stateUpdatedTimestampNode.IsNull())
{
m_stateUpdatedTimestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(stateUpdatedTimestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_stateUpdatedTimestampHasBeenSet = true;
}
XmlNode stateValueNode = resultNode.FirstChild("StateValue");
if(!stateValueNode.IsNull())
{
m_stateValue = StateValueMapper::GetStateValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(stateValueNode.GetText()).c_str()).c_str());
m_stateValueHasBeenSet = true;
}
}
return *this;
}
void CompositeAlarm::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_actionsEnabledHasBeenSet)
{
oStream << location << index << locationValue << ".ActionsEnabled=" << std::boolalpha << m_actionsEnabled << "&";
}
if(m_alarmActionsHasBeenSet)
{
unsigned alarmActionsIdx = 1;
for(auto& item : m_alarmActions)
{
oStream << location << index << locationValue << ".AlarmActions.member." << alarmActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_alarmArnHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmArn=" << StringUtils::URLEncode(m_alarmArn.c_str()) << "&";
}
if(m_alarmConfigurationUpdatedTimestampHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmConfigurationUpdatedTimestamp=" << StringUtils::URLEncode(m_alarmConfigurationUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_alarmDescriptionHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmDescription=" << StringUtils::URLEncode(m_alarmDescription.c_str()) << "&";
}
if(m_alarmNameHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmRuleHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmRule=" << StringUtils::URLEncode(m_alarmRule.c_str()) << "&";
}
if(m_insufficientDataActionsHasBeenSet)
{
unsigned insufficientDataActionsIdx = 1;
for(auto& item : m_insufficientDataActions)
{
oStream << location << index << locationValue << ".InsufficientDataActions.member." << insufficientDataActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_oKActionsHasBeenSet)
{
unsigned oKActionsIdx = 1;
for(auto& item : m_oKActions)
{
oStream << location << index << locationValue << ".OKActions.member." << oKActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_stateReasonHasBeenSet)
{
oStream << location << index << locationValue << ".StateReason=" << StringUtils::URLEncode(m_stateReason.c_str()) << "&";
}
if(m_stateReasonDataHasBeenSet)
{
oStream << location << index << locationValue << ".StateReasonData=" << StringUtils::URLEncode(m_stateReasonData.c_str()) << "&";
}
if(m_stateUpdatedTimestampHasBeenSet)
{
oStream << location << index << locationValue << ".StateUpdatedTimestamp=" << StringUtils::URLEncode(m_stateUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_stateValueHasBeenSet)
{
oStream << location << index << locationValue << ".StateValue=" << StateValueMapper::GetNameForStateValue(m_stateValue) << "&";
}
}
void CompositeAlarm::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_actionsEnabledHasBeenSet)
{
oStream << location << ".ActionsEnabled=" << std::boolalpha << m_actionsEnabled << "&";
}
if(m_alarmActionsHasBeenSet)
{
unsigned alarmActionsIdx = 1;
for(auto& item : m_alarmActions)
{
oStream << location << ".AlarmActions.member." << alarmActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_alarmArnHasBeenSet)
{
oStream << location << ".AlarmArn=" << StringUtils::URLEncode(m_alarmArn.c_str()) << "&";
}
if(m_alarmConfigurationUpdatedTimestampHasBeenSet)
{
oStream << location << ".AlarmConfigurationUpdatedTimestamp=" << StringUtils::URLEncode(m_alarmConfigurationUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_alarmDescriptionHasBeenSet)
{
oStream << location << ".AlarmDescription=" << StringUtils::URLEncode(m_alarmDescription.c_str()) << "&";
}
if(m_alarmNameHasBeenSet)
{
oStream << location << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmRuleHasBeenSet)
{
oStream << location << ".AlarmRule=" << StringUtils::URLEncode(m_alarmRule.c_str()) << "&";
}
if(m_insufficientDataActionsHasBeenSet)
{
unsigned insufficientDataActionsIdx = 1;
for(auto& item : m_insufficientDataActions)
{
oStream << location << ".InsufficientDataActions.member." << insufficientDataActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_oKActionsHasBeenSet)
{
unsigned oKActionsIdx = 1;
for(auto& item : m_oKActions)
{
oStream << location << ".OKActions.member." << oKActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_stateReasonHasBeenSet)
{
oStream << location << ".StateReason=" << StringUtils::URLEncode(m_stateReason.c_str()) << "&";
}
if(m_stateReasonDataHasBeenSet)
{
oStream << location << ".StateReasonData=" << StringUtils::URLEncode(m_stateReasonData.c_str()) << "&";
}
if(m_stateUpdatedTimestampHasBeenSet)
{
oStream << location << ".StateUpdatedTimestamp=" << StringUtils::URLEncode(m_stateUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_stateValueHasBeenSet)
{
oStream << location << ".StateValue=" << StateValueMapper::GetNameForStateValue(m_stateValue) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,123 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DashboardEntry.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
{
DashboardEntry::DashboardEntry() :
m_dashboardNameHasBeenSet(false),
m_dashboardArnHasBeenSet(false),
m_lastModifiedHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false)
{
}
DashboardEntry::DashboardEntry(const XmlNode& xmlNode) :
m_dashboardNameHasBeenSet(false),
m_dashboardArnHasBeenSet(false),
m_lastModifiedHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false)
{
*this = xmlNode;
}
DashboardEntry& DashboardEntry::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode dashboardNameNode = resultNode.FirstChild("DashboardName");
if(!dashboardNameNode.IsNull())
{
m_dashboardName = Aws::Utils::Xml::DecodeEscapedXmlText(dashboardNameNode.GetText());
m_dashboardNameHasBeenSet = true;
}
XmlNode dashboardArnNode = resultNode.FirstChild("DashboardArn");
if(!dashboardArnNode.IsNull())
{
m_dashboardArn = Aws::Utils::Xml::DecodeEscapedXmlText(dashboardArnNode.GetText());
m_dashboardArnHasBeenSet = true;
}
XmlNode lastModifiedNode = resultNode.FirstChild("LastModified");
if(!lastModifiedNode.IsNull())
{
m_lastModified = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedHasBeenSet = true;
}
XmlNode sizeNode = resultNode.FirstChild("Size");
if(!sizeNode.IsNull())
{
m_size = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sizeNode.GetText()).c_str()).c_str());
m_sizeHasBeenSet = true;
}
}
return *this;
}
void DashboardEntry::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_dashboardNameHasBeenSet)
{
oStream << location << index << locationValue << ".DashboardName=" << StringUtils::URLEncode(m_dashboardName.c_str()) << "&";
}
if(m_dashboardArnHasBeenSet)
{
oStream << location << index << locationValue << ".DashboardArn=" << StringUtils::URLEncode(m_dashboardArn.c_str()) << "&";
}
if(m_lastModifiedHasBeenSet)
{
oStream << location << index << locationValue << ".LastModified=" << StringUtils::URLEncode(m_lastModified.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_sizeHasBeenSet)
{
oStream << location << index << locationValue << ".Size=" << m_size << "&";
}
}
void DashboardEntry::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_dashboardNameHasBeenSet)
{
oStream << location << ".DashboardName=" << StringUtils::URLEncode(m_dashboardName.c_str()) << "&";
}
if(m_dashboardArnHasBeenSet)
{
oStream << location << ".DashboardArn=" << StringUtils::URLEncode(m_dashboardArn.c_str()) << "&";
}
if(m_lastModifiedHasBeenSet)
{
oStream << location << ".LastModified=" << StringUtils::URLEncode(m_lastModified.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_sizeHasBeenSet)
{
oStream << location << ".Size=" << m_size << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DashboardInvalidInputError.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
{
DashboardInvalidInputError::DashboardInvalidInputError() :
m_messageHasBeenSet(false),
m_dashboardValidationMessagesHasBeenSet(false)
{
}
DashboardInvalidInputError::DashboardInvalidInputError(const XmlNode& xmlNode) :
m_messageHasBeenSet(false),
m_dashboardValidationMessagesHasBeenSet(false)
{
*this = xmlNode;
}
DashboardInvalidInputError& DashboardInvalidInputError::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode messageNode = resultNode.FirstChild("message");
if(!messageNode.IsNull())
{
m_message = Aws::Utils::Xml::DecodeEscapedXmlText(messageNode.GetText());
m_messageHasBeenSet = true;
}
XmlNode dashboardValidationMessagesNode = resultNode.FirstChild("dashboardValidationMessages");
if(!dashboardValidationMessagesNode.IsNull())
{
XmlNode dashboardValidationMessagesMember = dashboardValidationMessagesNode.FirstChild("member");
while(!dashboardValidationMessagesMember.IsNull())
{
m_dashboardValidationMessages.push_back(dashboardValidationMessagesMember);
dashboardValidationMessagesMember = dashboardValidationMessagesMember.NextNode("member");
}
m_dashboardValidationMessagesHasBeenSet = true;
}
}
return *this;
}
void DashboardInvalidInputError::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_messageHasBeenSet)
{
oStream << location << index << locationValue << ".message=" << StringUtils::URLEncode(m_message.c_str()) << "&";
}
if(m_dashboardValidationMessagesHasBeenSet)
{
unsigned dashboardValidationMessagesIdx = 1;
for(auto& item : m_dashboardValidationMessages)
{
Aws::StringStream dashboardValidationMessagesSs;
dashboardValidationMessagesSs << location << index << locationValue << ".dashboardValidationMessages.member." << dashboardValidationMessagesIdx++;
item.OutputToStream(oStream, dashboardValidationMessagesSs.str().c_str());
}
}
}
void DashboardInvalidInputError::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_messageHasBeenSet)
{
oStream << location << ".message=" << StringUtils::URLEncode(m_message.c_str()) << "&";
}
if(m_dashboardValidationMessagesHasBeenSet)
{
unsigned dashboardValidationMessagesIdx = 1;
for(auto& item : m_dashboardValidationMessages)
{
Aws::StringStream dashboardValidationMessagesSs;
dashboardValidationMessagesSs << location << ".dashboardValidationMessages.member." << dashboardValidationMessagesIdx++;
item.OutputToStream(oStream, dashboardValidationMessagesSs.str().c_str());
}
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DashboardValidationMessage.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
{
DashboardValidationMessage::DashboardValidationMessage() :
m_dataPathHasBeenSet(false),
m_messageHasBeenSet(false)
{
}
DashboardValidationMessage::DashboardValidationMessage(const XmlNode& xmlNode) :
m_dataPathHasBeenSet(false),
m_messageHasBeenSet(false)
{
*this = xmlNode;
}
DashboardValidationMessage& DashboardValidationMessage::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode dataPathNode = resultNode.FirstChild("DataPath");
if(!dataPathNode.IsNull())
{
m_dataPath = Aws::Utils::Xml::DecodeEscapedXmlText(dataPathNode.GetText());
m_dataPathHasBeenSet = true;
}
XmlNode messageNode = resultNode.FirstChild("Message");
if(!messageNode.IsNull())
{
m_message = Aws::Utils::Xml::DecodeEscapedXmlText(messageNode.GetText());
m_messageHasBeenSet = true;
}
}
return *this;
}
void DashboardValidationMessage::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_dataPathHasBeenSet)
{
oStream << location << index << locationValue << ".DataPath=" << StringUtils::URLEncode(m_dataPath.c_str()) << "&";
}
if(m_messageHasBeenSet)
{
oStream << location << index << locationValue << ".Message=" << StringUtils::URLEncode(m_message.c_str()) << "&";
}
}
void DashboardValidationMessage::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_dataPathHasBeenSet)
{
oStream << location << ".DataPath=" << StringUtils::URLEncode(m_dataPath.c_str()) << "&";
}
if(m_messageHasBeenSet)
{
oStream << location << ".Message=" << StringUtils::URLEncode(m_message.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,228 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/Datapoint.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
{
Datapoint::Datapoint() :
m_timestampHasBeenSet(false),
m_sampleCount(0.0),
m_sampleCountHasBeenSet(false),
m_average(0.0),
m_averageHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_minimum(0.0),
m_minimumHasBeenSet(false),
m_maximum(0.0),
m_maximumHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_extendedStatisticsHasBeenSet(false)
{
}
Datapoint::Datapoint(const XmlNode& xmlNode) :
m_timestampHasBeenSet(false),
m_sampleCount(0.0),
m_sampleCountHasBeenSet(false),
m_average(0.0),
m_averageHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_minimum(0.0),
m_minimumHasBeenSet(false),
m_maximum(0.0),
m_maximumHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_extendedStatisticsHasBeenSet(false)
{
*this = xmlNode;
}
Datapoint& Datapoint::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode timestampNode = resultNode.FirstChild("Timestamp");
if(!timestampNode.IsNull())
{
m_timestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(timestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_timestampHasBeenSet = true;
}
XmlNode sampleCountNode = resultNode.FirstChild("SampleCount");
if(!sampleCountNode.IsNull())
{
m_sampleCount = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sampleCountNode.GetText()).c_str()).c_str());
m_sampleCountHasBeenSet = true;
}
XmlNode averageNode = resultNode.FirstChild("Average");
if(!averageNode.IsNull())
{
m_average = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(averageNode.GetText()).c_str()).c_str());
m_averageHasBeenSet = true;
}
XmlNode sumNode = resultNode.FirstChild("Sum");
if(!sumNode.IsNull())
{
m_sum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sumNode.GetText()).c_str()).c_str());
m_sumHasBeenSet = true;
}
XmlNode minimumNode = resultNode.FirstChild("Minimum");
if(!minimumNode.IsNull())
{
m_minimum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(minimumNode.GetText()).c_str()).c_str());
m_minimumHasBeenSet = true;
}
XmlNode maximumNode = resultNode.FirstChild("Maximum");
if(!maximumNode.IsNull())
{
m_maximum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maximumNode.GetText()).c_str()).c_str());
m_maximumHasBeenSet = true;
}
XmlNode unitNode = resultNode.FirstChild("Unit");
if(!unitNode.IsNull())
{
m_unit = StandardUnitMapper::GetStandardUnitForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(unitNode.GetText()).c_str()).c_str());
m_unitHasBeenSet = true;
}
XmlNode extendedStatisticsNode = resultNode.FirstChild("ExtendedStatistics");
if(!extendedStatisticsNode.IsNull())
{
XmlNode extendedStatisticsEntry = extendedStatisticsNode.FirstChild("entry");
while(!extendedStatisticsEntry.IsNull())
{
XmlNode keyNode = extendedStatisticsEntry.FirstChild("key");
XmlNode valueNode = extendedStatisticsEntry.FirstChild("value");
m_extendedStatistics[keyNode.GetText()] =
StringUtils::ConvertToDouble(StringUtils::Trim(valueNode.GetText().c_str()).c_str());
extendedStatisticsEntry = extendedStatisticsEntry.NextNode("entry");
}
m_extendedStatisticsHasBeenSet = true;
}
}
return *this;
}
void Datapoint::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_timestampHasBeenSet)
{
oStream << location << index << locationValue << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_sampleCountHasBeenSet)
{
oStream << location << index << locationValue << ".SampleCount=" << StringUtils::URLEncode(m_sampleCount) << "&";
}
if(m_averageHasBeenSet)
{
oStream << location << index << locationValue << ".Average=" << StringUtils::URLEncode(m_average) << "&";
}
if(m_sumHasBeenSet)
{
oStream << location << index << locationValue << ".Sum=" << StringUtils::URLEncode(m_sum) << "&";
}
if(m_minimumHasBeenSet)
{
oStream << location << index << locationValue << ".Minimum=" << StringUtils::URLEncode(m_minimum) << "&";
}
if(m_maximumHasBeenSet)
{
oStream << location << index << locationValue << ".Maximum=" << StringUtils::URLEncode(m_maximum) << "&";
}
if(m_unitHasBeenSet)
{
oStream << location << index << locationValue << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_extendedStatisticsHasBeenSet)
{
unsigned extendedStatisticsIdx = 1;
for(auto& item : m_extendedStatistics)
{
oStream << location << index << locationValue << ".ExtendedStatistics.entry." << extendedStatisticsIdx << ".key="
<< StringUtils::URLEncode(item.first.c_str()) << "&";
oStream << location << index << locationValue << ".ExtendedStatistics.entry." << extendedStatisticsIdx << ".value="
<< StringUtils::URLEncode(item.second) << "&";
extendedStatisticsIdx++;
}
}
}
void Datapoint::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_timestampHasBeenSet)
{
oStream << location << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_sampleCountHasBeenSet)
{
oStream << location << ".SampleCount=" << StringUtils::URLEncode(m_sampleCount) << "&";
}
if(m_averageHasBeenSet)
{
oStream << location << ".Average=" << StringUtils::URLEncode(m_average) << "&";
}
if(m_sumHasBeenSet)
{
oStream << location << ".Sum=" << StringUtils::URLEncode(m_sum) << "&";
}
if(m_minimumHasBeenSet)
{
oStream << location << ".Minimum=" << StringUtils::URLEncode(m_minimum) << "&";
}
if(m_maximumHasBeenSet)
{
oStream << location << ".Maximum=" << StringUtils::URLEncode(m_maximum) << "&";
}
if(m_unitHasBeenSet)
{
oStream << location << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_extendedStatisticsHasBeenSet)
{
unsigned extendedStatisticsIdx = 1;
for(auto& item : m_extendedStatistics)
{
oStream << location << ".ExtendedStatistics.entry." << extendedStatisticsIdx << ".key="
<< StringUtils::URLEncode(item.first.c_str()) << "&";
oStream << location << ".ExtendedStatistics.entry." << extendedStatisticsIdx << ".value="
<< StringUtils::URLEncode(item.second) << "&";
extendedStatisticsIdx++;
}
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteAlarmsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DeleteAlarmsRequest::DeleteAlarmsRequest() :
m_alarmNamesHasBeenSet(false)
{
}
Aws::String DeleteAlarmsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DeleteAlarms&";
if(m_alarmNamesHasBeenSet)
{
unsigned alarmNamesCount = 1;
for(auto& item : m_alarmNames)
{
ss << "AlarmNames.member." << alarmNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
alarmNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void DeleteAlarmsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteAnomalyDetectorRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DeleteAnomalyDetectorRequest::DeleteAnomalyDetectorRequest() :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statHasBeenSet(false)
{
}
Aws::String DeleteAnomalyDetectorRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DeleteAnomalyDetector&";
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
if(m_statHasBeenSet)
{
ss << "Stat=" << StringUtils::URLEncode(m_stat.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void DeleteAnomalyDetectorRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteAnomalyDetectorResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DeleteAnomalyDetectorResult::DeleteAnomalyDetectorResult()
{
}
DeleteAnomalyDetectorResult::DeleteAnomalyDetectorResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DeleteAnomalyDetectorResult& DeleteAnomalyDetectorResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DeleteAnomalyDetectorResult"))
{
resultNode = rootNode.FirstChild("DeleteAnomalyDetectorResult");
}
if(!resultNode.IsNull())
{
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DeleteAnomalyDetectorResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteDashboardsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DeleteDashboardsRequest::DeleteDashboardsRequest() :
m_dashboardNamesHasBeenSet(false)
{
}
Aws::String DeleteDashboardsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DeleteDashboards&";
if(m_dashboardNamesHasBeenSet)
{
unsigned dashboardNamesCount = 1;
for(auto& item : m_dashboardNames)
{
ss << "DashboardNames.member." << dashboardNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
dashboardNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void DeleteDashboardsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteDashboardsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DeleteDashboardsResult::DeleteDashboardsResult()
{
}
DeleteDashboardsResult::DeleteDashboardsResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DeleteDashboardsResult& DeleteDashboardsResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DeleteDashboardsResult"))
{
resultNode = rootNode.FirstChild("DeleteDashboardsResult");
}
if(!resultNode.IsNull())
{
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DeleteDashboardsResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteInsightRulesRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DeleteInsightRulesRequest::DeleteInsightRulesRequest() :
m_ruleNamesHasBeenSet(false)
{
}
Aws::String DeleteInsightRulesRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DeleteInsightRules&";
if(m_ruleNamesHasBeenSet)
{
unsigned ruleNamesCount = 1;
for(auto& item : m_ruleNames)
{
ss << "RuleNames.member." << ruleNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
ruleNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void DeleteInsightRulesRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DeleteInsightRulesResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DeleteInsightRulesResult::DeleteInsightRulesResult()
{
}
DeleteInsightRulesResult::DeleteInsightRulesResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DeleteInsightRulesResult& DeleteInsightRulesResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DeleteInsightRulesResult"))
{
resultNode = rootNode.FirstChild("DeleteInsightRulesResult");
}
if(!resultNode.IsNull())
{
XmlNode failuresNode = resultNode.FirstChild("Failures");
if(!failuresNode.IsNull())
{
XmlNode failuresMember = failuresNode.FirstChild("member");
while(!failuresMember.IsNull())
{
m_failures.push_back(failuresMember);
failuresMember = failuresMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DeleteInsightRulesResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,86 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAlarmHistoryRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DescribeAlarmHistoryRequest::DescribeAlarmHistoryRequest() :
m_alarmNameHasBeenSet(false),
m_alarmTypesHasBeenSet(false),
m_historyItemType(HistoryItemType::NOT_SET),
m_historyItemTypeHasBeenSet(false),
m_startDateHasBeenSet(false),
m_endDateHasBeenSet(false),
m_maxRecords(0),
m_maxRecordsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_scanBy(ScanBy::NOT_SET),
m_scanByHasBeenSet(false)
{
}
Aws::String DescribeAlarmHistoryRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DescribeAlarmHistory&";
if(m_alarmNameHasBeenSet)
{
ss << "AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmTypesHasBeenSet)
{
unsigned alarmTypesCount = 1;
for(auto& item : m_alarmTypes)
{
ss << "AlarmTypes.member." << alarmTypesCount << "="
<< StringUtils::URLEncode(AlarmTypeMapper::GetNameForAlarmType(item).c_str()) << "&";
alarmTypesCount++;
}
}
if(m_historyItemTypeHasBeenSet)
{
ss << "HistoryItemType=" << HistoryItemTypeMapper::GetNameForHistoryItemType(m_historyItemType) << "&";
}
if(m_startDateHasBeenSet)
{
ss << "StartDate=" << StringUtils::URLEncode(m_startDate.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_endDateHasBeenSet)
{
ss << "EndDate=" << StringUtils::URLEncode(m_endDate.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_maxRecordsHasBeenSet)
{
ss << "MaxRecords=" << m_maxRecords << "&";
}
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
if(m_scanByHasBeenSet)
{
ss << "ScanBy=" << ScanByMapper::GetNameForScanBy(m_scanBy) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void DescribeAlarmHistoryRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAlarmHistoryResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DescribeAlarmHistoryResult::DescribeAlarmHistoryResult()
{
}
DescribeAlarmHistoryResult::DescribeAlarmHistoryResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DescribeAlarmHistoryResult& DescribeAlarmHistoryResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DescribeAlarmHistoryResult"))
{
resultNode = rootNode.FirstChild("DescribeAlarmHistoryResult");
}
if(!resultNode.IsNull())
{
XmlNode alarmHistoryItemsNode = resultNode.FirstChild("AlarmHistoryItems");
if(!alarmHistoryItemsNode.IsNull())
{
XmlNode alarmHistoryItemsMember = alarmHistoryItemsNode.FirstChild("member");
while(!alarmHistoryItemsMember.IsNull())
{
m_alarmHistoryItems.push_back(alarmHistoryItemsMember);
alarmHistoryItemsMember = alarmHistoryItemsMember.NextNode("member");
}
}
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DescribeAlarmHistoryResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAlarmsForMetricRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DescribeAlarmsForMetricRequest::DescribeAlarmsForMetricRequest() :
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_statistic(Statistic::NOT_SET),
m_statisticHasBeenSet(false),
m_extendedStatisticHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false)
{
}
Aws::String DescribeAlarmsForMetricRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DescribeAlarmsForMetric&";
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_statisticHasBeenSet)
{
ss << "Statistic=" << StatisticMapper::GetNameForStatistic(m_statistic) << "&";
}
if(m_extendedStatisticHasBeenSet)
{
ss << "ExtendedStatistic=" << StringUtils::URLEncode(m_extendedStatistic.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
if(m_periodHasBeenSet)
{
ss << "Period=" << m_period << "&";
}
if(m_unitHasBeenSet)
{
ss << "Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void DescribeAlarmsForMetricRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAlarmsForMetricResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DescribeAlarmsForMetricResult::DescribeAlarmsForMetricResult()
{
}
DescribeAlarmsForMetricResult::DescribeAlarmsForMetricResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DescribeAlarmsForMetricResult& DescribeAlarmsForMetricResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DescribeAlarmsForMetricResult"))
{
resultNode = rootNode.FirstChild("DescribeAlarmsForMetricResult");
}
if(!resultNode.IsNull())
{
XmlNode metricAlarmsNode = resultNode.FirstChild("MetricAlarms");
if(!metricAlarmsNode.IsNull())
{
XmlNode metricAlarmsMember = metricAlarmsNode.FirstChild("member");
while(!metricAlarmsMember.IsNull())
{
m_metricAlarms.push_back(metricAlarmsMember);
metricAlarmsMember = metricAlarmsMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DescribeAlarmsForMetricResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAlarmsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DescribeAlarmsRequest::DescribeAlarmsRequest() :
m_alarmNamesHasBeenSet(false),
m_alarmNamePrefixHasBeenSet(false),
m_alarmTypesHasBeenSet(false),
m_childrenOfAlarmNameHasBeenSet(false),
m_parentsOfAlarmNameHasBeenSet(false),
m_stateValue(StateValue::NOT_SET),
m_stateValueHasBeenSet(false),
m_actionPrefixHasBeenSet(false),
m_maxRecords(0),
m_maxRecordsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeAlarmsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DescribeAlarms&";
if(m_alarmNamesHasBeenSet)
{
unsigned alarmNamesCount = 1;
for(auto& item : m_alarmNames)
{
ss << "AlarmNames.member." << alarmNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
alarmNamesCount++;
}
}
if(m_alarmNamePrefixHasBeenSet)
{
ss << "AlarmNamePrefix=" << StringUtils::URLEncode(m_alarmNamePrefix.c_str()) << "&";
}
if(m_alarmTypesHasBeenSet)
{
unsigned alarmTypesCount = 1;
for(auto& item : m_alarmTypes)
{
ss << "AlarmTypes.member." << alarmTypesCount << "="
<< StringUtils::URLEncode(AlarmTypeMapper::GetNameForAlarmType(item).c_str()) << "&";
alarmTypesCount++;
}
}
if(m_childrenOfAlarmNameHasBeenSet)
{
ss << "ChildrenOfAlarmName=" << StringUtils::URLEncode(m_childrenOfAlarmName.c_str()) << "&";
}
if(m_parentsOfAlarmNameHasBeenSet)
{
ss << "ParentsOfAlarmName=" << StringUtils::URLEncode(m_parentsOfAlarmName.c_str()) << "&";
}
if(m_stateValueHasBeenSet)
{
ss << "StateValue=" << StateValueMapper::GetNameForStateValue(m_stateValue) << "&";
}
if(m_actionPrefixHasBeenSet)
{
ss << "ActionPrefix=" << StringUtils::URLEncode(m_actionPrefix.c_str()) << "&";
}
if(m_maxRecordsHasBeenSet)
{
ss << "MaxRecords=" << m_maxRecords << "&";
}
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void DescribeAlarmsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAlarmsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DescribeAlarmsResult::DescribeAlarmsResult()
{
}
DescribeAlarmsResult::DescribeAlarmsResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DescribeAlarmsResult& DescribeAlarmsResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DescribeAlarmsResult"))
{
resultNode = rootNode.FirstChild("DescribeAlarmsResult");
}
if(!resultNode.IsNull())
{
XmlNode compositeAlarmsNode = resultNode.FirstChild("CompositeAlarms");
if(!compositeAlarmsNode.IsNull())
{
XmlNode compositeAlarmsMember = compositeAlarmsNode.FirstChild("member");
while(!compositeAlarmsMember.IsNull())
{
m_compositeAlarms.push_back(compositeAlarmsMember);
compositeAlarmsMember = compositeAlarmsMember.NextNode("member");
}
}
XmlNode metricAlarmsNode = resultNode.FirstChild("MetricAlarms");
if(!metricAlarmsNode.IsNull())
{
XmlNode metricAlarmsMember = metricAlarmsNode.FirstChild("member");
while(!metricAlarmsMember.IsNull())
{
m_metricAlarms.push_back(metricAlarmsMember);
metricAlarmsMember = metricAlarmsMember.NextNode("member");
}
}
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DescribeAlarmsResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAnomalyDetectorsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DescribeAnomalyDetectorsRequest::DescribeAnomalyDetectorsRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false)
{
}
Aws::String DescribeAnomalyDetectorsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DescribeAnomalyDetectors&";
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
if(m_maxResultsHasBeenSet)
{
ss << "MaxResults=" << m_maxResults << "&";
}
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void DescribeAnomalyDetectorsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeAnomalyDetectorsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DescribeAnomalyDetectorsResult::DescribeAnomalyDetectorsResult()
{
}
DescribeAnomalyDetectorsResult::DescribeAnomalyDetectorsResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DescribeAnomalyDetectorsResult& DescribeAnomalyDetectorsResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DescribeAnomalyDetectorsResult"))
{
resultNode = rootNode.FirstChild("DescribeAnomalyDetectorsResult");
}
if(!resultNode.IsNull())
{
XmlNode anomalyDetectorsNode = resultNode.FirstChild("AnomalyDetectors");
if(!anomalyDetectorsNode.IsNull())
{
XmlNode anomalyDetectorsMember = anomalyDetectorsNode.FirstChild("member");
while(!anomalyDetectorsMember.IsNull())
{
m_anomalyDetectors.push_back(anomalyDetectorsMember);
anomalyDetectorsMember = anomalyDetectorsMember.NextNode("member");
}
}
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DescribeAnomalyDetectorsResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeInsightRulesRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DescribeInsightRulesRequest::DescribeInsightRulesRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String DescribeInsightRulesRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DescribeInsightRules&";
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
if(m_maxResultsHasBeenSet)
{
ss << "MaxResults=" << m_maxResults << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void DescribeInsightRulesRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DescribeInsightRulesResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DescribeInsightRulesResult::DescribeInsightRulesResult()
{
}
DescribeInsightRulesResult::DescribeInsightRulesResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DescribeInsightRulesResult& DescribeInsightRulesResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DescribeInsightRulesResult"))
{
resultNode = rootNode.FirstChild("DescribeInsightRulesResult");
}
if(!resultNode.IsNull())
{
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
XmlNode insightRulesNode = resultNode.FirstChild("InsightRules");
if(!insightRulesNode.IsNull())
{
XmlNode insightRulesMember = insightRulesNode.FirstChild("member");
while(!insightRulesMember.IsNull())
{
m_insightRules.push_back(insightRulesMember);
insightRulesMember = insightRulesMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DescribeInsightRulesResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/Dimension.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
{
Dimension::Dimension() :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Dimension::Dimension(const XmlNode& xmlNode) :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = xmlNode;
}
Dimension& Dimension::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nameNode = resultNode.FirstChild("Name");
if(!nameNode.IsNull())
{
m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText());
m_nameHasBeenSet = true;
}
XmlNode valueNode = resultNode.FirstChild("Value");
if(!valueNode.IsNull())
{
m_value = Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText());
m_valueHasBeenSet = true;
}
}
return *this;
}
void Dimension::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_nameHasBeenSet)
{
oStream << location << index << locationValue << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
void Dimension::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_nameHasBeenSet)
{
oStream << location << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DimensionFilter.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
{
DimensionFilter::DimensionFilter() :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
DimensionFilter::DimensionFilter(const XmlNode& xmlNode) :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = xmlNode;
}
DimensionFilter& DimensionFilter::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nameNode = resultNode.FirstChild("Name");
if(!nameNode.IsNull())
{
m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText());
m_nameHasBeenSet = true;
}
XmlNode valueNode = resultNode.FirstChild("Value");
if(!valueNode.IsNull())
{
m_value = Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText());
m_valueHasBeenSet = true;
}
}
return *this;
}
void DimensionFilter::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_nameHasBeenSet)
{
oStream << location << index << locationValue << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
void DimensionFilter::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_nameHasBeenSet)
{
oStream << location << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DisableAlarmActionsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DisableAlarmActionsRequest::DisableAlarmActionsRequest() :
m_alarmNamesHasBeenSet(false)
{
}
Aws::String DisableAlarmActionsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DisableAlarmActions&";
if(m_alarmNamesHasBeenSet)
{
unsigned alarmNamesCount = 1;
for(auto& item : m_alarmNames)
{
ss << "AlarmNames.member." << alarmNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
alarmNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void DisableAlarmActionsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DisableInsightRulesRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
DisableInsightRulesRequest::DisableInsightRulesRequest() :
m_ruleNamesHasBeenSet(false)
{
}
Aws::String DisableInsightRulesRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=DisableInsightRules&";
if(m_ruleNamesHasBeenSet)
{
unsigned ruleNamesCount = 1;
for(auto& item : m_ruleNames)
{
ss << "RuleNames.member." << ruleNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
ruleNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void DisableInsightRulesRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/DisableInsightRulesResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
DisableInsightRulesResult::DisableInsightRulesResult()
{
}
DisableInsightRulesResult::DisableInsightRulesResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
DisableInsightRulesResult& DisableInsightRulesResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "DisableInsightRulesResult"))
{
resultNode = rootNode.FirstChild("DisableInsightRulesResult");
}
if(!resultNode.IsNull())
{
XmlNode failuresNode = resultNode.FirstChild("Failures");
if(!failuresNode.IsNull())
{
XmlNode failuresMember = failuresNode.FirstChild("member");
while(!failuresMember.IsNull())
{
m_failures.push_back(failuresMember);
failuresMember = failuresMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::DisableInsightRulesResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/EnableAlarmActionsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
EnableAlarmActionsRequest::EnableAlarmActionsRequest() :
m_alarmNamesHasBeenSet(false)
{
}
Aws::String EnableAlarmActionsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=EnableAlarmActions&";
if(m_alarmNamesHasBeenSet)
{
unsigned alarmNamesCount = 1;
for(auto& item : m_alarmNames)
{
ss << "AlarmNames.member." << alarmNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
alarmNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void EnableAlarmActionsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/EnableInsightRulesRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
EnableInsightRulesRequest::EnableInsightRulesRequest() :
m_ruleNamesHasBeenSet(false)
{
}
Aws::String EnableInsightRulesRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=EnableInsightRules&";
if(m_ruleNamesHasBeenSet)
{
unsigned ruleNamesCount = 1;
for(auto& item : m_ruleNames)
{
ss << "RuleNames.member." << ruleNamesCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
ruleNamesCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void EnableInsightRulesRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/EnableInsightRulesResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
EnableInsightRulesResult::EnableInsightRulesResult()
{
}
EnableInsightRulesResult::EnableInsightRulesResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
EnableInsightRulesResult& EnableInsightRulesResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "EnableInsightRulesResult"))
{
resultNode = rootNode.FirstChild("EnableInsightRulesResult");
}
if(!resultNode.IsNull())
{
XmlNode failuresNode = resultNode.FirstChild("Failures");
if(!failuresNode.IsNull())
{
XmlNode failuresMember = failuresNode.FirstChild("member");
while(!failuresMember.IsNull())
{
m_failures.push_back(failuresMember);
failuresMember = failuresMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::EnableInsightRulesResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetDashboardRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
GetDashboardRequest::GetDashboardRequest() :
m_dashboardNameHasBeenSet(false)
{
}
Aws::String GetDashboardRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=GetDashboard&";
if(m_dashboardNameHasBeenSet)
{
ss << "DashboardName=" << StringUtils::URLEncode(m_dashboardName.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void GetDashboardRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetDashboardResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
GetDashboardResult::GetDashboardResult()
{
}
GetDashboardResult::GetDashboardResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetDashboardResult& GetDashboardResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "GetDashboardResult"))
{
resultNode = rootNode.FirstChild("GetDashboardResult");
}
if(!resultNode.IsNull())
{
XmlNode dashboardArnNode = resultNode.FirstChild("DashboardArn");
if(!dashboardArnNode.IsNull())
{
m_dashboardArn = Aws::Utils::Xml::DecodeEscapedXmlText(dashboardArnNode.GetText());
}
XmlNode dashboardBodyNode = resultNode.FirstChild("DashboardBody");
if(!dashboardBodyNode.IsNull())
{
m_dashboardBody = Aws::Utils::Xml::DecodeEscapedXmlText(dashboardBodyNode.GetText());
}
XmlNode dashboardNameNode = resultNode.FirstChild("DashboardName");
if(!dashboardNameNode.IsNull())
{
m_dashboardName = Aws::Utils::Xml::DecodeEscapedXmlText(dashboardNameNode.GetText());
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::GetDashboardResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetInsightRuleReportRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
GetInsightRuleReportRequest::GetInsightRuleReportRequest() :
m_ruleNameHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_maxContributorCount(0),
m_maxContributorCountHasBeenSet(false),
m_metricsHasBeenSet(false),
m_orderByHasBeenSet(false)
{
}
Aws::String GetInsightRuleReportRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=GetInsightRuleReport&";
if(m_ruleNameHasBeenSet)
{
ss << "RuleName=" << StringUtils::URLEncode(m_ruleName.c_str()) << "&";
}
if(m_startTimeHasBeenSet)
{
ss << "StartTime=" << StringUtils::URLEncode(m_startTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_endTimeHasBeenSet)
{
ss << "EndTime=" << StringUtils::URLEncode(m_endTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_periodHasBeenSet)
{
ss << "Period=" << m_period << "&";
}
if(m_maxContributorCountHasBeenSet)
{
ss << "MaxContributorCount=" << m_maxContributorCount << "&";
}
if(m_metricsHasBeenSet)
{
unsigned metricsCount = 1;
for(auto& item : m_metrics)
{
ss << "Metrics.member." << metricsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
metricsCount++;
}
}
if(m_orderByHasBeenSet)
{
ss << "OrderBy=" << StringUtils::URLEncode(m_orderBy.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void GetInsightRuleReportRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetInsightRuleReportResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
GetInsightRuleReportResult::GetInsightRuleReportResult() :
m_aggregateValue(0.0),
m_approximateUniqueCount(0)
{
}
GetInsightRuleReportResult::GetInsightRuleReportResult(const Aws::AmazonWebServiceResult<XmlDocument>& result) :
m_aggregateValue(0.0),
m_approximateUniqueCount(0)
{
*this = result;
}
GetInsightRuleReportResult& GetInsightRuleReportResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "GetInsightRuleReportResult"))
{
resultNode = rootNode.FirstChild("GetInsightRuleReportResult");
}
if(!resultNode.IsNull())
{
XmlNode keyLabelsNode = resultNode.FirstChild("KeyLabels");
if(!keyLabelsNode.IsNull())
{
XmlNode keyLabelsMember = keyLabelsNode.FirstChild("member");
while(!keyLabelsMember.IsNull())
{
m_keyLabels.push_back(keyLabelsMember.GetText());
keyLabelsMember = keyLabelsMember.NextNode("member");
}
}
XmlNode aggregationStatisticNode = resultNode.FirstChild("AggregationStatistic");
if(!aggregationStatisticNode.IsNull())
{
m_aggregationStatistic = Aws::Utils::Xml::DecodeEscapedXmlText(aggregationStatisticNode.GetText());
}
XmlNode aggregateValueNode = resultNode.FirstChild("AggregateValue");
if(!aggregateValueNode.IsNull())
{
m_aggregateValue = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(aggregateValueNode.GetText()).c_str()).c_str());
}
XmlNode approximateUniqueCountNode = resultNode.FirstChild("ApproximateUniqueCount");
if(!approximateUniqueCountNode.IsNull())
{
m_approximateUniqueCount = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(approximateUniqueCountNode.GetText()).c_str()).c_str());
}
XmlNode contributorsNode = resultNode.FirstChild("Contributors");
if(!contributorsNode.IsNull())
{
XmlNode contributorsMember = contributorsNode.FirstChild("member");
while(!contributorsMember.IsNull())
{
m_contributors.push_back(contributorsMember);
contributorsMember = contributorsMember.NextNode("member");
}
}
XmlNode metricDatapointsNode = resultNode.FirstChild("MetricDatapoints");
if(!metricDatapointsNode.IsNull())
{
XmlNode metricDatapointsMember = metricDatapointsNode.FirstChild("member");
while(!metricDatapointsMember.IsNull())
{
m_metricDatapoints.push_back(metricDatapointsMember);
metricDatapointsMember = metricDatapointsMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::GetInsightRuleReportResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetMetricDataRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
GetMetricDataRequest::GetMetricDataRequest() :
m_metricDataQueriesHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_scanBy(ScanBy::NOT_SET),
m_scanByHasBeenSet(false),
m_maxDatapoints(0),
m_maxDatapointsHasBeenSet(false)
{
}
Aws::String GetMetricDataRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=GetMetricData&";
if(m_metricDataQueriesHasBeenSet)
{
unsigned metricDataQueriesCount = 1;
for(auto& item : m_metricDataQueries)
{
item.OutputToStream(ss, "MetricDataQueries.member.", metricDataQueriesCount, "");
metricDataQueriesCount++;
}
}
if(m_startTimeHasBeenSet)
{
ss << "StartTime=" << StringUtils::URLEncode(m_startTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_endTimeHasBeenSet)
{
ss << "EndTime=" << StringUtils::URLEncode(m_endTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
if(m_scanByHasBeenSet)
{
ss << "ScanBy=" << ScanByMapper::GetNameForScanBy(m_scanBy) << "&";
}
if(m_maxDatapointsHasBeenSet)
{
ss << "MaxDatapoints=" << m_maxDatapoints << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void GetMetricDataRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetMetricDataResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
GetMetricDataResult::GetMetricDataResult()
{
}
GetMetricDataResult::GetMetricDataResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetMetricDataResult& GetMetricDataResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "GetMetricDataResult"))
{
resultNode = rootNode.FirstChild("GetMetricDataResult");
}
if(!resultNode.IsNull())
{
XmlNode metricDataResultsNode = resultNode.FirstChild("MetricDataResults");
if(!metricDataResultsNode.IsNull())
{
XmlNode metricDataResultsMember = metricDataResultsNode.FirstChild("member");
while(!metricDataResultsMember.IsNull())
{
m_metricDataResults.push_back(metricDataResultsMember);
metricDataResultsMember = metricDataResultsMember.NextNode("member");
}
}
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
XmlNode messagesNode = resultNode.FirstChild("Messages");
if(!messagesNode.IsNull())
{
XmlNode messagesMember = messagesNode.FirstChild("member");
while(!messagesMember.IsNull())
{
m_messages.push_back(messagesMember);
messagesMember = messagesMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::GetMetricDataResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,102 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetMetricStatisticsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
GetMetricStatisticsRequest::GetMetricStatisticsRequest() :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_statisticsHasBeenSet(false),
m_extendedStatisticsHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false)
{
}
Aws::String GetMetricStatisticsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=GetMetricStatistics&";
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
if(m_startTimeHasBeenSet)
{
ss << "StartTime=" << StringUtils::URLEncode(m_startTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_endTimeHasBeenSet)
{
ss << "EndTime=" << StringUtils::URLEncode(m_endTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_periodHasBeenSet)
{
ss << "Period=" << m_period << "&";
}
if(m_statisticsHasBeenSet)
{
unsigned statisticsCount = 1;
for(auto& item : m_statistics)
{
ss << "Statistics.member." << statisticsCount << "="
<< StringUtils::URLEncode(StatisticMapper::GetNameForStatistic(item).c_str()) << "&";
statisticsCount++;
}
}
if(m_extendedStatisticsHasBeenSet)
{
unsigned extendedStatisticsCount = 1;
for(auto& item : m_extendedStatistics)
{
ss << "ExtendedStatistics.member." << extendedStatisticsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
extendedStatisticsCount++;
}
}
if(m_unitHasBeenSet)
{
ss << "Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void GetMetricStatisticsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetMetricStatisticsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
GetMetricStatisticsResult::GetMetricStatisticsResult()
{
}
GetMetricStatisticsResult::GetMetricStatisticsResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetMetricStatisticsResult& GetMetricStatisticsResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "GetMetricStatisticsResult"))
{
resultNode = rootNode.FirstChild("GetMetricStatisticsResult");
}
if(!resultNode.IsNull())
{
XmlNode labelNode = resultNode.FirstChild("Label");
if(!labelNode.IsNull())
{
m_label = Aws::Utils::Xml::DecodeEscapedXmlText(labelNode.GetText());
}
XmlNode datapointsNode = resultNode.FirstChild("Datapoints");
if(!datapointsNode.IsNull())
{
XmlNode datapointsMember = datapointsNode.FirstChild("member");
while(!datapointsMember.IsNull())
{
m_datapoints.push_back(datapointsMember);
datapointsMember = datapointsMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::GetMetricStatisticsResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetMetricWidgetImageRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
GetMetricWidgetImageRequest::GetMetricWidgetImageRequest() :
m_metricWidgetHasBeenSet(false),
m_outputFormatHasBeenSet(false)
{
}
Aws::String GetMetricWidgetImageRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=GetMetricWidgetImage&";
if(m_metricWidgetHasBeenSet)
{
ss << "MetricWidget=" << StringUtils::URLEncode(m_metricWidget.c_str()) << "&";
}
if(m_outputFormatHasBeenSet)
{
ss << "OutputFormat=" << StringUtils::URLEncode(m_outputFormat.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void GetMetricWidgetImageRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/GetMetricWidgetImageResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/core/utils/HashingUtils.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
GetMetricWidgetImageResult::GetMetricWidgetImageResult()
{
}
GetMetricWidgetImageResult::GetMetricWidgetImageResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetMetricWidgetImageResult& GetMetricWidgetImageResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "GetMetricWidgetImageResult"))
{
resultNode = rootNode.FirstChild("GetMetricWidgetImageResult");
}
if(!resultNode.IsNull())
{
XmlNode metricWidgetImageNode = resultNode.FirstChild("MetricWidgetImage");
if(!metricWidgetImageNode.IsNull())
{
m_metricWidgetImage = HashingUtils::Base64Decode(Aws::Utils::Xml::DecodeEscapedXmlText(metricWidgetImageNode.GetText()));
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::GetMetricWidgetImageResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/HistoryItemType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace HistoryItemTypeMapper
{
static const int ConfigurationUpdate_HASH = HashingUtils::HashString("ConfigurationUpdate");
static const int StateUpdate_HASH = HashingUtils::HashString("StateUpdate");
static const int Action_HASH = HashingUtils::HashString("Action");
HistoryItemType GetHistoryItemTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ConfigurationUpdate_HASH)
{
return HistoryItemType::ConfigurationUpdate;
}
else if (hashCode == StateUpdate_HASH)
{
return HistoryItemType::StateUpdate;
}
else if (hashCode == Action_HASH)
{
return HistoryItemType::Action;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<HistoryItemType>(hashCode);
}
return HistoryItemType::NOT_SET;
}
Aws::String GetNameForHistoryItemType(HistoryItemType enumValue)
{
switch(enumValue)
{
case HistoryItemType::ConfigurationUpdate:
return "ConfigurationUpdate";
case HistoryItemType::StateUpdate:
return "StateUpdate";
case HistoryItemType::Action:
return "Action";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace HistoryItemTypeMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,121 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/InsightRule.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
{
InsightRule::InsightRule() :
m_nameHasBeenSet(false),
m_stateHasBeenSet(false),
m_schemaHasBeenSet(false),
m_definitionHasBeenSet(false)
{
}
InsightRule::InsightRule(const XmlNode& xmlNode) :
m_nameHasBeenSet(false),
m_stateHasBeenSet(false),
m_schemaHasBeenSet(false),
m_definitionHasBeenSet(false)
{
*this = xmlNode;
}
InsightRule& InsightRule::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nameNode = resultNode.FirstChild("Name");
if(!nameNode.IsNull())
{
m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText());
m_nameHasBeenSet = true;
}
XmlNode stateNode = resultNode.FirstChild("State");
if(!stateNode.IsNull())
{
m_state = Aws::Utils::Xml::DecodeEscapedXmlText(stateNode.GetText());
m_stateHasBeenSet = true;
}
XmlNode schemaNode = resultNode.FirstChild("Schema");
if(!schemaNode.IsNull())
{
m_schema = Aws::Utils::Xml::DecodeEscapedXmlText(schemaNode.GetText());
m_schemaHasBeenSet = true;
}
XmlNode definitionNode = resultNode.FirstChild("Definition");
if(!definitionNode.IsNull())
{
m_definition = Aws::Utils::Xml::DecodeEscapedXmlText(definitionNode.GetText());
m_definitionHasBeenSet = true;
}
}
return *this;
}
void InsightRule::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_nameHasBeenSet)
{
oStream << location << index << locationValue << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_stateHasBeenSet)
{
oStream << location << index << locationValue << ".State=" << StringUtils::URLEncode(m_state.c_str()) << "&";
}
if(m_schemaHasBeenSet)
{
oStream << location << index << locationValue << ".Schema=" << StringUtils::URLEncode(m_schema.c_str()) << "&";
}
if(m_definitionHasBeenSet)
{
oStream << location << index << locationValue << ".Definition=" << StringUtils::URLEncode(m_definition.c_str()) << "&";
}
}
void InsightRule::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_nameHasBeenSet)
{
oStream << location << ".Name=" << StringUtils::URLEncode(m_name.c_str()) << "&";
}
if(m_stateHasBeenSet)
{
oStream << location << ".State=" << StringUtils::URLEncode(m_state.c_str()) << "&";
}
if(m_schemaHasBeenSet)
{
oStream << location << ".Schema=" << StringUtils::URLEncode(m_schema.c_str()) << "&";
}
if(m_definitionHasBeenSet)
{
oStream << location << ".Definition=" << StringUtils::URLEncode(m_definition.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/InsightRuleContributor.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
{
InsightRuleContributor::InsightRuleContributor() :
m_keysHasBeenSet(false),
m_approximateAggregateValue(0.0),
m_approximateAggregateValueHasBeenSet(false),
m_datapointsHasBeenSet(false)
{
}
InsightRuleContributor::InsightRuleContributor(const XmlNode& xmlNode) :
m_keysHasBeenSet(false),
m_approximateAggregateValue(0.0),
m_approximateAggregateValueHasBeenSet(false),
m_datapointsHasBeenSet(false)
{
*this = xmlNode;
}
InsightRuleContributor& InsightRuleContributor::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode keysNode = resultNode.FirstChild("Keys");
if(!keysNode.IsNull())
{
XmlNode keysMember = keysNode.FirstChild("member");
while(!keysMember.IsNull())
{
m_keys.push_back(keysMember.GetText());
keysMember = keysMember.NextNode("member");
}
m_keysHasBeenSet = true;
}
XmlNode approximateAggregateValueNode = resultNode.FirstChild("ApproximateAggregateValue");
if(!approximateAggregateValueNode.IsNull())
{
m_approximateAggregateValue = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(approximateAggregateValueNode.GetText()).c_str()).c_str());
m_approximateAggregateValueHasBeenSet = true;
}
XmlNode datapointsNode = resultNode.FirstChild("Datapoints");
if(!datapointsNode.IsNull())
{
XmlNode datapointsMember = datapointsNode.FirstChild("member");
while(!datapointsMember.IsNull())
{
m_datapoints.push_back(datapointsMember);
datapointsMember = datapointsMember.NextNode("member");
}
m_datapointsHasBeenSet = true;
}
}
return *this;
}
void InsightRuleContributor::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_keysHasBeenSet)
{
unsigned keysIdx = 1;
for(auto& item : m_keys)
{
oStream << location << index << locationValue << ".Keys.member." << keysIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_approximateAggregateValueHasBeenSet)
{
oStream << location << index << locationValue << ".ApproximateAggregateValue=" << StringUtils::URLEncode(m_approximateAggregateValue) << "&";
}
if(m_datapointsHasBeenSet)
{
unsigned datapointsIdx = 1;
for(auto& item : m_datapoints)
{
Aws::StringStream datapointsSs;
datapointsSs << location << index << locationValue << ".Datapoints.member." << datapointsIdx++;
item.OutputToStream(oStream, datapointsSs.str().c_str());
}
}
}
void InsightRuleContributor::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_keysHasBeenSet)
{
unsigned keysIdx = 1;
for(auto& item : m_keys)
{
oStream << location << ".Keys.member." << keysIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_approximateAggregateValueHasBeenSet)
{
oStream << location << ".ApproximateAggregateValue=" << StringUtils::URLEncode(m_approximateAggregateValue) << "&";
}
if(m_datapointsHasBeenSet)
{
unsigned datapointsIdx = 1;
for(auto& item : m_datapoints)
{
Aws::StringStream datapointsSs;
datapointsSs << location << ".Datapoints.member." << datapointsIdx++;
item.OutputToStream(oStream, datapointsSs.str().c_str());
}
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/InsightRuleContributorDatapoint.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
{
InsightRuleContributorDatapoint::InsightRuleContributorDatapoint() :
m_timestampHasBeenSet(false),
m_approximateValue(0.0),
m_approximateValueHasBeenSet(false)
{
}
InsightRuleContributorDatapoint::InsightRuleContributorDatapoint(const XmlNode& xmlNode) :
m_timestampHasBeenSet(false),
m_approximateValue(0.0),
m_approximateValueHasBeenSet(false)
{
*this = xmlNode;
}
InsightRuleContributorDatapoint& InsightRuleContributorDatapoint::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode timestampNode = resultNode.FirstChild("Timestamp");
if(!timestampNode.IsNull())
{
m_timestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(timestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_timestampHasBeenSet = true;
}
XmlNode approximateValueNode = resultNode.FirstChild("ApproximateValue");
if(!approximateValueNode.IsNull())
{
m_approximateValue = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(approximateValueNode.GetText()).c_str()).c_str());
m_approximateValueHasBeenSet = true;
}
}
return *this;
}
void InsightRuleContributorDatapoint::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_timestampHasBeenSet)
{
oStream << location << index << locationValue << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_approximateValueHasBeenSet)
{
oStream << location << index << locationValue << ".ApproximateValue=" << StringUtils::URLEncode(m_approximateValue) << "&";
}
}
void InsightRuleContributorDatapoint::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_timestampHasBeenSet)
{
oStream << location << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_approximateValueHasBeenSet)
{
oStream << location << ".ApproximateValue=" << StringUtils::URLEncode(m_approximateValue) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,203 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/InsightRuleMetricDatapoint.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
{
InsightRuleMetricDatapoint::InsightRuleMetricDatapoint() :
m_timestampHasBeenSet(false),
m_uniqueContributors(0.0),
m_uniqueContributorsHasBeenSet(false),
m_maxContributorValue(0.0),
m_maxContributorValueHasBeenSet(false),
m_sampleCount(0.0),
m_sampleCountHasBeenSet(false),
m_average(0.0),
m_averageHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_minimum(0.0),
m_minimumHasBeenSet(false),
m_maximum(0.0),
m_maximumHasBeenSet(false)
{
}
InsightRuleMetricDatapoint::InsightRuleMetricDatapoint(const XmlNode& xmlNode) :
m_timestampHasBeenSet(false),
m_uniqueContributors(0.0),
m_uniqueContributorsHasBeenSet(false),
m_maxContributorValue(0.0),
m_maxContributorValueHasBeenSet(false),
m_sampleCount(0.0),
m_sampleCountHasBeenSet(false),
m_average(0.0),
m_averageHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_minimum(0.0),
m_minimumHasBeenSet(false),
m_maximum(0.0),
m_maximumHasBeenSet(false)
{
*this = xmlNode;
}
InsightRuleMetricDatapoint& InsightRuleMetricDatapoint::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode timestampNode = resultNode.FirstChild("Timestamp");
if(!timestampNode.IsNull())
{
m_timestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(timestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_timestampHasBeenSet = true;
}
XmlNode uniqueContributorsNode = resultNode.FirstChild("UniqueContributors");
if(!uniqueContributorsNode.IsNull())
{
m_uniqueContributors = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(uniqueContributorsNode.GetText()).c_str()).c_str());
m_uniqueContributorsHasBeenSet = true;
}
XmlNode maxContributorValueNode = resultNode.FirstChild("MaxContributorValue");
if(!maxContributorValueNode.IsNull())
{
m_maxContributorValue = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxContributorValueNode.GetText()).c_str()).c_str());
m_maxContributorValueHasBeenSet = true;
}
XmlNode sampleCountNode = resultNode.FirstChild("SampleCount");
if(!sampleCountNode.IsNull())
{
m_sampleCount = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sampleCountNode.GetText()).c_str()).c_str());
m_sampleCountHasBeenSet = true;
}
XmlNode averageNode = resultNode.FirstChild("Average");
if(!averageNode.IsNull())
{
m_average = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(averageNode.GetText()).c_str()).c_str());
m_averageHasBeenSet = true;
}
XmlNode sumNode = resultNode.FirstChild("Sum");
if(!sumNode.IsNull())
{
m_sum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sumNode.GetText()).c_str()).c_str());
m_sumHasBeenSet = true;
}
XmlNode minimumNode = resultNode.FirstChild("Minimum");
if(!minimumNode.IsNull())
{
m_minimum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(minimumNode.GetText()).c_str()).c_str());
m_minimumHasBeenSet = true;
}
XmlNode maximumNode = resultNode.FirstChild("Maximum");
if(!maximumNode.IsNull())
{
m_maximum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maximumNode.GetText()).c_str()).c_str());
m_maximumHasBeenSet = true;
}
}
return *this;
}
void InsightRuleMetricDatapoint::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_timestampHasBeenSet)
{
oStream << location << index << locationValue << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_uniqueContributorsHasBeenSet)
{
oStream << location << index << locationValue << ".UniqueContributors=" << StringUtils::URLEncode(m_uniqueContributors) << "&";
}
if(m_maxContributorValueHasBeenSet)
{
oStream << location << index << locationValue << ".MaxContributorValue=" << StringUtils::URLEncode(m_maxContributorValue) << "&";
}
if(m_sampleCountHasBeenSet)
{
oStream << location << index << locationValue << ".SampleCount=" << StringUtils::URLEncode(m_sampleCount) << "&";
}
if(m_averageHasBeenSet)
{
oStream << location << index << locationValue << ".Average=" << StringUtils::URLEncode(m_average) << "&";
}
if(m_sumHasBeenSet)
{
oStream << location << index << locationValue << ".Sum=" << StringUtils::URLEncode(m_sum) << "&";
}
if(m_minimumHasBeenSet)
{
oStream << location << index << locationValue << ".Minimum=" << StringUtils::URLEncode(m_minimum) << "&";
}
if(m_maximumHasBeenSet)
{
oStream << location << index << locationValue << ".Maximum=" << StringUtils::URLEncode(m_maximum) << "&";
}
}
void InsightRuleMetricDatapoint::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_timestampHasBeenSet)
{
oStream << location << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_uniqueContributorsHasBeenSet)
{
oStream << location << ".UniqueContributors=" << StringUtils::URLEncode(m_uniqueContributors) << "&";
}
if(m_maxContributorValueHasBeenSet)
{
oStream << location << ".MaxContributorValue=" << StringUtils::URLEncode(m_maxContributorValue) << "&";
}
if(m_sampleCountHasBeenSet)
{
oStream << location << ".SampleCount=" << StringUtils::URLEncode(m_sampleCount) << "&";
}
if(m_averageHasBeenSet)
{
oStream << location << ".Average=" << StringUtils::URLEncode(m_average) << "&";
}
if(m_sumHasBeenSet)
{
oStream << location << ".Sum=" << StringUtils::URLEncode(m_sum) << "&";
}
if(m_minimumHasBeenSet)
{
oStream << location << ".Minimum=" << StringUtils::URLEncode(m_minimum) << "&";
}
if(m_maximumHasBeenSet)
{
oStream << location << ".Maximum=" << StringUtils::URLEncode(m_maximum) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ListDashboardsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
ListDashboardsRequest::ListDashboardsRequest() :
m_dashboardNamePrefixHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListDashboardsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=ListDashboards&";
if(m_dashboardNamePrefixHasBeenSet)
{
ss << "DashboardNamePrefix=" << StringUtils::URLEncode(m_dashboardNamePrefix.c_str()) << "&";
}
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void ListDashboardsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ListDashboardsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
ListDashboardsResult::ListDashboardsResult()
{
}
ListDashboardsResult::ListDashboardsResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
ListDashboardsResult& ListDashboardsResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "ListDashboardsResult"))
{
resultNode = rootNode.FirstChild("ListDashboardsResult");
}
if(!resultNode.IsNull())
{
XmlNode dashboardEntriesNode = resultNode.FirstChild("DashboardEntries");
if(!dashboardEntriesNode.IsNull())
{
XmlNode dashboardEntriesMember = dashboardEntriesNode.FirstChild("member");
while(!dashboardEntriesMember.IsNull())
{
m_dashboardEntries.push_back(dashboardEntriesMember);
dashboardEntriesMember = dashboardEntriesMember.NextNode("member");
}
}
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::ListDashboardsResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ListMetricsRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
ListMetricsRequest::ListMetricsRequest() :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_recentlyActive(RecentlyActive::NOT_SET),
m_recentlyActiveHasBeenSet(false)
{
}
Aws::String ListMetricsRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=ListMetrics&";
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
if(m_nextTokenHasBeenSet)
{
ss << "NextToken=" << StringUtils::URLEncode(m_nextToken.c_str()) << "&";
}
if(m_recentlyActiveHasBeenSet)
{
ss << "RecentlyActive=" << RecentlyActiveMapper::GetNameForRecentlyActive(m_recentlyActive) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void ListMetricsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ListMetricsResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
ListMetricsResult::ListMetricsResult()
{
}
ListMetricsResult::ListMetricsResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
ListMetricsResult& ListMetricsResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "ListMetricsResult"))
{
resultNode = rootNode.FirstChild("ListMetricsResult");
}
if(!resultNode.IsNull())
{
XmlNode metricsNode = resultNode.FirstChild("Metrics");
if(!metricsNode.IsNull())
{
XmlNode metricsMember = metricsNode.FirstChild("member");
while(!metricsMember.IsNull())
{
m_metrics.push_back(metricsMember);
metricsMember = metricsMember.NextNode("member");
}
}
XmlNode nextTokenNode = resultNode.FirstChild("NextToken");
if(!nextTokenNode.IsNull())
{
m_nextToken = Aws::Utils::Xml::DecodeEscapedXmlText(nextTokenNode.GetText());
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::ListMetricsResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceARNHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=ListTagsForResource&";
if(m_resourceARNHasBeenSet)
{
ss << "ResourceARN=" << StringUtils::URLEncode(m_resourceARN.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void ListTagsForResourceRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ListTagsForResourceResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
ListTagsForResourceResult::ListTagsForResourceResult()
{
}
ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "ListTagsForResourceResult"))
{
resultNode = rootNode.FirstChild("ListTagsForResourceResult");
}
if(!resultNode.IsNull())
{
XmlNode tagsNode = resultNode.FirstChild("Tags");
if(!tagsNode.IsNull())
{
XmlNode tagsMember = tagsNode.FirstChild("member");
while(!tagsMember.IsNull())
{
m_tags.push_back(tagsMember);
tagsMember = tagsMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::ListTagsForResourceResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/MessageData.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
{
MessageData::MessageData() :
m_codeHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
MessageData::MessageData(const XmlNode& xmlNode) :
m_codeHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = xmlNode;
}
MessageData& MessageData::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode codeNode = resultNode.FirstChild("Code");
if(!codeNode.IsNull())
{
m_code = Aws::Utils::Xml::DecodeEscapedXmlText(codeNode.GetText());
m_codeHasBeenSet = true;
}
XmlNode valueNode = resultNode.FirstChild("Value");
if(!valueNode.IsNull())
{
m_value = Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText());
m_valueHasBeenSet = true;
}
}
return *this;
}
void MessageData::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_codeHasBeenSet)
{
oStream << location << index << locationValue << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
void MessageData::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_codeHasBeenSet)
{
oStream << location << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,122 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/Metric.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
{
Metric::Metric() :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false)
{
}
Metric::Metric(const XmlNode& xmlNode) :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false)
{
*this = xmlNode;
}
Metric& Metric::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode namespaceNode = resultNode.FirstChild("Namespace");
if(!namespaceNode.IsNull())
{
m_namespace = Aws::Utils::Xml::DecodeEscapedXmlText(namespaceNode.GetText());
m_namespaceHasBeenSet = true;
}
XmlNode metricNameNode = resultNode.FirstChild("MetricName");
if(!metricNameNode.IsNull())
{
m_metricName = Aws::Utils::Xml::DecodeEscapedXmlText(metricNameNode.GetText());
m_metricNameHasBeenSet = true;
}
XmlNode dimensionsNode = resultNode.FirstChild("Dimensions");
if(!dimensionsNode.IsNull())
{
XmlNode dimensionsMember = dimensionsNode.FirstChild("member");
while(!dimensionsMember.IsNull())
{
m_dimensions.push_back(dimensionsMember);
dimensionsMember = dimensionsMember.NextNode("member");
}
m_dimensionsHasBeenSet = true;
}
}
return *this;
}
void Metric::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_namespaceHasBeenSet)
{
oStream << location << index << locationValue << ".Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
oStream << location << index << locationValue << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << index << locationValue << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
}
void Metric::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_namespaceHasBeenSet)
{
oStream << location << ".Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
oStream << location << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,608 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/MetricAlarm.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
{
MetricAlarm::MetricAlarm() :
m_alarmNameHasBeenSet(false),
m_alarmArnHasBeenSet(false),
m_alarmDescriptionHasBeenSet(false),
m_alarmConfigurationUpdatedTimestampHasBeenSet(false),
m_actionsEnabled(false),
m_actionsEnabledHasBeenSet(false),
m_oKActionsHasBeenSet(false),
m_alarmActionsHasBeenSet(false),
m_insufficientDataActionsHasBeenSet(false),
m_stateValue(StateValue::NOT_SET),
m_stateValueHasBeenSet(false),
m_stateReasonHasBeenSet(false),
m_stateReasonDataHasBeenSet(false),
m_stateUpdatedTimestampHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_statistic(Statistic::NOT_SET),
m_statisticHasBeenSet(false),
m_extendedStatisticHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_evaluationPeriods(0),
m_evaluationPeriodsHasBeenSet(false),
m_datapointsToAlarm(0),
m_datapointsToAlarmHasBeenSet(false),
m_threshold(0.0),
m_thresholdHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_treatMissingDataHasBeenSet(false),
m_evaluateLowSampleCountPercentileHasBeenSet(false),
m_metricsHasBeenSet(false),
m_thresholdMetricIdHasBeenSet(false)
{
}
MetricAlarm::MetricAlarm(const XmlNode& xmlNode) :
m_alarmNameHasBeenSet(false),
m_alarmArnHasBeenSet(false),
m_alarmDescriptionHasBeenSet(false),
m_alarmConfigurationUpdatedTimestampHasBeenSet(false),
m_actionsEnabled(false),
m_actionsEnabledHasBeenSet(false),
m_oKActionsHasBeenSet(false),
m_alarmActionsHasBeenSet(false),
m_insufficientDataActionsHasBeenSet(false),
m_stateValue(StateValue::NOT_SET),
m_stateValueHasBeenSet(false),
m_stateReasonHasBeenSet(false),
m_stateReasonDataHasBeenSet(false),
m_stateUpdatedTimestampHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_statistic(Statistic::NOT_SET),
m_statisticHasBeenSet(false),
m_extendedStatisticHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_evaluationPeriods(0),
m_evaluationPeriodsHasBeenSet(false),
m_datapointsToAlarm(0),
m_datapointsToAlarmHasBeenSet(false),
m_threshold(0.0),
m_thresholdHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_treatMissingDataHasBeenSet(false),
m_evaluateLowSampleCountPercentileHasBeenSet(false),
m_metricsHasBeenSet(false),
m_thresholdMetricIdHasBeenSet(false)
{
*this = xmlNode;
}
MetricAlarm& MetricAlarm::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode alarmNameNode = resultNode.FirstChild("AlarmName");
if(!alarmNameNode.IsNull())
{
m_alarmName = Aws::Utils::Xml::DecodeEscapedXmlText(alarmNameNode.GetText());
m_alarmNameHasBeenSet = true;
}
XmlNode alarmArnNode = resultNode.FirstChild("AlarmArn");
if(!alarmArnNode.IsNull())
{
m_alarmArn = Aws::Utils::Xml::DecodeEscapedXmlText(alarmArnNode.GetText());
m_alarmArnHasBeenSet = true;
}
XmlNode alarmDescriptionNode = resultNode.FirstChild("AlarmDescription");
if(!alarmDescriptionNode.IsNull())
{
m_alarmDescription = Aws::Utils::Xml::DecodeEscapedXmlText(alarmDescriptionNode.GetText());
m_alarmDescriptionHasBeenSet = true;
}
XmlNode alarmConfigurationUpdatedTimestampNode = resultNode.FirstChild("AlarmConfigurationUpdatedTimestamp");
if(!alarmConfigurationUpdatedTimestampNode.IsNull())
{
m_alarmConfigurationUpdatedTimestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(alarmConfigurationUpdatedTimestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_alarmConfigurationUpdatedTimestampHasBeenSet = true;
}
XmlNode actionsEnabledNode = resultNode.FirstChild("ActionsEnabled");
if(!actionsEnabledNode.IsNull())
{
m_actionsEnabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(actionsEnabledNode.GetText()).c_str()).c_str());
m_actionsEnabledHasBeenSet = true;
}
XmlNode oKActionsNode = resultNode.FirstChild("OKActions");
if(!oKActionsNode.IsNull())
{
XmlNode oKActionsMember = oKActionsNode.FirstChild("member");
while(!oKActionsMember.IsNull())
{
m_oKActions.push_back(oKActionsMember.GetText());
oKActionsMember = oKActionsMember.NextNode("member");
}
m_oKActionsHasBeenSet = true;
}
XmlNode alarmActionsNode = resultNode.FirstChild("AlarmActions");
if(!alarmActionsNode.IsNull())
{
XmlNode alarmActionsMember = alarmActionsNode.FirstChild("member");
while(!alarmActionsMember.IsNull())
{
m_alarmActions.push_back(alarmActionsMember.GetText());
alarmActionsMember = alarmActionsMember.NextNode("member");
}
m_alarmActionsHasBeenSet = true;
}
XmlNode insufficientDataActionsNode = resultNode.FirstChild("InsufficientDataActions");
if(!insufficientDataActionsNode.IsNull())
{
XmlNode insufficientDataActionsMember = insufficientDataActionsNode.FirstChild("member");
while(!insufficientDataActionsMember.IsNull())
{
m_insufficientDataActions.push_back(insufficientDataActionsMember.GetText());
insufficientDataActionsMember = insufficientDataActionsMember.NextNode("member");
}
m_insufficientDataActionsHasBeenSet = true;
}
XmlNode stateValueNode = resultNode.FirstChild("StateValue");
if(!stateValueNode.IsNull())
{
m_stateValue = StateValueMapper::GetStateValueForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(stateValueNode.GetText()).c_str()).c_str());
m_stateValueHasBeenSet = true;
}
XmlNode stateReasonNode = resultNode.FirstChild("StateReason");
if(!stateReasonNode.IsNull())
{
m_stateReason = Aws::Utils::Xml::DecodeEscapedXmlText(stateReasonNode.GetText());
m_stateReasonHasBeenSet = true;
}
XmlNode stateReasonDataNode = resultNode.FirstChild("StateReasonData");
if(!stateReasonDataNode.IsNull())
{
m_stateReasonData = Aws::Utils::Xml::DecodeEscapedXmlText(stateReasonDataNode.GetText());
m_stateReasonDataHasBeenSet = true;
}
XmlNode stateUpdatedTimestampNode = resultNode.FirstChild("StateUpdatedTimestamp");
if(!stateUpdatedTimestampNode.IsNull())
{
m_stateUpdatedTimestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(stateUpdatedTimestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_stateUpdatedTimestampHasBeenSet = true;
}
XmlNode metricNameNode = resultNode.FirstChild("MetricName");
if(!metricNameNode.IsNull())
{
m_metricName = Aws::Utils::Xml::DecodeEscapedXmlText(metricNameNode.GetText());
m_metricNameHasBeenSet = true;
}
XmlNode namespaceNode = resultNode.FirstChild("Namespace");
if(!namespaceNode.IsNull())
{
m_namespace = Aws::Utils::Xml::DecodeEscapedXmlText(namespaceNode.GetText());
m_namespaceHasBeenSet = true;
}
XmlNode statisticNode = resultNode.FirstChild("Statistic");
if(!statisticNode.IsNull())
{
m_statistic = StatisticMapper::GetStatisticForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(statisticNode.GetText()).c_str()).c_str());
m_statisticHasBeenSet = true;
}
XmlNode extendedStatisticNode = resultNode.FirstChild("ExtendedStatistic");
if(!extendedStatisticNode.IsNull())
{
m_extendedStatistic = Aws::Utils::Xml::DecodeEscapedXmlText(extendedStatisticNode.GetText());
m_extendedStatisticHasBeenSet = true;
}
XmlNode dimensionsNode = resultNode.FirstChild("Dimensions");
if(!dimensionsNode.IsNull())
{
XmlNode dimensionsMember = dimensionsNode.FirstChild("member");
while(!dimensionsMember.IsNull())
{
m_dimensions.push_back(dimensionsMember);
dimensionsMember = dimensionsMember.NextNode("member");
}
m_dimensionsHasBeenSet = true;
}
XmlNode periodNode = resultNode.FirstChild("Period");
if(!periodNode.IsNull())
{
m_period = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(periodNode.GetText()).c_str()).c_str());
m_periodHasBeenSet = true;
}
XmlNode unitNode = resultNode.FirstChild("Unit");
if(!unitNode.IsNull())
{
m_unit = StandardUnitMapper::GetStandardUnitForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(unitNode.GetText()).c_str()).c_str());
m_unitHasBeenSet = true;
}
XmlNode evaluationPeriodsNode = resultNode.FirstChild("EvaluationPeriods");
if(!evaluationPeriodsNode.IsNull())
{
m_evaluationPeriods = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(evaluationPeriodsNode.GetText()).c_str()).c_str());
m_evaluationPeriodsHasBeenSet = true;
}
XmlNode datapointsToAlarmNode = resultNode.FirstChild("DatapointsToAlarm");
if(!datapointsToAlarmNode.IsNull())
{
m_datapointsToAlarm = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(datapointsToAlarmNode.GetText()).c_str()).c_str());
m_datapointsToAlarmHasBeenSet = true;
}
XmlNode thresholdNode = resultNode.FirstChild("Threshold");
if(!thresholdNode.IsNull())
{
m_threshold = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(thresholdNode.GetText()).c_str()).c_str());
m_thresholdHasBeenSet = true;
}
XmlNode comparisonOperatorNode = resultNode.FirstChild("ComparisonOperator");
if(!comparisonOperatorNode.IsNull())
{
m_comparisonOperator = ComparisonOperatorMapper::GetComparisonOperatorForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(comparisonOperatorNode.GetText()).c_str()).c_str());
m_comparisonOperatorHasBeenSet = true;
}
XmlNode treatMissingDataNode = resultNode.FirstChild("TreatMissingData");
if(!treatMissingDataNode.IsNull())
{
m_treatMissingData = Aws::Utils::Xml::DecodeEscapedXmlText(treatMissingDataNode.GetText());
m_treatMissingDataHasBeenSet = true;
}
XmlNode evaluateLowSampleCountPercentileNode = resultNode.FirstChild("EvaluateLowSampleCountPercentile");
if(!evaluateLowSampleCountPercentileNode.IsNull())
{
m_evaluateLowSampleCountPercentile = Aws::Utils::Xml::DecodeEscapedXmlText(evaluateLowSampleCountPercentileNode.GetText());
m_evaluateLowSampleCountPercentileHasBeenSet = true;
}
XmlNode metricsNode = resultNode.FirstChild("Metrics");
if(!metricsNode.IsNull())
{
XmlNode metricsMember = metricsNode.FirstChild("member");
while(!metricsMember.IsNull())
{
m_metrics.push_back(metricsMember);
metricsMember = metricsMember.NextNode("member");
}
m_metricsHasBeenSet = true;
}
XmlNode thresholdMetricIdNode = resultNode.FirstChild("ThresholdMetricId");
if(!thresholdMetricIdNode.IsNull())
{
m_thresholdMetricId = Aws::Utils::Xml::DecodeEscapedXmlText(thresholdMetricIdNode.GetText());
m_thresholdMetricIdHasBeenSet = true;
}
}
return *this;
}
void MetricAlarm::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_alarmNameHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmArnHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmArn=" << StringUtils::URLEncode(m_alarmArn.c_str()) << "&";
}
if(m_alarmDescriptionHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmDescription=" << StringUtils::URLEncode(m_alarmDescription.c_str()) << "&";
}
if(m_alarmConfigurationUpdatedTimestampHasBeenSet)
{
oStream << location << index << locationValue << ".AlarmConfigurationUpdatedTimestamp=" << StringUtils::URLEncode(m_alarmConfigurationUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_actionsEnabledHasBeenSet)
{
oStream << location << index << locationValue << ".ActionsEnabled=" << std::boolalpha << m_actionsEnabled << "&";
}
if(m_oKActionsHasBeenSet)
{
unsigned oKActionsIdx = 1;
for(auto& item : m_oKActions)
{
oStream << location << index << locationValue << ".OKActions.member." << oKActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_alarmActionsHasBeenSet)
{
unsigned alarmActionsIdx = 1;
for(auto& item : m_alarmActions)
{
oStream << location << index << locationValue << ".AlarmActions.member." << alarmActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_insufficientDataActionsHasBeenSet)
{
unsigned insufficientDataActionsIdx = 1;
for(auto& item : m_insufficientDataActions)
{
oStream << location << index << locationValue << ".InsufficientDataActions.member." << insufficientDataActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_stateValueHasBeenSet)
{
oStream << location << index << locationValue << ".StateValue=" << StateValueMapper::GetNameForStateValue(m_stateValue) << "&";
}
if(m_stateReasonHasBeenSet)
{
oStream << location << index << locationValue << ".StateReason=" << StringUtils::URLEncode(m_stateReason.c_str()) << "&";
}
if(m_stateReasonDataHasBeenSet)
{
oStream << location << index << locationValue << ".StateReasonData=" << StringUtils::URLEncode(m_stateReasonData.c_str()) << "&";
}
if(m_stateUpdatedTimestampHasBeenSet)
{
oStream << location << index << locationValue << ".StateUpdatedTimestamp=" << StringUtils::URLEncode(m_stateUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
oStream << location << index << locationValue << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_namespaceHasBeenSet)
{
oStream << location << index << locationValue << ".Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_statisticHasBeenSet)
{
oStream << location << index << locationValue << ".Statistic=" << StatisticMapper::GetNameForStatistic(m_statistic) << "&";
}
if(m_extendedStatisticHasBeenSet)
{
oStream << location << index << locationValue << ".ExtendedStatistic=" << StringUtils::URLEncode(m_extendedStatistic.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << index << locationValue << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
if(m_periodHasBeenSet)
{
oStream << location << index << locationValue << ".Period=" << m_period << "&";
}
if(m_unitHasBeenSet)
{
oStream << location << index << locationValue << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_evaluationPeriodsHasBeenSet)
{
oStream << location << index << locationValue << ".EvaluationPeriods=" << m_evaluationPeriods << "&";
}
if(m_datapointsToAlarmHasBeenSet)
{
oStream << location << index << locationValue << ".DatapointsToAlarm=" << m_datapointsToAlarm << "&";
}
if(m_thresholdHasBeenSet)
{
oStream << location << index << locationValue << ".Threshold=" << StringUtils::URLEncode(m_threshold) << "&";
}
if(m_comparisonOperatorHasBeenSet)
{
oStream << location << index << locationValue << ".ComparisonOperator=" << ComparisonOperatorMapper::GetNameForComparisonOperator(m_comparisonOperator) << "&";
}
if(m_treatMissingDataHasBeenSet)
{
oStream << location << index << locationValue << ".TreatMissingData=" << StringUtils::URLEncode(m_treatMissingData.c_str()) << "&";
}
if(m_evaluateLowSampleCountPercentileHasBeenSet)
{
oStream << location << index << locationValue << ".EvaluateLowSampleCountPercentile=" << StringUtils::URLEncode(m_evaluateLowSampleCountPercentile.c_str()) << "&";
}
if(m_metricsHasBeenSet)
{
unsigned metricsIdx = 1;
for(auto& item : m_metrics)
{
Aws::StringStream metricsSs;
metricsSs << location << index << locationValue << ".Metrics.member." << metricsIdx++;
item.OutputToStream(oStream, metricsSs.str().c_str());
}
}
if(m_thresholdMetricIdHasBeenSet)
{
oStream << location << index << locationValue << ".ThresholdMetricId=" << StringUtils::URLEncode(m_thresholdMetricId.c_str()) << "&";
}
}
void MetricAlarm::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_alarmNameHasBeenSet)
{
oStream << location << ".AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmArnHasBeenSet)
{
oStream << location << ".AlarmArn=" << StringUtils::URLEncode(m_alarmArn.c_str()) << "&";
}
if(m_alarmDescriptionHasBeenSet)
{
oStream << location << ".AlarmDescription=" << StringUtils::URLEncode(m_alarmDescription.c_str()) << "&";
}
if(m_alarmConfigurationUpdatedTimestampHasBeenSet)
{
oStream << location << ".AlarmConfigurationUpdatedTimestamp=" << StringUtils::URLEncode(m_alarmConfigurationUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_actionsEnabledHasBeenSet)
{
oStream << location << ".ActionsEnabled=" << std::boolalpha << m_actionsEnabled << "&";
}
if(m_oKActionsHasBeenSet)
{
unsigned oKActionsIdx = 1;
for(auto& item : m_oKActions)
{
oStream << location << ".OKActions.member." << oKActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_alarmActionsHasBeenSet)
{
unsigned alarmActionsIdx = 1;
for(auto& item : m_alarmActions)
{
oStream << location << ".AlarmActions.member." << alarmActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_insufficientDataActionsHasBeenSet)
{
unsigned insufficientDataActionsIdx = 1;
for(auto& item : m_insufficientDataActions)
{
oStream << location << ".InsufficientDataActions.member." << insufficientDataActionsIdx++ << "=" << StringUtils::URLEncode(item.c_str()) << "&";
}
}
if(m_stateValueHasBeenSet)
{
oStream << location << ".StateValue=" << StateValueMapper::GetNameForStateValue(m_stateValue) << "&";
}
if(m_stateReasonHasBeenSet)
{
oStream << location << ".StateReason=" << StringUtils::URLEncode(m_stateReason.c_str()) << "&";
}
if(m_stateReasonDataHasBeenSet)
{
oStream << location << ".StateReasonData=" << StringUtils::URLEncode(m_stateReasonData.c_str()) << "&";
}
if(m_stateUpdatedTimestampHasBeenSet)
{
oStream << location << ".StateUpdatedTimestamp=" << StringUtils::URLEncode(m_stateUpdatedTimestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
oStream << location << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_namespaceHasBeenSet)
{
oStream << location << ".Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_statisticHasBeenSet)
{
oStream << location << ".Statistic=" << StatisticMapper::GetNameForStatistic(m_statistic) << "&";
}
if(m_extendedStatisticHasBeenSet)
{
oStream << location << ".ExtendedStatistic=" << StringUtils::URLEncode(m_extendedStatistic.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
if(m_periodHasBeenSet)
{
oStream << location << ".Period=" << m_period << "&";
}
if(m_unitHasBeenSet)
{
oStream << location << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_evaluationPeriodsHasBeenSet)
{
oStream << location << ".EvaluationPeriods=" << m_evaluationPeriods << "&";
}
if(m_datapointsToAlarmHasBeenSet)
{
oStream << location << ".DatapointsToAlarm=" << m_datapointsToAlarm << "&";
}
if(m_thresholdHasBeenSet)
{
oStream << location << ".Threshold=" << StringUtils::URLEncode(m_threshold) << "&";
}
if(m_comparisonOperatorHasBeenSet)
{
oStream << location << ".ComparisonOperator=" << ComparisonOperatorMapper::GetNameForComparisonOperator(m_comparisonOperator) << "&";
}
if(m_treatMissingDataHasBeenSet)
{
oStream << location << ".TreatMissingData=" << StringUtils::URLEncode(m_treatMissingData.c_str()) << "&";
}
if(m_evaluateLowSampleCountPercentileHasBeenSet)
{
oStream << location << ".EvaluateLowSampleCountPercentile=" << StringUtils::URLEncode(m_evaluateLowSampleCountPercentile.c_str()) << "&";
}
if(m_metricsHasBeenSet)
{
unsigned metricsIdx = 1;
for(auto& item : m_metrics)
{
Aws::StringStream metricsSs;
metricsSs << location << ".Metrics.member." << metricsIdx++;
item.OutputToStream(oStream, metricsSs.str().c_str());
}
}
if(m_thresholdMetricIdHasBeenSet)
{
oStream << location << ".ThresholdMetricId=" << StringUtils::URLEncode(m_thresholdMetricId.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,163 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/MetricDataQuery.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
{
MetricDataQuery::MetricDataQuery() :
m_idHasBeenSet(false),
m_metricStatHasBeenSet(false),
m_expressionHasBeenSet(false),
m_labelHasBeenSet(false),
m_returnData(false),
m_returnDataHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false)
{
}
MetricDataQuery::MetricDataQuery(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_metricStatHasBeenSet(false),
m_expressionHasBeenSet(false),
m_labelHasBeenSet(false),
m_returnData(false),
m_returnDataHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false)
{
*this = xmlNode;
}
MetricDataQuery& MetricDataQuery::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 metricStatNode = resultNode.FirstChild("MetricStat");
if(!metricStatNode.IsNull())
{
m_metricStat = metricStatNode;
m_metricStatHasBeenSet = true;
}
XmlNode expressionNode = resultNode.FirstChild("Expression");
if(!expressionNode.IsNull())
{
m_expression = Aws::Utils::Xml::DecodeEscapedXmlText(expressionNode.GetText());
m_expressionHasBeenSet = true;
}
XmlNode labelNode = resultNode.FirstChild("Label");
if(!labelNode.IsNull())
{
m_label = Aws::Utils::Xml::DecodeEscapedXmlText(labelNode.GetText());
m_labelHasBeenSet = true;
}
XmlNode returnDataNode = resultNode.FirstChild("ReturnData");
if(!returnDataNode.IsNull())
{
m_returnData = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(returnDataNode.GetText()).c_str()).c_str());
m_returnDataHasBeenSet = true;
}
XmlNode periodNode = resultNode.FirstChild("Period");
if(!periodNode.IsNull())
{
m_period = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(periodNode.GetText()).c_str()).c_str());
m_periodHasBeenSet = true;
}
}
return *this;
}
void MetricDataQuery::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_metricStatHasBeenSet)
{
Aws::StringStream metricStatLocationAndMemberSs;
metricStatLocationAndMemberSs << location << index << locationValue << ".MetricStat";
m_metricStat.OutputToStream(oStream, metricStatLocationAndMemberSs.str().c_str());
}
if(m_expressionHasBeenSet)
{
oStream << location << index << locationValue << ".Expression=" << StringUtils::URLEncode(m_expression.c_str()) << "&";
}
if(m_labelHasBeenSet)
{
oStream << location << index << locationValue << ".Label=" << StringUtils::URLEncode(m_label.c_str()) << "&";
}
if(m_returnDataHasBeenSet)
{
oStream << location << index << locationValue << ".ReturnData=" << std::boolalpha << m_returnData << "&";
}
if(m_periodHasBeenSet)
{
oStream << location << index << locationValue << ".Period=" << m_period << "&";
}
}
void MetricDataQuery::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_idHasBeenSet)
{
oStream << location << ".Id=" << StringUtils::URLEncode(m_id.c_str()) << "&";
}
if(m_metricStatHasBeenSet)
{
Aws::String metricStatLocationAndMember(location);
metricStatLocationAndMember += ".MetricStat";
m_metricStat.OutputToStream(oStream, metricStatLocationAndMember.c_str());
}
if(m_expressionHasBeenSet)
{
oStream << location << ".Expression=" << StringUtils::URLEncode(m_expression.c_str()) << "&";
}
if(m_labelHasBeenSet)
{
oStream << location << ".Label=" << StringUtils::URLEncode(m_label.c_str()) << "&";
}
if(m_returnDataHasBeenSet)
{
oStream << location << ".ReturnData=" << std::boolalpha << m_returnData << "&";
}
if(m_periodHasBeenSet)
{
oStream << location << ".Period=" << m_period << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,203 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/MetricDataResult.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
{
MetricDataResult::MetricDataResult() :
m_idHasBeenSet(false),
m_labelHasBeenSet(false),
m_timestampsHasBeenSet(false),
m_valuesHasBeenSet(false),
m_statusCode(StatusCode::NOT_SET),
m_statusCodeHasBeenSet(false),
m_messagesHasBeenSet(false)
{
}
MetricDataResult::MetricDataResult(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_labelHasBeenSet(false),
m_timestampsHasBeenSet(false),
m_valuesHasBeenSet(false),
m_statusCode(StatusCode::NOT_SET),
m_statusCodeHasBeenSet(false),
m_messagesHasBeenSet(false)
{
*this = xmlNode;
}
MetricDataResult& MetricDataResult::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 labelNode = resultNode.FirstChild("Label");
if(!labelNode.IsNull())
{
m_label = Aws::Utils::Xml::DecodeEscapedXmlText(labelNode.GetText());
m_labelHasBeenSet = true;
}
XmlNode timestampsNode = resultNode.FirstChild("Timestamps");
if(!timestampsNode.IsNull())
{
XmlNode timestampsMember = timestampsNode.FirstChild("member");
while(!timestampsMember.IsNull())
{
m_timestamps.push_back(DateTime(StringUtils::Trim(timestampsMember.GetText().c_str()).c_str(), DateFormat::ISO_8601));
timestampsMember = timestampsMember.NextNode("member");
}
m_timestampsHasBeenSet = true;
}
XmlNode valuesNode = resultNode.FirstChild("Values");
if(!valuesNode.IsNull())
{
XmlNode valuesMember = valuesNode.FirstChild("member");
while(!valuesMember.IsNull())
{
m_values.push_back(StringUtils::ConvertToDouble(StringUtils::Trim(valuesMember.GetText().c_str()).c_str()));
valuesMember = valuesMember.NextNode("member");
}
m_valuesHasBeenSet = true;
}
XmlNode statusCodeNode = resultNode.FirstChild("StatusCode");
if(!statusCodeNode.IsNull())
{
m_statusCode = StatusCodeMapper::GetStatusCodeForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(statusCodeNode.GetText()).c_str()).c_str());
m_statusCodeHasBeenSet = true;
}
XmlNode messagesNode = resultNode.FirstChild("Messages");
if(!messagesNode.IsNull())
{
XmlNode messagesMember = messagesNode.FirstChild("member");
while(!messagesMember.IsNull())
{
m_messages.push_back(messagesMember);
messagesMember = messagesMember.NextNode("member");
}
m_messagesHasBeenSet = true;
}
}
return *this;
}
void MetricDataResult::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_labelHasBeenSet)
{
oStream << location << index << locationValue << ".Label=" << StringUtils::URLEncode(m_label.c_str()) << "&";
}
if(m_timestampsHasBeenSet)
{
unsigned timestampsIdx = 1;
for(auto& item : m_timestamps)
{
oStream << location << index << locationValue << ".Timestamps.member." << timestampsIdx++ << "=" << StringUtils::URLEncode(item.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
}
if(m_valuesHasBeenSet)
{
unsigned valuesIdx = 1;
for(auto& item : m_values)
{
oStream << location << index << locationValue << ".Values.member." << valuesIdx++ << "=" << StringUtils::URLEncode(item) << "&";
}
}
if(m_statusCodeHasBeenSet)
{
oStream << location << index << locationValue << ".StatusCode=" << StatusCodeMapper::GetNameForStatusCode(m_statusCode) << "&";
}
if(m_messagesHasBeenSet)
{
unsigned messagesIdx = 1;
for(auto& item : m_messages)
{
Aws::StringStream messagesSs;
messagesSs << location << index << locationValue << ".Messages.member." << messagesIdx++;
item.OutputToStream(oStream, messagesSs.str().c_str());
}
}
}
void MetricDataResult::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_idHasBeenSet)
{
oStream << location << ".Id=" << StringUtils::URLEncode(m_id.c_str()) << "&";
}
if(m_labelHasBeenSet)
{
oStream << location << ".Label=" << StringUtils::URLEncode(m_label.c_str()) << "&";
}
if(m_timestampsHasBeenSet)
{
unsigned timestampsIdx = 1;
for(auto& item : m_timestamps)
{
oStream << location << ".Timestamps.member." << timestampsIdx++ << "=" << StringUtils::URLEncode(item.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
}
if(m_valuesHasBeenSet)
{
unsigned valuesIdx = 1;
for(auto& item : m_values)
{
oStream << location << ".Values.member." << valuesIdx++ << "=" << StringUtils::URLEncode(item) << "&";
}
}
if(m_statusCodeHasBeenSet)
{
oStream << location << ".StatusCode=" << StatusCodeMapper::GetNameForStatusCode(m_statusCode) << "&";
}
if(m_messagesHasBeenSet)
{
unsigned messagesIdx = 1;
for(auto& item : m_messages)
{
Aws::StringStream messagesSs;
messagesSs << location << ".Messages.member." << messagesIdx++;
item.OutputToStream(oStream, messagesSs.str().c_str());
}
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,262 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/MetricDatum.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
{
MetricDatum::MetricDatum() :
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_timestampHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false),
m_statisticValuesHasBeenSet(false),
m_valuesHasBeenSet(false),
m_countsHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_storageResolution(0),
m_storageResolutionHasBeenSet(false)
{
}
MetricDatum::MetricDatum(const XmlNode& xmlNode) :
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_timestampHasBeenSet(false),
m_value(0.0),
m_valueHasBeenSet(false),
m_statisticValuesHasBeenSet(false),
m_valuesHasBeenSet(false),
m_countsHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_storageResolution(0),
m_storageResolutionHasBeenSet(false)
{
*this = xmlNode;
}
MetricDatum& MetricDatum::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode metricNameNode = resultNode.FirstChild("MetricName");
if(!metricNameNode.IsNull())
{
m_metricName = Aws::Utils::Xml::DecodeEscapedXmlText(metricNameNode.GetText());
m_metricNameHasBeenSet = true;
}
XmlNode dimensionsNode = resultNode.FirstChild("Dimensions");
if(!dimensionsNode.IsNull())
{
XmlNode dimensionsMember = dimensionsNode.FirstChild("member");
while(!dimensionsMember.IsNull())
{
m_dimensions.push_back(dimensionsMember);
dimensionsMember = dimensionsMember.NextNode("member");
}
m_dimensionsHasBeenSet = true;
}
XmlNode timestampNode = resultNode.FirstChild("Timestamp");
if(!timestampNode.IsNull())
{
m_timestamp = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(timestampNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_timestampHasBeenSet = true;
}
XmlNode valueNode = resultNode.FirstChild("Value");
if(!valueNode.IsNull())
{
m_value = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText()).c_str()).c_str());
m_valueHasBeenSet = true;
}
XmlNode statisticValuesNode = resultNode.FirstChild("StatisticValues");
if(!statisticValuesNode.IsNull())
{
m_statisticValues = statisticValuesNode;
m_statisticValuesHasBeenSet = true;
}
XmlNode valuesNode = resultNode.FirstChild("Values");
if(!valuesNode.IsNull())
{
XmlNode valuesMember = valuesNode.FirstChild("member");
while(!valuesMember.IsNull())
{
m_values.push_back(StringUtils::ConvertToDouble(StringUtils::Trim(valuesMember.GetText().c_str()).c_str()));
valuesMember = valuesMember.NextNode("member");
}
m_valuesHasBeenSet = true;
}
XmlNode countsNode = resultNode.FirstChild("Counts");
if(!countsNode.IsNull())
{
XmlNode countsMember = countsNode.FirstChild("member");
while(!countsMember.IsNull())
{
m_counts.push_back(StringUtils::ConvertToDouble(StringUtils::Trim(countsMember.GetText().c_str()).c_str()));
countsMember = countsMember.NextNode("member");
}
m_countsHasBeenSet = true;
}
XmlNode unitNode = resultNode.FirstChild("Unit");
if(!unitNode.IsNull())
{
m_unit = StandardUnitMapper::GetStandardUnitForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(unitNode.GetText()).c_str()).c_str());
m_unitHasBeenSet = true;
}
XmlNode storageResolutionNode = resultNode.FirstChild("StorageResolution");
if(!storageResolutionNode.IsNull())
{
m_storageResolution = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(storageResolutionNode.GetText()).c_str()).c_str());
m_storageResolutionHasBeenSet = true;
}
}
return *this;
}
void MetricDatum::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_metricNameHasBeenSet)
{
oStream << location << index << locationValue << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << index << locationValue << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
if(m_timestampHasBeenSet)
{
oStream << location << index << locationValue << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value) << "&";
}
if(m_statisticValuesHasBeenSet)
{
Aws::StringStream statisticValuesLocationAndMemberSs;
statisticValuesLocationAndMemberSs << location << index << locationValue << ".StatisticValues";
m_statisticValues.OutputToStream(oStream, statisticValuesLocationAndMemberSs.str().c_str());
}
if(m_valuesHasBeenSet)
{
unsigned valuesIdx = 1;
for(auto& item : m_values)
{
oStream << location << index << locationValue << ".Values.member." << valuesIdx++ << "=" << StringUtils::URLEncode(item) << "&";
}
}
if(m_countsHasBeenSet)
{
unsigned countsIdx = 1;
for(auto& item : m_counts)
{
oStream << location << index << locationValue << ".Counts.member." << countsIdx++ << "=" << StringUtils::URLEncode(item) << "&";
}
}
if(m_unitHasBeenSet)
{
oStream << location << index << locationValue << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_storageResolutionHasBeenSet)
{
oStream << location << index << locationValue << ".StorageResolution=" << m_storageResolution << "&";
}
}
void MetricDatum::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_metricNameHasBeenSet)
{
oStream << location << ".MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsIdx = 1;
for(auto& item : m_dimensions)
{
Aws::StringStream dimensionsSs;
dimensionsSs << location << ".Dimensions.member." << dimensionsIdx++;
item.OutputToStream(oStream, dimensionsSs.str().c_str());
}
}
if(m_timestampHasBeenSet)
{
oStream << location << ".Timestamp=" << StringUtils::URLEncode(m_timestamp.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << ".Value=" << StringUtils::URLEncode(m_value) << "&";
}
if(m_statisticValuesHasBeenSet)
{
Aws::String statisticValuesLocationAndMember(location);
statisticValuesLocationAndMember += ".StatisticValues";
m_statisticValues.OutputToStream(oStream, statisticValuesLocationAndMember.c_str());
}
if(m_valuesHasBeenSet)
{
unsigned valuesIdx = 1;
for(auto& item : m_values)
{
oStream << location << ".Values.member." << valuesIdx++ << "=" << StringUtils::URLEncode(item) << "&";
}
}
if(m_countsHasBeenSet)
{
unsigned countsIdx = 1;
for(auto& item : m_counts)
{
oStream << location << ".Counts.member." << countsIdx++ << "=" << StringUtils::URLEncode(item) << "&";
}
}
if(m_unitHasBeenSet)
{
oStream << location << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_storageResolutionHasBeenSet)
{
oStream << location << ".StorageResolution=" << m_storageResolution << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/MetricStat.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
{
MetricStat::MetricStat() :
m_metricHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_statHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false)
{
}
MetricStat::MetricStat(const XmlNode& xmlNode) :
m_metricHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_statHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false)
{
*this = xmlNode;
}
MetricStat& MetricStat::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode metricNode = resultNode.FirstChild("Metric");
if(!metricNode.IsNull())
{
m_metric = metricNode;
m_metricHasBeenSet = true;
}
XmlNode periodNode = resultNode.FirstChild("Period");
if(!periodNode.IsNull())
{
m_period = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(periodNode.GetText()).c_str()).c_str());
m_periodHasBeenSet = true;
}
XmlNode statNode = resultNode.FirstChild("Stat");
if(!statNode.IsNull())
{
m_stat = Aws::Utils::Xml::DecodeEscapedXmlText(statNode.GetText());
m_statHasBeenSet = true;
}
XmlNode unitNode = resultNode.FirstChild("Unit");
if(!unitNode.IsNull())
{
m_unit = StandardUnitMapper::GetStandardUnitForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(unitNode.GetText()).c_str()).c_str());
m_unitHasBeenSet = true;
}
}
return *this;
}
void MetricStat::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_metricHasBeenSet)
{
Aws::StringStream metricLocationAndMemberSs;
metricLocationAndMemberSs << location << index << locationValue << ".Metric";
m_metric.OutputToStream(oStream, metricLocationAndMemberSs.str().c_str());
}
if(m_periodHasBeenSet)
{
oStream << location << index << locationValue << ".Period=" << m_period << "&";
}
if(m_statHasBeenSet)
{
oStream << location << index << locationValue << ".Stat=" << StringUtils::URLEncode(m_stat.c_str()) << "&";
}
if(m_unitHasBeenSet)
{
oStream << location << index << locationValue << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
}
void MetricStat::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_metricHasBeenSet)
{
Aws::String metricLocationAndMember(location);
metricLocationAndMember += ".Metric";
m_metric.OutputToStream(oStream, metricLocationAndMember.c_str());
}
if(m_periodHasBeenSet)
{
oStream << location << ".Period=" << m_period << "&";
}
if(m_statHasBeenSet)
{
oStream << location << ".Stat=" << StringUtils::URLEncode(m_stat.c_str()) << "&";
}
if(m_unitHasBeenSet)
{
oStream << location << ".Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,121 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PartialFailure.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
{
PartialFailure::PartialFailure() :
m_failureResourceHasBeenSet(false),
m_exceptionTypeHasBeenSet(false),
m_failureCodeHasBeenSet(false),
m_failureDescriptionHasBeenSet(false)
{
}
PartialFailure::PartialFailure(const XmlNode& xmlNode) :
m_failureResourceHasBeenSet(false),
m_exceptionTypeHasBeenSet(false),
m_failureCodeHasBeenSet(false),
m_failureDescriptionHasBeenSet(false)
{
*this = xmlNode;
}
PartialFailure& PartialFailure::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode failureResourceNode = resultNode.FirstChild("FailureResource");
if(!failureResourceNode.IsNull())
{
m_failureResource = Aws::Utils::Xml::DecodeEscapedXmlText(failureResourceNode.GetText());
m_failureResourceHasBeenSet = true;
}
XmlNode exceptionTypeNode = resultNode.FirstChild("ExceptionType");
if(!exceptionTypeNode.IsNull())
{
m_exceptionType = Aws::Utils::Xml::DecodeEscapedXmlText(exceptionTypeNode.GetText());
m_exceptionTypeHasBeenSet = true;
}
XmlNode failureCodeNode = resultNode.FirstChild("FailureCode");
if(!failureCodeNode.IsNull())
{
m_failureCode = Aws::Utils::Xml::DecodeEscapedXmlText(failureCodeNode.GetText());
m_failureCodeHasBeenSet = true;
}
XmlNode failureDescriptionNode = resultNode.FirstChild("FailureDescription");
if(!failureDescriptionNode.IsNull())
{
m_failureDescription = Aws::Utils::Xml::DecodeEscapedXmlText(failureDescriptionNode.GetText());
m_failureDescriptionHasBeenSet = true;
}
}
return *this;
}
void PartialFailure::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_failureResourceHasBeenSet)
{
oStream << location << index << locationValue << ".FailureResource=" << StringUtils::URLEncode(m_failureResource.c_str()) << "&";
}
if(m_exceptionTypeHasBeenSet)
{
oStream << location << index << locationValue << ".ExceptionType=" << StringUtils::URLEncode(m_exceptionType.c_str()) << "&";
}
if(m_failureCodeHasBeenSet)
{
oStream << location << index << locationValue << ".FailureCode=" << StringUtils::URLEncode(m_failureCode.c_str()) << "&";
}
if(m_failureDescriptionHasBeenSet)
{
oStream << location << index << locationValue << ".FailureDescription=" << StringUtils::URLEncode(m_failureDescription.c_str()) << "&";
}
}
void PartialFailure::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_failureResourceHasBeenSet)
{
oStream << location << ".FailureResource=" << StringUtils::URLEncode(m_failureResource.c_str()) << "&";
}
if(m_exceptionTypeHasBeenSet)
{
oStream << location << ".ExceptionType=" << StringUtils::URLEncode(m_exceptionType.c_str()) << "&";
}
if(m_failureCodeHasBeenSet)
{
oStream << location << ".FailureCode=" << StringUtils::URLEncode(m_failureCode.c_str()) << "&";
}
if(m_failureDescriptionHasBeenSet)
{
oStream << location << ".FailureDescription=" << StringUtils::URLEncode(m_failureDescription.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutAnomalyDetectorRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
PutAnomalyDetectorRequest::PutAnomalyDetectorRequest() :
m_namespaceHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_statHasBeenSet(false),
m_configurationHasBeenSet(false)
{
}
Aws::String PutAnomalyDetectorRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=PutAnomalyDetector&";
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
if(m_statHasBeenSet)
{
ss << "Stat=" << StringUtils::URLEncode(m_stat.c_str()) << "&";
}
if(m_configurationHasBeenSet)
{
m_configuration.OutputToStream(ss, "Configuration");
}
ss << "Version=2010-08-01";
return ss.str();
}
void PutAnomalyDetectorRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutAnomalyDetectorResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
PutAnomalyDetectorResult::PutAnomalyDetectorResult()
{
}
PutAnomalyDetectorResult::PutAnomalyDetectorResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
PutAnomalyDetectorResult& PutAnomalyDetectorResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "PutAnomalyDetectorResult"))
{
resultNode = rootNode.FirstChild("PutAnomalyDetectorResult");
}
if(!resultNode.IsNull())
{
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::PutAnomalyDetectorResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,101 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutCompositeAlarmRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
PutCompositeAlarmRequest::PutCompositeAlarmRequest() :
m_actionsEnabled(false),
m_actionsEnabledHasBeenSet(false),
m_alarmActionsHasBeenSet(false),
m_alarmDescriptionHasBeenSet(false),
m_alarmNameHasBeenSet(false),
m_alarmRuleHasBeenSet(false),
m_insufficientDataActionsHasBeenSet(false),
m_oKActionsHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String PutCompositeAlarmRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=PutCompositeAlarm&";
if(m_actionsEnabledHasBeenSet)
{
ss << "ActionsEnabled=" << std::boolalpha << m_actionsEnabled << "&";
}
if(m_alarmActionsHasBeenSet)
{
unsigned alarmActionsCount = 1;
for(auto& item : m_alarmActions)
{
ss << "AlarmActions.member." << alarmActionsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
alarmActionsCount++;
}
}
if(m_alarmDescriptionHasBeenSet)
{
ss << "AlarmDescription=" << StringUtils::URLEncode(m_alarmDescription.c_str()) << "&";
}
if(m_alarmNameHasBeenSet)
{
ss << "AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmRuleHasBeenSet)
{
ss << "AlarmRule=" << StringUtils::URLEncode(m_alarmRule.c_str()) << "&";
}
if(m_insufficientDataActionsHasBeenSet)
{
unsigned insufficientDataActionsCount = 1;
for(auto& item : m_insufficientDataActions)
{
ss << "InsufficientDataActions.member." << insufficientDataActionsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
insufficientDataActionsCount++;
}
}
if(m_oKActionsHasBeenSet)
{
unsigned oKActionsCount = 1;
for(auto& item : m_oKActions)
{
ss << "OKActions.member." << oKActionsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
oKActionsCount++;
}
}
if(m_tagsHasBeenSet)
{
unsigned tagsCount = 1;
for(auto& item : m_tags)
{
item.OutputToStream(ss, "Tags.member.", tagsCount, "");
tagsCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void PutCompositeAlarmRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutDashboardRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
PutDashboardRequest::PutDashboardRequest() :
m_dashboardNameHasBeenSet(false),
m_dashboardBodyHasBeenSet(false)
{
}
Aws::String PutDashboardRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=PutDashboard&";
if(m_dashboardNameHasBeenSet)
{
ss << "DashboardName=" << StringUtils::URLEncode(m_dashboardName.c_str()) << "&";
}
if(m_dashboardBodyHasBeenSet)
{
ss << "DashboardBody=" << StringUtils::URLEncode(m_dashboardBody.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void PutDashboardRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutDashboardResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
PutDashboardResult::PutDashboardResult()
{
}
PutDashboardResult::PutDashboardResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
PutDashboardResult& PutDashboardResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "PutDashboardResult"))
{
resultNode = rootNode.FirstChild("PutDashboardResult");
}
if(!resultNode.IsNull())
{
XmlNode dashboardValidationMessagesNode = resultNode.FirstChild("DashboardValidationMessages");
if(!dashboardValidationMessagesNode.IsNull())
{
XmlNode dashboardValidationMessagesMember = dashboardValidationMessagesNode.FirstChild("member");
while(!dashboardValidationMessagesMember.IsNull())
{
m_dashboardValidationMessages.push_back(dashboardValidationMessagesMember);
dashboardValidationMessagesMember = dashboardValidationMessagesMember.NextNode("member");
}
}
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::PutDashboardResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutInsightRuleRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
PutInsightRuleRequest::PutInsightRuleRequest() :
m_ruleNameHasBeenSet(false),
m_ruleStateHasBeenSet(false),
m_ruleDefinitionHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String PutInsightRuleRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=PutInsightRule&";
if(m_ruleNameHasBeenSet)
{
ss << "RuleName=" << StringUtils::URLEncode(m_ruleName.c_str()) << "&";
}
if(m_ruleStateHasBeenSet)
{
ss << "RuleState=" << StringUtils::URLEncode(m_ruleState.c_str()) << "&";
}
if(m_ruleDefinitionHasBeenSet)
{
ss << "RuleDefinition=" << StringUtils::URLEncode(m_ruleDefinition.c_str()) << "&";
}
if(m_tagsHasBeenSet)
{
unsigned tagsCount = 1;
for(auto& item : m_tags)
{
item.OutputToStream(ss, "Tags.member.", tagsCount, "");
tagsCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void PutInsightRuleRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutInsightRuleResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
PutInsightRuleResult::PutInsightRuleResult()
{
}
PutInsightRuleResult::PutInsightRuleResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
PutInsightRuleResult& PutInsightRuleResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "PutInsightRuleResult"))
{
resultNode = rootNode.FirstChild("PutInsightRuleResult");
}
if(!resultNode.IsNull())
{
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::PutInsightRuleResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,202 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutMetricAlarmRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
PutMetricAlarmRequest::PutMetricAlarmRequest() :
m_alarmNameHasBeenSet(false),
m_alarmDescriptionHasBeenSet(false),
m_actionsEnabled(false),
m_actionsEnabledHasBeenSet(false),
m_oKActionsHasBeenSet(false),
m_alarmActionsHasBeenSet(false),
m_insufficientDataActionsHasBeenSet(false),
m_metricNameHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_statistic(Statistic::NOT_SET),
m_statisticHasBeenSet(false),
m_extendedStatisticHasBeenSet(false),
m_dimensionsHasBeenSet(false),
m_period(0),
m_periodHasBeenSet(false),
m_unit(StandardUnit::NOT_SET),
m_unitHasBeenSet(false),
m_evaluationPeriods(0),
m_evaluationPeriodsHasBeenSet(false),
m_datapointsToAlarm(0),
m_datapointsToAlarmHasBeenSet(false),
m_threshold(0.0),
m_thresholdHasBeenSet(false),
m_comparisonOperator(ComparisonOperator::NOT_SET),
m_comparisonOperatorHasBeenSet(false),
m_treatMissingDataHasBeenSet(false),
m_evaluateLowSampleCountPercentileHasBeenSet(false),
m_metricsHasBeenSet(false),
m_tagsHasBeenSet(false),
m_thresholdMetricIdHasBeenSet(false)
{
}
Aws::String PutMetricAlarmRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=PutMetricAlarm&";
if(m_alarmNameHasBeenSet)
{
ss << "AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_alarmDescriptionHasBeenSet)
{
ss << "AlarmDescription=" << StringUtils::URLEncode(m_alarmDescription.c_str()) << "&";
}
if(m_actionsEnabledHasBeenSet)
{
ss << "ActionsEnabled=" << std::boolalpha << m_actionsEnabled << "&";
}
if(m_oKActionsHasBeenSet)
{
unsigned oKActionsCount = 1;
for(auto& item : m_oKActions)
{
ss << "OKActions.member." << oKActionsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
oKActionsCount++;
}
}
if(m_alarmActionsHasBeenSet)
{
unsigned alarmActionsCount = 1;
for(auto& item : m_alarmActions)
{
ss << "AlarmActions.member." << alarmActionsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
alarmActionsCount++;
}
}
if(m_insufficientDataActionsHasBeenSet)
{
unsigned insufficientDataActionsCount = 1;
for(auto& item : m_insufficientDataActions)
{
ss << "InsufficientDataActions.member." << insufficientDataActionsCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
insufficientDataActionsCount++;
}
}
if(m_metricNameHasBeenSet)
{
ss << "MetricName=" << StringUtils::URLEncode(m_metricName.c_str()) << "&";
}
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_statisticHasBeenSet)
{
ss << "Statistic=" << StatisticMapper::GetNameForStatistic(m_statistic) << "&";
}
if(m_extendedStatisticHasBeenSet)
{
ss << "ExtendedStatistic=" << StringUtils::URLEncode(m_extendedStatistic.c_str()) << "&";
}
if(m_dimensionsHasBeenSet)
{
unsigned dimensionsCount = 1;
for(auto& item : m_dimensions)
{
item.OutputToStream(ss, "Dimensions.member.", dimensionsCount, "");
dimensionsCount++;
}
}
if(m_periodHasBeenSet)
{
ss << "Period=" << m_period << "&";
}
if(m_unitHasBeenSet)
{
ss << "Unit=" << StandardUnitMapper::GetNameForStandardUnit(m_unit) << "&";
}
if(m_evaluationPeriodsHasBeenSet)
{
ss << "EvaluationPeriods=" << m_evaluationPeriods << "&";
}
if(m_datapointsToAlarmHasBeenSet)
{
ss << "DatapointsToAlarm=" << m_datapointsToAlarm << "&";
}
if(m_thresholdHasBeenSet)
{
ss << "Threshold=" << StringUtils::URLEncode(m_threshold) << "&";
}
if(m_comparisonOperatorHasBeenSet)
{
ss << "ComparisonOperator=" << ComparisonOperatorMapper::GetNameForComparisonOperator(m_comparisonOperator) << "&";
}
if(m_treatMissingDataHasBeenSet)
{
ss << "TreatMissingData=" << StringUtils::URLEncode(m_treatMissingData.c_str()) << "&";
}
if(m_evaluateLowSampleCountPercentileHasBeenSet)
{
ss << "EvaluateLowSampleCountPercentile=" << StringUtils::URLEncode(m_evaluateLowSampleCountPercentile.c_str()) << "&";
}
if(m_metricsHasBeenSet)
{
unsigned metricsCount = 1;
for(auto& item : m_metrics)
{
item.OutputToStream(ss, "Metrics.member.", metricsCount, "");
metricsCount++;
}
}
if(m_tagsHasBeenSet)
{
unsigned tagsCount = 1;
for(auto& item : m_tags)
{
item.OutputToStream(ss, "Tags.member.", tagsCount, "");
tagsCount++;
}
}
if(m_thresholdMetricIdHasBeenSet)
{
ss << "ThresholdMetricId=" << StringUtils::URLEncode(m_thresholdMetricId.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void PutMetricAlarmRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/PutMetricDataRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
PutMetricDataRequest::PutMetricDataRequest() :
m_namespaceHasBeenSet(false),
m_metricDataHasBeenSet(false)
{
}
Aws::String PutMetricDataRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=PutMetricData&";
if(m_namespaceHasBeenSet)
{
ss << "Namespace=" << StringUtils::URLEncode(m_namespace.c_str()) << "&";
}
if(m_metricDataHasBeenSet)
{
unsigned metricDataCount = 1;
for(auto& item : m_metricData)
{
item.OutputToStream(ss, "MetricData.member.", metricDataCount, "");
metricDataCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void PutMetricDataRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/Range.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
{
Range::Range() :
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false)
{
}
Range::Range(const XmlNode& xmlNode) :
m_startTimeHasBeenSet(false),
m_endTimeHasBeenSet(false)
{
*this = xmlNode;
}
Range& Range::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode startTimeNode = resultNode.FirstChild("StartTime");
if(!startTimeNode.IsNull())
{
m_startTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(startTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_startTimeHasBeenSet = true;
}
XmlNode endTimeNode = resultNode.FirstChild("EndTime");
if(!endTimeNode.IsNull())
{
m_endTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(endTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_endTimeHasBeenSet = true;
}
}
return *this;
}
void Range::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_startTimeHasBeenSet)
{
oStream << location << index << locationValue << ".StartTime=" << StringUtils::URLEncode(m_startTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_endTimeHasBeenSet)
{
oStream << location << index << locationValue << ".EndTime=" << StringUtils::URLEncode(m_endTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
}
void Range::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_startTimeHasBeenSet)
{
oStream << location << ".StartTime=" << StringUtils::URLEncode(m_startTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
if(m_endTimeHasBeenSet)
{
oStream << location << ".EndTime=" << StringUtils::URLEncode(m_endTime.ToGmtString(DateFormat::ISO_8601).c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/RecentlyActive.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace RecentlyActiveMapper
{
static const int PT3H_HASH = HashingUtils::HashString("PT3H");
RecentlyActive GetRecentlyActiveForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == PT3H_HASH)
{
return RecentlyActive::PT3H;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<RecentlyActive>(hashCode);
}
return RecentlyActive::NOT_SET;
}
Aws::String GetNameForRecentlyActive(RecentlyActive enumValue)
{
switch(enumValue)
{
case RecentlyActive::PT3H:
return "PT3H";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace RecentlyActiveMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,87 @@
/**
* 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

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ResponseMetadata.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
{
ResponseMetadata::ResponseMetadata() :
m_requestIdHasBeenSet(false)
{
}
ResponseMetadata::ResponseMetadata(const XmlNode& xmlNode) :
m_requestIdHasBeenSet(false)
{
*this = xmlNode;
}
ResponseMetadata& ResponseMetadata::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode requestIdNode = resultNode.FirstChild("RequestId");
if(!requestIdNode.IsNull())
{
m_requestId = Aws::Utils::Xml::DecodeEscapedXmlText(requestIdNode.GetText());
m_requestIdHasBeenSet = true;
}
}
return *this;
}
void ResponseMetadata::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_requestIdHasBeenSet)
{
oStream << location << index << locationValue << ".RequestId=" << StringUtils::URLEncode(m_requestId.c_str()) << "&";
}
}
void ResponseMetadata::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_requestIdHasBeenSet)
{
oStream << location << ".RequestId=" << StringUtils::URLEncode(m_requestId.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/ScanBy.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace ScanByMapper
{
static const int TimestampDescending_HASH = HashingUtils::HashString("TimestampDescending");
static const int TimestampAscending_HASH = HashingUtils::HashString("TimestampAscending");
ScanBy GetScanByForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == TimestampDescending_HASH)
{
return ScanBy::TimestampDescending;
}
else if (hashCode == TimestampAscending_HASH)
{
return ScanBy::TimestampAscending;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ScanBy>(hashCode);
}
return ScanBy::NOT_SET;
}
Aws::String GetNameForScanBy(ScanBy enumValue)
{
switch(enumValue)
{
case ScanBy::TimestampDescending:
return "TimestampDescending";
case ScanBy::TimestampAscending:
return "TimestampAscending";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ScanByMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,54 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/SetAlarmStateRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
SetAlarmStateRequest::SetAlarmStateRequest() :
m_alarmNameHasBeenSet(false),
m_stateValue(StateValue::NOT_SET),
m_stateValueHasBeenSet(false),
m_stateReasonHasBeenSet(false),
m_stateReasonDataHasBeenSet(false)
{
}
Aws::String SetAlarmStateRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=SetAlarmState&";
if(m_alarmNameHasBeenSet)
{
ss << "AlarmName=" << StringUtils::URLEncode(m_alarmName.c_str()) << "&";
}
if(m_stateValueHasBeenSet)
{
ss << "StateValue=" << StateValueMapper::GetNameForStateValue(m_stateValue) << "&";
}
if(m_stateReasonHasBeenSet)
{
ss << "StateReason=" << StringUtils::URLEncode(m_stateReason.c_str()) << "&";
}
if(m_stateReasonDataHasBeenSet)
{
ss << "StateReasonData=" << StringUtils::URLEncode(m_stateReasonData.c_str()) << "&";
}
ss << "Version=2010-08-01";
return ss.str();
}
void SetAlarmStateRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,245 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/StandardUnit.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace StandardUnitMapper
{
static const int Seconds_HASH = HashingUtils::HashString("Seconds");
static const int Microseconds_HASH = HashingUtils::HashString("Microseconds");
static const int Milliseconds_HASH = HashingUtils::HashString("Milliseconds");
static const int Bytes_HASH = HashingUtils::HashString("Bytes");
static const int Kilobytes_HASH = HashingUtils::HashString("Kilobytes");
static const int Megabytes_HASH = HashingUtils::HashString("Megabytes");
static const int Gigabytes_HASH = HashingUtils::HashString("Gigabytes");
static const int Terabytes_HASH = HashingUtils::HashString("Terabytes");
static const int Bits_HASH = HashingUtils::HashString("Bits");
static const int Kilobits_HASH = HashingUtils::HashString("Kilobits");
static const int Megabits_HASH = HashingUtils::HashString("Megabits");
static const int Gigabits_HASH = HashingUtils::HashString("Gigabits");
static const int Terabits_HASH = HashingUtils::HashString("Terabits");
static const int Percent_HASH = HashingUtils::HashString("Percent");
static const int Count_HASH = HashingUtils::HashString("Count");
static const int Bytes_Second_HASH = HashingUtils::HashString("Bytes/Second");
static const int Kilobytes_Second_HASH = HashingUtils::HashString("Kilobytes/Second");
static const int Megabytes_Second_HASH = HashingUtils::HashString("Megabytes/Second");
static const int Gigabytes_Second_HASH = HashingUtils::HashString("Gigabytes/Second");
static const int Terabytes_Second_HASH = HashingUtils::HashString("Terabytes/Second");
static const int Bits_Second_HASH = HashingUtils::HashString("Bits/Second");
static const int Kilobits_Second_HASH = HashingUtils::HashString("Kilobits/Second");
static const int Megabits_Second_HASH = HashingUtils::HashString("Megabits/Second");
static const int Gigabits_Second_HASH = HashingUtils::HashString("Gigabits/Second");
static const int Terabits_Second_HASH = HashingUtils::HashString("Terabits/Second");
static const int Count_Second_HASH = HashingUtils::HashString("Count/Second");
static const int None_HASH = HashingUtils::HashString("None");
StandardUnit GetStandardUnitForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Seconds_HASH)
{
return StandardUnit::Seconds;
}
else if (hashCode == Microseconds_HASH)
{
return StandardUnit::Microseconds;
}
else if (hashCode == Milliseconds_HASH)
{
return StandardUnit::Milliseconds;
}
else if (hashCode == Bytes_HASH)
{
return StandardUnit::Bytes;
}
else if (hashCode == Kilobytes_HASH)
{
return StandardUnit::Kilobytes;
}
else if (hashCode == Megabytes_HASH)
{
return StandardUnit::Megabytes;
}
else if (hashCode == Gigabytes_HASH)
{
return StandardUnit::Gigabytes;
}
else if (hashCode == Terabytes_HASH)
{
return StandardUnit::Terabytes;
}
else if (hashCode == Bits_HASH)
{
return StandardUnit::Bits;
}
else if (hashCode == Kilobits_HASH)
{
return StandardUnit::Kilobits;
}
else if (hashCode == Megabits_HASH)
{
return StandardUnit::Megabits;
}
else if (hashCode == Gigabits_HASH)
{
return StandardUnit::Gigabits;
}
else if (hashCode == Terabits_HASH)
{
return StandardUnit::Terabits;
}
else if (hashCode == Percent_HASH)
{
return StandardUnit::Percent;
}
else if (hashCode == Count_HASH)
{
return StandardUnit::Count;
}
else if (hashCode == Bytes_Second_HASH)
{
return StandardUnit::Bytes_Second;
}
else if (hashCode == Kilobytes_Second_HASH)
{
return StandardUnit::Kilobytes_Second;
}
else if (hashCode == Megabytes_Second_HASH)
{
return StandardUnit::Megabytes_Second;
}
else if (hashCode == Gigabytes_Second_HASH)
{
return StandardUnit::Gigabytes_Second;
}
else if (hashCode == Terabytes_Second_HASH)
{
return StandardUnit::Terabytes_Second;
}
else if (hashCode == Bits_Second_HASH)
{
return StandardUnit::Bits_Second;
}
else if (hashCode == Kilobits_Second_HASH)
{
return StandardUnit::Kilobits_Second;
}
else if (hashCode == Megabits_Second_HASH)
{
return StandardUnit::Megabits_Second;
}
else if (hashCode == Gigabits_Second_HASH)
{
return StandardUnit::Gigabits_Second;
}
else if (hashCode == Terabits_Second_HASH)
{
return StandardUnit::Terabits_Second;
}
else if (hashCode == Count_Second_HASH)
{
return StandardUnit::Count_Second;
}
else if (hashCode == None_HASH)
{
return StandardUnit::None;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<StandardUnit>(hashCode);
}
return StandardUnit::NOT_SET;
}
Aws::String GetNameForStandardUnit(StandardUnit enumValue)
{
switch(enumValue)
{
case StandardUnit::Seconds:
return "Seconds";
case StandardUnit::Microseconds:
return "Microseconds";
case StandardUnit::Milliseconds:
return "Milliseconds";
case StandardUnit::Bytes:
return "Bytes";
case StandardUnit::Kilobytes:
return "Kilobytes";
case StandardUnit::Megabytes:
return "Megabytes";
case StandardUnit::Gigabytes:
return "Gigabytes";
case StandardUnit::Terabytes:
return "Terabytes";
case StandardUnit::Bits:
return "Bits";
case StandardUnit::Kilobits:
return "Kilobits";
case StandardUnit::Megabits:
return "Megabits";
case StandardUnit::Gigabits:
return "Gigabits";
case StandardUnit::Terabits:
return "Terabits";
case StandardUnit::Percent:
return "Percent";
case StandardUnit::Count:
return "Count";
case StandardUnit::Bytes_Second:
return "Bytes/Second";
case StandardUnit::Kilobytes_Second:
return "Kilobytes/Second";
case StandardUnit::Megabytes_Second:
return "Megabytes/Second";
case StandardUnit::Gigabytes_Second:
return "Gigabytes/Second";
case StandardUnit::Terabytes_Second:
return "Terabytes/Second";
case StandardUnit::Bits_Second:
return "Bits/Second";
case StandardUnit::Kilobits_Second:
return "Kilobits/Second";
case StandardUnit::Megabits_Second:
return "Megabits/Second";
case StandardUnit::Gigabits_Second:
return "Gigabits/Second";
case StandardUnit::Terabits_Second:
return "Terabits/Second";
case StandardUnit::Count_Second:
return "Count/Second";
case StandardUnit::None:
return "None";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StandardUnitMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/StateValue.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace StateValueMapper
{
static const int OK_HASH = HashingUtils::HashString("OK");
static const int ALARM_HASH = HashingUtils::HashString("ALARM");
static const int INSUFFICIENT_DATA_HASH = HashingUtils::HashString("INSUFFICIENT_DATA");
StateValue GetStateValueForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == OK_HASH)
{
return StateValue::OK;
}
else if (hashCode == ALARM_HASH)
{
return StateValue::ALARM;
}
else if (hashCode == INSUFFICIENT_DATA_HASH)
{
return StateValue::INSUFFICIENT_DATA;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<StateValue>(hashCode);
}
return StateValue::NOT_SET;
}
Aws::String GetNameForStateValue(StateValue enumValue)
{
switch(enumValue)
{
case StateValue::OK:
return "OK";
case StateValue::ALARM:
return "ALARM";
case StateValue::INSUFFICIENT_DATA:
return "INSUFFICIENT_DATA";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StateValueMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/Statistic.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace StatisticMapper
{
static const int SampleCount_HASH = HashingUtils::HashString("SampleCount");
static const int Average_HASH = HashingUtils::HashString("Average");
static const int Sum_HASH = HashingUtils::HashString("Sum");
static const int Minimum_HASH = HashingUtils::HashString("Minimum");
static const int Maximum_HASH = HashingUtils::HashString("Maximum");
Statistic GetStatisticForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SampleCount_HASH)
{
return Statistic::SampleCount;
}
else if (hashCode == Average_HASH)
{
return Statistic::Average;
}
else if (hashCode == Sum_HASH)
{
return Statistic::Sum;
}
else if (hashCode == Minimum_HASH)
{
return Statistic::Minimum;
}
else if (hashCode == Maximum_HASH)
{
return Statistic::Maximum;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Statistic>(hashCode);
}
return Statistic::NOT_SET;
}
Aws::String GetNameForStatistic(Statistic enumValue)
{
switch(enumValue)
{
case Statistic::SampleCount:
return "SampleCount";
case Statistic::Average:
return "Average";
case Statistic::Sum:
return "Sum";
case Statistic::Minimum:
return "Minimum";
case Statistic::Maximum:
return "Maximum";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StatisticMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/StatisticSet.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
{
StatisticSet::StatisticSet() :
m_sampleCount(0.0),
m_sampleCountHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_minimum(0.0),
m_minimumHasBeenSet(false),
m_maximum(0.0),
m_maximumHasBeenSet(false)
{
}
StatisticSet::StatisticSet(const XmlNode& xmlNode) :
m_sampleCount(0.0),
m_sampleCountHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_minimum(0.0),
m_minimumHasBeenSet(false),
m_maximum(0.0),
m_maximumHasBeenSet(false)
{
*this = xmlNode;
}
StatisticSet& StatisticSet::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode sampleCountNode = resultNode.FirstChild("SampleCount");
if(!sampleCountNode.IsNull())
{
m_sampleCount = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sampleCountNode.GetText()).c_str()).c_str());
m_sampleCountHasBeenSet = true;
}
XmlNode sumNode = resultNode.FirstChild("Sum");
if(!sumNode.IsNull())
{
m_sum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(sumNode.GetText()).c_str()).c_str());
m_sumHasBeenSet = true;
}
XmlNode minimumNode = resultNode.FirstChild("Minimum");
if(!minimumNode.IsNull())
{
m_minimum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(minimumNode.GetText()).c_str()).c_str());
m_minimumHasBeenSet = true;
}
XmlNode maximumNode = resultNode.FirstChild("Maximum");
if(!maximumNode.IsNull())
{
m_maximum = StringUtils::ConvertToDouble(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maximumNode.GetText()).c_str()).c_str());
m_maximumHasBeenSet = true;
}
}
return *this;
}
void StatisticSet::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_sampleCountHasBeenSet)
{
oStream << location << index << locationValue << ".SampleCount=" << StringUtils::URLEncode(m_sampleCount) << "&";
}
if(m_sumHasBeenSet)
{
oStream << location << index << locationValue << ".Sum=" << StringUtils::URLEncode(m_sum) << "&";
}
if(m_minimumHasBeenSet)
{
oStream << location << index << locationValue << ".Minimum=" << StringUtils::URLEncode(m_minimum) << "&";
}
if(m_maximumHasBeenSet)
{
oStream << location << index << locationValue << ".Maximum=" << StringUtils::URLEncode(m_maximum) << "&";
}
}
void StatisticSet::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_sampleCountHasBeenSet)
{
oStream << location << ".SampleCount=" << StringUtils::URLEncode(m_sampleCount) << "&";
}
if(m_sumHasBeenSet)
{
oStream << location << ".Sum=" << StringUtils::URLEncode(m_sum) << "&";
}
if(m_minimumHasBeenSet)
{
oStream << location << ".Minimum=" << StringUtils::URLEncode(m_minimum) << "&";
}
if(m_maximumHasBeenSet)
{
oStream << location << ".Maximum=" << StringUtils::URLEncode(m_maximum) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/StatusCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CloudWatch
{
namespace Model
{
namespace StatusCodeMapper
{
static const int Complete_HASH = HashingUtils::HashString("Complete");
static const int InternalError_HASH = HashingUtils::HashString("InternalError");
static const int PartialData_HASH = HashingUtils::HashString("PartialData");
StatusCode GetStatusCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Complete_HASH)
{
return StatusCode::Complete;
}
else if (hashCode == InternalError_HASH)
{
return StatusCode::InternalError;
}
else if (hashCode == PartialData_HASH)
{
return StatusCode::PartialData;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<StatusCode>(hashCode);
}
return StatusCode::NOT_SET;
}
Aws::String GetNameForStatusCode(StatusCode enumValue)
{
switch(enumValue)
{
case StatusCode::Complete:
return "Complete";
case StatusCode::InternalError:
return "InternalError";
case StatusCode::PartialData:
return "PartialData";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StatusCodeMapper
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/Tag.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
{
Tag::Tag() :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Tag::Tag(const XmlNode& xmlNode) :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = xmlNode;
}
Tag& Tag::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode keyNode = resultNode.FirstChild("Key");
if(!keyNode.IsNull())
{
m_key = Aws::Utils::Xml::DecodeEscapedXmlText(keyNode.GetText());
m_keyHasBeenSet = true;
}
XmlNode valueNode = resultNode.FirstChild("Value");
if(!valueNode.IsNull())
{
m_value = Aws::Utils::Xml::DecodeEscapedXmlText(valueNode.GetText());
m_valueHasBeenSet = true;
}
}
return *this;
}
void Tag::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const
{
if(m_keyHasBeenSet)
{
oStream << location << index << locationValue << ".Key=" << StringUtils::URLEncode(m_key.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << index << locationValue << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
void Tag::OutputToStream(Aws::OStream& oStream, const char* location) const
{
if(m_keyHasBeenSet)
{
oStream << location << ".Key=" << StringUtils::URLEncode(m_key.c_str()) << "&";
}
if(m_valueHasBeenSet)
{
oStream << location << ".Value=" << StringUtils::URLEncode(m_value.c_str()) << "&";
}
}
} // namespace Model
} // namespace CloudWatch
} // namespace Aws

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/TagResourceRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
TagResourceRequest::TagResourceRequest() :
m_resourceARNHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String TagResourceRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=TagResource&";
if(m_resourceARNHasBeenSet)
{
ss << "ResourceARN=" << StringUtils::URLEncode(m_resourceARN.c_str()) << "&";
}
if(m_tagsHasBeenSet)
{
unsigned tagsCount = 1;
for(auto& item : m_tags)
{
item.OutputToStream(ss, "Tags.member.", tagsCount, "");
tagsCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void TagResourceRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/TagResourceResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
TagResourceResult::TagResourceResult()
{
}
TagResourceResult::TagResourceResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
TagResourceResult& TagResourceResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "TagResourceResult"))
{
resultNode = rootNode.FirstChild("TagResourceResult");
}
if(!resultNode.IsNull())
{
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::TagResourceResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}

View File

@@ -0,0 +1,47 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/UntagResourceRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils;
UntagResourceRequest::UntagResourceRequest() :
m_resourceARNHasBeenSet(false),
m_tagKeysHasBeenSet(false)
{
}
Aws::String UntagResourceRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=UntagResource&";
if(m_resourceARNHasBeenSet)
{
ss << "ResourceARN=" << StringUtils::URLEncode(m_resourceARN.c_str()) << "&";
}
if(m_tagKeysHasBeenSet)
{
unsigned tagKeysCount = 1;
for(auto& item : m_tagKeys)
{
ss << "TagKeys.member." << tagKeysCount << "="
<< StringUtils::URLEncode(item.c_str()) << "&";
tagKeysCount++;
}
}
ss << "Version=2010-08-01";
return ss.str();
}
void UntagResourceRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/monitoring/model/UntagResourceResult.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <utility>
using namespace Aws::CloudWatch::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils::Logging;
using namespace Aws::Utils;
using namespace Aws;
UntagResourceResult::UntagResourceResult()
{
}
UntagResourceResult::UntagResourceResult(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
UntagResourceResult& UntagResourceResult::operator =(const Aws::AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode rootNode = xmlDocument.GetRootElement();
XmlNode resultNode = rootNode;
if (!rootNode.IsNull() && (rootNode.GetName() != "UntagResourceResult"))
{
resultNode = rootNode.FirstChild("UntagResourceResult");
}
if(!resultNode.IsNull())
{
}
if (!rootNode.IsNull()) {
XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata");
m_responseMetadata = responseMetadataNode;
AWS_LOGSTREAM_DEBUG("Aws::CloudWatch::Model::UntagResourceResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() );
}
return *this;
}