/** * 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 AppRunner { namespace Model { Connection::Connection() : m_connectionNameHasBeenSet(false), m_connectionArnHasBeenSet(false), m_providerType(ProviderType::NOT_SET), m_providerTypeHasBeenSet(false), m_status(ConnectionStatus::NOT_SET), m_statusHasBeenSet(false), m_createdAtHasBeenSet(false) { } Connection::Connection(JsonView jsonValue) : m_connectionNameHasBeenSet(false), m_connectionArnHasBeenSet(false), m_providerType(ProviderType::NOT_SET), m_providerTypeHasBeenSet(false), m_status(ConnectionStatus::NOT_SET), m_statusHasBeenSet(false), m_createdAtHasBeenSet(false) { *this = jsonValue; } Connection& Connection::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("ConnectionName")) { m_connectionName = jsonValue.GetString("ConnectionName"); m_connectionNameHasBeenSet = true; } if(jsonValue.ValueExists("ConnectionArn")) { m_connectionArn = jsonValue.GetString("ConnectionArn"); m_connectionArnHasBeenSet = true; } if(jsonValue.ValueExists("ProviderType")) { m_providerType = ProviderTypeMapper::GetProviderTypeForName(jsonValue.GetString("ProviderType")); m_providerTypeHasBeenSet = true; } if(jsonValue.ValueExists("Status")) { m_status = ConnectionStatusMapper::GetConnectionStatusForName(jsonValue.GetString("Status")); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("CreatedAt")) { m_createdAt = jsonValue.GetDouble("CreatedAt"); m_createdAtHasBeenSet = true; } return *this; } JsonValue Connection::Jsonize() const { JsonValue payload; if(m_connectionNameHasBeenSet) { payload.WithString("ConnectionName", m_connectionName); } if(m_connectionArnHasBeenSet) { payload.WithString("ConnectionArn", m_connectionArn); } if(m_providerTypeHasBeenSet) { payload.WithString("ProviderType", ProviderTypeMapper::GetNameForProviderType(m_providerType)); } if(m_statusHasBeenSet) { payload.WithString("Status", ConnectionStatusMapper::GetNameForConnectionStatus(m_status)); } if(m_createdAtHasBeenSet) { payload.WithDouble("CreatedAt", m_createdAt.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace AppRunner } // namespace Aws