1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/lexv2-models/model/DataPrivacy.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 LexModelsV2 17 { 18 namespace Model 19 { 20 DataPrivacy()21DataPrivacy::DataPrivacy() : 22 m_childDirected(false), 23 m_childDirectedHasBeenSet(false) 24 { 25 } 26 DataPrivacy(JsonView jsonValue)27DataPrivacy::DataPrivacy(JsonView jsonValue) : 28 m_childDirected(false), 29 m_childDirectedHasBeenSet(false) 30 { 31 *this = jsonValue; 32 } 33 operator =(JsonView jsonValue)34DataPrivacy& DataPrivacy::operator =(JsonView jsonValue) 35 { 36 if(jsonValue.ValueExists("childDirected")) 37 { 38 m_childDirected = jsonValue.GetBool("childDirected"); 39 40 m_childDirectedHasBeenSet = true; 41 } 42 43 return *this; 44 } 45 Jsonize() const46JsonValue DataPrivacy::Jsonize() const 47 { 48 JsonValue payload; 49 50 if(m_childDirectedHasBeenSet) 51 { 52 payload.WithBool("childDirected", m_childDirected); 53 54 } 55 56 return payload; 57 } 58 59 } // namespace Model 60 } // namespace LexModelsV2 61 } // namespace Aws 62