/** * 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 GuardDuty { namespace Model { EksClusterDetails::EksClusterDetails() : m_nameHasBeenSet(false), m_arnHasBeenSet(false), m_vpcIdHasBeenSet(false), m_statusHasBeenSet(false), m_tagsHasBeenSet(false), m_createdAtHasBeenSet(false) { } EksClusterDetails::EksClusterDetails(JsonView jsonValue) : m_nameHasBeenSet(false), m_arnHasBeenSet(false), m_vpcIdHasBeenSet(false), m_statusHasBeenSet(false), m_tagsHasBeenSet(false), m_createdAtHasBeenSet(false) { *this = jsonValue; } EksClusterDetails& EksClusterDetails::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("vpcId")) { m_vpcId = jsonValue.GetString("vpcId"); m_vpcIdHasBeenSet = true; } if(jsonValue.ValueExists("status")) { m_status = jsonValue.GetString("status"); m_statusHasBeenSet = true; } if(jsonValue.ValueExists("tags")) { Aws::Utils::Array tagsJsonList = jsonValue.GetArray("tags"); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { m_tags.push_back(tagsJsonList[tagsIndex].AsObject()); } m_tagsHasBeenSet = true; } if(jsonValue.ValueExists("createdAt")) { m_createdAt = jsonValue.GetDouble("createdAt"); m_createdAtHasBeenSet = true; } return *this; } JsonValue EksClusterDetails::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_vpcIdHasBeenSet) { payload.WithString("vpcId", m_vpcId); } if(m_statusHasBeenSet) { payload.WithString("status", m_status); } if(m_tagsHasBeenSet) { Aws::Utils::Array tagsJsonList(m_tags.size()); for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex) { tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize()); } payload.WithArray("tags", std::move(tagsJsonList)); } if(m_createdAtHasBeenSet) { payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision()); } return payload; } } // namespace Model } // namespace GuardDuty } // namespace Aws