/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace MediaConnect { namespace Model { UpdateFailoverConfig::UpdateFailoverConfig() : m_recoveryWindow(0), m_recoveryWindowHasBeenSet(false), m_state(State::NOT_SET), m_stateHasBeenSet(false) { } UpdateFailoverConfig::UpdateFailoverConfig(JsonView jsonValue) : m_recoveryWindow(0), m_recoveryWindowHasBeenSet(false), m_state(State::NOT_SET), m_stateHasBeenSet(false) { *this = jsonValue; } UpdateFailoverConfig& UpdateFailoverConfig::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("recoveryWindow")) { m_recoveryWindow = jsonValue.GetInteger("recoveryWindow"); m_recoveryWindowHasBeenSet = true; } if(jsonValue.ValueExists("state")) { m_state = StateMapper::GetStateForName(jsonValue.GetString("state")); m_stateHasBeenSet = true; } return *this; } JsonValue UpdateFailoverConfig::Jsonize() const { JsonValue payload; if(m_recoveryWindowHasBeenSet) { payload.WithInteger("recoveryWindow", m_recoveryWindow); } if(m_stateHasBeenSet) { payload.WithString("state", StateMapper::GetNameForState(m_state)); } return payload; } } // namespace Model } // namespace MediaConnect } // namespace Aws