/** * 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 Lightsail { namespace Model { NameServersUpdateState::NameServersUpdateState() : m_code(NameServersUpdateStateCode::NOT_SET), m_codeHasBeenSet(false), m_messageHasBeenSet(false) { } NameServersUpdateState::NameServersUpdateState(JsonView jsonValue) : m_code(NameServersUpdateStateCode::NOT_SET), m_codeHasBeenSet(false), m_messageHasBeenSet(false) { *this = jsonValue; } NameServersUpdateState& NameServersUpdateState::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("code")) { m_code = NameServersUpdateStateCodeMapper::GetNameServersUpdateStateCodeForName(jsonValue.GetString("code")); m_codeHasBeenSet = true; } if(jsonValue.ValueExists("message")) { m_message = jsonValue.GetString("message"); m_messageHasBeenSet = true; } return *this; } JsonValue NameServersUpdateState::Jsonize() const { JsonValue payload; if(m_codeHasBeenSet) { payload.WithString("code", NameServersUpdateStateCodeMapper::GetNameForNameServersUpdateStateCode(m_code)); } if(m_messageHasBeenSet) { payload.WithString("message", m_message); } return payload; } } // namespace Model } // namespace Lightsail } // namespace Aws