1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/securityhub/model/Ipv6CidrBlockAssociation.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 SecurityHub 17 { 18 namespace Model 19 { 20 Ipv6CidrBlockAssociation()21Ipv6CidrBlockAssociation::Ipv6CidrBlockAssociation() : 22 m_associationIdHasBeenSet(false), 23 m_ipv6CidrBlockHasBeenSet(false), 24 m_cidrBlockStateHasBeenSet(false) 25 { 26 } 27 Ipv6CidrBlockAssociation(JsonView jsonValue)28Ipv6CidrBlockAssociation::Ipv6CidrBlockAssociation(JsonView jsonValue) : 29 m_associationIdHasBeenSet(false), 30 m_ipv6CidrBlockHasBeenSet(false), 31 m_cidrBlockStateHasBeenSet(false) 32 { 33 *this = jsonValue; 34 } 35 operator =(JsonView jsonValue)36Ipv6CidrBlockAssociation& Ipv6CidrBlockAssociation::operator =(JsonView jsonValue) 37 { 38 if(jsonValue.ValueExists("AssociationId")) 39 { 40 m_associationId = jsonValue.GetString("AssociationId"); 41 42 m_associationIdHasBeenSet = true; 43 } 44 45 if(jsonValue.ValueExists("Ipv6CidrBlock")) 46 { 47 m_ipv6CidrBlock = jsonValue.GetString("Ipv6CidrBlock"); 48 49 m_ipv6CidrBlockHasBeenSet = true; 50 } 51 52 if(jsonValue.ValueExists("CidrBlockState")) 53 { 54 m_cidrBlockState = jsonValue.GetString("CidrBlockState"); 55 56 m_cidrBlockStateHasBeenSet = true; 57 } 58 59 return *this; 60 } 61 Jsonize() const62JsonValue Ipv6CidrBlockAssociation::Jsonize() const 63 { 64 JsonValue payload; 65 66 if(m_associationIdHasBeenSet) 67 { 68 payload.WithString("AssociationId", m_associationId); 69 70 } 71 72 if(m_ipv6CidrBlockHasBeenSet) 73 { 74 payload.WithString("Ipv6CidrBlock", m_ipv6CidrBlock); 75 76 } 77 78 if(m_cidrBlockStateHasBeenSet) 79 { 80 payload.WithString("CidrBlockState", m_cidrBlockState); 81 82 } 83 84 return payload; 85 } 86 87 } // namespace Model 88 } // namespace SecurityHub 89 } // namespace Aws 90