/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace IoTEventsData { namespace Model { BatchUpdateDetectorErrorEntry::BatchUpdateDetectorErrorEntry() : m_messageIdHasBeenSet(false), m_errorCode(ErrorCode::NOT_SET), m_errorCodeHasBeenSet(false), m_errorMessageHasBeenSet(false) { } BatchUpdateDetectorErrorEntry::BatchUpdateDetectorErrorEntry(JsonView jsonValue) : m_messageIdHasBeenSet(false), m_errorCode(ErrorCode::NOT_SET), m_errorCodeHasBeenSet(false), m_errorMessageHasBeenSet(false) { *this = jsonValue; } BatchUpdateDetectorErrorEntry& BatchUpdateDetectorErrorEntry::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("messageId")) { m_messageId = jsonValue.GetString("messageId"); m_messageIdHasBeenSet = true; } if(jsonValue.ValueExists("errorCode")) { m_errorCode = ErrorCodeMapper::GetErrorCodeForName(jsonValue.GetString("errorCode")); m_errorCodeHasBeenSet = true; } if(jsonValue.ValueExists("errorMessage")) { m_errorMessage = jsonValue.GetString("errorMessage"); m_errorMessageHasBeenSet = true; } return *this; } JsonValue BatchUpdateDetectorErrorEntry::Jsonize() const { JsonValue payload; if(m_messageIdHasBeenSet) { payload.WithString("messageId", m_messageId); } if(m_errorCodeHasBeenSet) { payload.WithString("errorCode", ErrorCodeMapper::GetNameForErrorCode(m_errorCode)); } if(m_errorMessageHasBeenSet) { payload.WithString("errorMessage", m_errorMessage); } return payload; } } // namespace Model } // namespace IoTEventsData } // namespace Aws