1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #include <aws/route53domains/model/ExtraParam.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 Route53Domains 17 { 18 namespace Model 19 { 20 ExtraParam()21ExtraParam::ExtraParam() : 22 m_name(ExtraParamName::NOT_SET), 23 m_nameHasBeenSet(false), 24 m_valueHasBeenSet(false) 25 { 26 } 27 ExtraParam(JsonView jsonValue)28ExtraParam::ExtraParam(JsonView jsonValue) : 29 m_name(ExtraParamName::NOT_SET), 30 m_nameHasBeenSet(false), 31 m_valueHasBeenSet(false) 32 { 33 *this = jsonValue; 34 } 35 operator =(JsonView jsonValue)36ExtraParam& ExtraParam::operator =(JsonView jsonValue) 37 { 38 if(jsonValue.ValueExists("Name")) 39 { 40 m_name = ExtraParamNameMapper::GetExtraParamNameForName(jsonValue.GetString("Name")); 41 42 m_nameHasBeenSet = true; 43 } 44 45 if(jsonValue.ValueExists("Value")) 46 { 47 m_value = jsonValue.GetString("Value"); 48 49 m_valueHasBeenSet = true; 50 } 51 52 return *this; 53 } 54 Jsonize() const55JsonValue ExtraParam::Jsonize() const 56 { 57 JsonValue payload; 58 59 if(m_nameHasBeenSet) 60 { 61 payload.WithString("Name", ExtraParamNameMapper::GetNameForExtraParamName(m_name)); 62 } 63 64 if(m_valueHasBeenSet) 65 { 66 payload.WithString("Value", m_value); 67 68 } 69 70 return payload; 71 } 72 73 } // namespace Model 74 } // namespace Route53Domains 75 } // namespace Aws 76