/** * 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 OpsWorks { namespace Model { DataSource::DataSource() : m_typeHasBeenSet(false), m_arnHasBeenSet(false), m_databaseNameHasBeenSet(false) { } DataSource::DataSource(JsonView jsonValue) : m_typeHasBeenSet(false), m_arnHasBeenSet(false), m_databaseNameHasBeenSet(false) { *this = jsonValue; } DataSource& DataSource::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Type")) { m_type = jsonValue.GetString("Type"); m_typeHasBeenSet = true; } if(jsonValue.ValueExists("Arn")) { m_arn = jsonValue.GetString("Arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("DatabaseName")) { m_databaseName = jsonValue.GetString("DatabaseName"); m_databaseNameHasBeenSet = true; } return *this; } JsonValue DataSource::Jsonize() const { JsonValue payload; if(m_typeHasBeenSet) { payload.WithString("Type", m_type); } if(m_arnHasBeenSet) { payload.WithString("Arn", m_arn); } if(m_databaseNameHasBeenSet) { payload.WithString("DatabaseName", m_databaseName); } return payload; } } // namespace Model } // namespace OpsWorks } // namespace Aws