/** * 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 DocDBElastic { namespace Model { ClusterInList::ClusterInList() : m_clusterArnHasBeenSet(false), m_clusterNameHasBeenSet(false), m_status(Status::NOT_SET), m_statusHasBeenSet(false) { } ClusterInList::ClusterInList(JsonView jsonValue) : m_clusterArnHasBeenSet(false), m_clusterNameHasBeenSet(false), m_status(Status::NOT_SET), m_statusHasBeenSet(false) { *this = jsonValue; } ClusterInList& ClusterInList::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("clusterArn")) { m_clusterArn = jsonValue.GetString("clusterArn"); m_clusterArnHasBeenSet = true; } if(jsonValue.ValueExists("clusterName")) { m_clusterName = jsonValue.GetString("clusterName"); m_clusterNameHasBeenSet = true; } if(jsonValue.ValueExists("status")) { m_status = StatusMapper::GetStatusForName(jsonValue.GetString("status")); m_statusHasBeenSet = true; } return *this; } JsonValue ClusterInList::Jsonize() const { JsonValue payload; if(m_clusterArnHasBeenSet) { payload.WithString("clusterArn", m_clusterArn); } if(m_clusterNameHasBeenSet) { payload.WithString("clusterName", m_clusterName); } if(m_statusHasBeenSet) { payload.WithString("status", StatusMapper::GetNameForStatus(m_status)); } return payload; } } // namespace Model } // namespace DocDBElastic } // namespace Aws