1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/glue/model/TableError.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 9 #include <utility> 10 11 using namespace Aws::Utils::Json; 12 using namespace Aws::Utils; 13 14 namespace Aws 15 { 16 namespace Glue 17 { 18 namespace Model 19 { 20 TableError()21TableError::TableError() : 22 m_tableNameHasBeenSet(false), 23 m_errorDetailHasBeenSet(false) 24 { 25 } 26 TableError(JsonView jsonValue)27TableError::TableError(JsonView jsonValue) : 28 m_tableNameHasBeenSet(false), 29 m_errorDetailHasBeenSet(false) 30 { 31 *this = jsonValue; 32 } 33 operator =(JsonView jsonValue)34TableError& TableError::operator =(JsonView jsonValue) 35 { 36 if(jsonValue.ValueExists("TableName")) 37 { 38 m_tableName = jsonValue.GetString("TableName"); 39 40 m_tableNameHasBeenSet = true; 41 } 42 43 if(jsonValue.ValueExists("ErrorDetail")) 44 { 45 m_errorDetail = jsonValue.GetObject("ErrorDetail"); 46 47 m_errorDetailHasBeenSet = true; 48 } 49 50 return *this; 51 } 52 Jsonize() const53JsonValue TableError::Jsonize() const 54 { 55 JsonValue payload; 56 57 if(m_tableNameHasBeenSet) 58 { 59 payload.WithString("TableName", m_tableName); 60 61 } 62 63 if(m_errorDetailHasBeenSet) 64 { 65 payload.WithObject("ErrorDetail", m_errorDetail.Jsonize()); 66 67 } 68 69 return payload; 70 } 71 72 } // namespace Model 73 } // namespace Glue 74 } // namespace Aws 75