Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ AlarmContributor& AlarmContributor::operator=(const std::shared_ptr<Aws::Crt::Cb
}
}
m_stateTransitionedTimestampHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -401,9 +399,7 @@ AlarmContributor& AlarmContributor::operator=(const std::shared_ptr<Aws::Crt::Cb
}
}
m_stateTransitionedTimestampHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ AlarmHistoryItem& AlarmHistoryItem::operator=(const std::shared_ptr<Aws::Crt::Cb
}
}
m_alarmContributorAttributesHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -557,9 +555,7 @@ AlarmHistoryItem& AlarmHistoryItem::operator=(const std::shared_ptr<Aws::Crt::Cb
}
}
m_alarmContributorAttributesHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,7 @@ AlarmMuteRuleSummary& AlarmMuteRuleSummary::operator=(const std::shared_ptr<Aws:
}
}
m_lastUpdatedTimestampHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -285,9 +283,7 @@ AlarmMuteRuleSummary& AlarmMuteRuleSummary::operator=(const std::shared_ptr<Aws:
}
}
m_lastUpdatedTimestampHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ AnomalyDetector& AnomalyDetector::operator=(const std::shared_ptr<Aws::Crt::Cbor
else if (initialKeyStr == "MetricMathAnomalyDetector") {
m_metricMathAnomalyDetector = MetricMathAnomalyDetector(decoder);
m_metricMathAnomalyDetectorHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -113,9 +111,7 @@ AnomalyDetector& AnomalyDetector::operator=(const std::shared_ptr<Aws::Crt::Cbor
else if (initialKeyStr == "MetricMathAnomalyDetector") {
m_metricMathAnomalyDetector = MetricMathAnomalyDetector(decoder);
m_metricMathAnomalyDetectorHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ AnomalyDetectorConfiguration& AnomalyDetectorConfiguration::operator=(const std:
}
}
m_metricTimezoneHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -173,9 +171,7 @@ AnomalyDetectorConfiguration& AnomalyDetectorConfiguration::operator=(const std:
}
}
m_metricTimezoneHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,7 @@ CompositeAlarm& CompositeAlarm::operator=(const std::shared_ptr<Aws::Crt::Cbor::
}
}
m_actionsSuppressorExtensionPeriodHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -1286,9 +1284,7 @@ CompositeAlarm& CompositeAlarm::operator=(const std::shared_ptr<Aws::Crt::Cbor::
}
}
m_actionsSuppressorExtensionPeriodHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ DashboardEntry& DashboardEntry::operator=(const std::shared_ptr<Aws::Crt::Cbor::
}
}
m_sizeHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -257,9 +255,7 @@ DashboardEntry& DashboardEntry::operator=(const std::shared_ptr<Aws::Crt::Cbor::
}
}
m_sizeHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ DashboardInvalidInputError& DashboardInvalidInputError::operator=(const std::sha
}
}
m_dashboardValidationMessagesHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -173,9 +171,7 @@ DashboardInvalidInputError& DashboardInvalidInputError::operator=(const std::sha
}
}
m_dashboardValidationMessagesHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ DashboardValidationMessage& DashboardValidationMessage::operator=(const std::sha
}
}
m_messageHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -175,9 +173,7 @@ DashboardValidationMessage& DashboardValidationMessage::operator=(const std::sha
}
}
m_messageHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ Datapoint& Datapoint::operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecode
}
}
m_extendedStatisticsHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down Expand Up @@ -283,9 +281,7 @@ Datapoint& Datapoint::operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecode
}
}
m_extendedStatisticsHasBeenSet = true;
}

else {
} else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,126 +27,6 @@ DeleteAnomalyDetectorResult::DeleteAnomalyDetectorResult(const Aws::AmazonWebSer
DeleteAnomalyDetectorResult& DeleteAnomalyDetectorResult::operator=(
const Aws::AmazonWebServiceResult<Aws::Utils::Cbor::CborValue>& result) {
m_HttpResponseCode = result.GetResponseCode();
const auto& cborValue = result.GetPayload();
const auto decoder = cborValue.GetDecoder();

if (decoder != nullptr) {
auto initialMapType = decoder->PeekType();
if (initialMapType.has_value() && (initialMapType.value() == CborType::MapStart || initialMapType.value() == CborType::IndefMapStart)) {
if (initialMapType.value() == CborType::MapStart) {
auto mapSize = decoder->PopNextMapStart();
if (mapSize.has_value()) {
for (size_t i = 0; i < mapSize.value(); ++i) {
auto initialKey = decoder->PopNextTextVal();
if (initialKey.has_value()) {
Aws::String initialKeyStr(reinterpret_cast<const char*>(initialKey.value().ptr), initialKey.value().len);

if (initialKeyStr == "x-amzn-requestid") {
auto peekType = decoder->PeekType();
if (peekType.has_value()) {
if (peekType.value() == Aws::Crt::Cbor::CborType::Text) {
auto val = decoder->PopNextTextVal();
if (val.has_value()) {
m_requestId = Aws::String(reinterpret_cast<const char*>(val.value().ptr), val.value().len);
}
} else {
decoder->ConsumeNextSingleElement();
Aws::StringStream ss;
while (decoder->LastError() == AWS_ERROR_UNKNOWN) {
auto nextType = decoder->PeekType();
if (!nextType.has_value() || nextType.value() == CborType::Break) {
if (nextType.has_value()) {
decoder->ConsumeNextSingleElement(); // consume the Break
}
break;
}
auto val = decoder->PopNextTextVal();
if (val.has_value()) {
ss << Aws::String(reinterpret_cast<const char*>(val.value().ptr), val.value().len);
}
}
m_requestId = ss.str();
}
}
m_requestIdHasBeenSet = true;
}

else if (initialKeyStr == "x-amzn-requestid") {
m_responseMetadata = ResponseMetadata(decoder);
m_responseMetadataHasBeenSet = true;
}

else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
if ((decoder->LastError() != AWS_ERROR_UNKNOWN)) {
AWS_LOG_ERROR("DeleteAnomalyDetectorResult", "Invalid data received for %s", initialKeyStr.c_str());
break;
}
}
}
}
} else // IndefMapStart
{
decoder->ConsumeNextSingleElement(); // consume the IndefMapStart
while (decoder->LastError() == AWS_ERROR_UNKNOWN) {
auto outerMapNextType = decoder->PeekType();
if (!outerMapNextType.has_value() || outerMapNextType.value() == CborType::Break) {
if (outerMapNextType.has_value()) {
decoder->ConsumeNextSingleElement(); // consume the Break
}
break;
}

auto initialKey = decoder->PopNextTextVal();
if (initialKey.has_value()) {
Aws::String initialKeyStr(reinterpret_cast<const char*>(initialKey.value().ptr), initialKey.value().len);

if (initialKeyStr == "x-amzn-requestid") {
auto peekType = decoder->PeekType();
if (peekType.has_value()) {
if (peekType.value() == Aws::Crt::Cbor::CborType::Text) {
auto val = decoder->PopNextTextVal();
if (val.has_value()) {
m_requestId = Aws::String(reinterpret_cast<const char*>(val.value().ptr), val.value().len);
}
} else {
decoder->ConsumeNextSingleElement();
Aws::StringStream ss;
while (decoder->LastError() == AWS_ERROR_UNKNOWN) {
auto nextType = decoder->PeekType();
if (!nextType.has_value() || nextType.value() == CborType::Break) {
if (nextType.has_value()) {
decoder->ConsumeNextSingleElement(); // consume the Break
}
break;
}
auto val = decoder->PopNextTextVal();
if (val.has_value()) {
ss << Aws::String(reinterpret_cast<const char*>(val.value().ptr), val.value().len);
}
}
m_requestId = ss.str();
}
}
m_requestIdHasBeenSet = true;
}

else if (initialKeyStr == "x-amzn-requestid") {
m_responseMetadata = ResponseMetadata(decoder);
m_responseMetadataHasBeenSet = true;
}

else {
// Unknown key, skip the value
decoder->ConsumeNextWholeDataItem();
}
}
}
}
}
}

const auto& headers = result.GetHeaderValueCollection();
const auto& requestIdIter = headers.find("x-amzn-requestid");
Expand Down
Loading