/** * 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 CodeGuruSecurity { namespace Model { BatchGetFindingsError::BatchGetFindingsError() : m_errorCode(ErrorCode::NOT_SET), m_errorCodeHasBeenSet(false), m_findingIdHasBeenSet(false), m_messageHasBeenSet(false), m_scanNameHasBeenSet(false) { } BatchGetFindingsError::BatchGetFindingsError(JsonView jsonValue) : m_errorCode(ErrorCode::NOT_SET), m_errorCodeHasBeenSet(false), m_findingIdHasBeenSet(false), m_messageHasBeenSet(false), m_scanNameHasBeenSet(false) { *this = jsonValue; } BatchGetFindingsError& BatchGetFindingsError::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("errorCode")) { m_errorCode = ErrorCodeMapper::GetErrorCodeForName(jsonValue.GetString("errorCode")); m_errorCodeHasBeenSet = true; } if(jsonValue.ValueExists("findingId")) { m_findingId = jsonValue.GetString("findingId"); m_findingIdHasBeenSet = true; } if(jsonValue.ValueExists("message")) { m_message = jsonValue.GetString("message"); m_messageHasBeenSet = true; } if(jsonValue.ValueExists("scanName")) { m_scanName = jsonValue.GetString("scanName"); m_scanNameHasBeenSet = true; } return *this; } JsonValue BatchGetFindingsError::Jsonize() const { JsonValue payload; if(m_errorCodeHasBeenSet) { payload.WithString("errorCode", ErrorCodeMapper::GetNameForErrorCode(m_errorCode)); } if(m_findingIdHasBeenSet) { payload.WithString("findingId", m_findingId); } if(m_messageHasBeenSet) { payload.WithString("message", m_message); } if(m_scanNameHasBeenSet) { payload.WithString("scanName", m_scanName); } return payload; } } // namespace Model } // namespace CodeGuruSecurity } // namespace Aws