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