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