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