/** * 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 CloudTrailData { namespace Model { ResultErrorEntry::ResultErrorEntry() : m_errorCodeHasBeenSet(false), m_errorMessageHasBeenSet(false), m_idHasBeenSet(false) { } ResultErrorEntry::ResultErrorEntry(JsonView jsonValue) : m_errorCodeHasBeenSet(false), m_errorMessageHasBeenSet(false), m_idHasBeenSet(false) { *this = jsonValue; } ResultErrorEntry& ResultErrorEntry::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("errorCode")) { m_errorCode = jsonValue.GetString("errorCode"); m_errorCodeHasBeenSet = true; } if(jsonValue.ValueExists("errorMessage")) { m_errorMessage = jsonValue.GetString("errorMessage"); m_errorMessageHasBeenSet = true; } if(jsonValue.ValueExists("id")) { m_id = jsonValue.GetString("id"); m_idHasBeenSet = true; } return *this; } JsonValue ResultErrorEntry::Jsonize() const { JsonValue payload; if(m_errorCodeHasBeenSet) { payload.WithString("errorCode", m_errorCode); } if(m_errorMessageHasBeenSet) { payload.WithString("errorMessage", m_errorMessage); } if(m_idHasBeenSet) { payload.WithString("id", m_id); } return payload; } } // namespace Model } // namespace CloudTrailData } // namespace Aws