/** * 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 { LambdaDetails::LambdaDetails() : m_functionArnHasBeenSet(false), m_functionNameHasBeenSet(false), m_descriptionHasBeenSet(false), m_lastModifiedAtHasBeenSet(false), m_revisionIdHasBeenSet(false), m_functionVersionHasBeenSet(false), m_roleHasBeenSet(false), m_vpcConfigHasBeenSet(false), m_tagsHasBeenSet(false) { } LambdaDetails::LambdaDetails(JsonView jsonValue) : m_functionArnHasBeenSet(false), m_functionNameHasBeenSet(false), m_descriptionHasBeenSet(false), m_lastModifiedAtHasBeenSet(false), m_revisionIdHasBeenSet(false), m_functionVersionHasBeenSet(false), m_roleHasBeenSet(false), m_vpcConfigHasBeenSet(false), m_tagsHasBeenSet(false) { *this = jsonValue; } LambdaDetails& LambdaDetails::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("functionArn")) { m_functionArn = jsonValue.GetString("functionArn"); m_functionArnHasBeenSet = true; } if(jsonValue.ValueExists("functionName")) { m_functionName = jsonValue.GetString("functionName"); m_functionNameHasBeenSet = true; } if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("lastModifiedAt")) { m_lastModifiedAt = jsonValue.GetDouble("lastModifiedAt"); m_lastModifiedAtHasBeenSet = true; } if(jsonValue.ValueExists("revisionId")) { m_revisionId = jsonValue.GetString("revisionId"); m_revisionIdHasBeenSet = true; } if(jsonValue.ValueExists("functionVersion")) { m_functionVersion = jsonValue.GetString("functionVersion"); m_functionVersionHasBeenSet = true; } if(jsonValue.ValueExists("role")) { m_role = jsonValue.GetString("role"); m_roleHasBeenSet = true; } if(jsonValue.ValueExists("vpcConfig")) { m_vpcConfig = jsonValue.GetObject("vpcConfig"); m_vpcConfigHasBeenSet = 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; } return *this; } JsonValue LambdaDetails::Jsonize() const { JsonValue payload; if(m_functionArnHasBeenSet) { payload.WithString("functionArn", m_functionArn); } if(m_functionNameHasBeenSet) { payload.WithString("functionName", m_functionName); } if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_lastModifiedAtHasBeenSet) { payload.WithDouble("lastModifiedAt", m_lastModifiedAt.SecondsWithMSPrecision()); } if(m_revisionIdHasBeenSet) { payload.WithString("revisionId", m_revisionId); } if(m_functionVersionHasBeenSet) { payload.WithString("functionVersion", m_functionVersion); } if(m_roleHasBeenSet) { payload.WithString("role", m_role); } if(m_vpcConfigHasBeenSet) { payload.WithObject("vpcConfig", m_vpcConfig.Jsonize()); } 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)); } return payload; } } // namespace Model } // namespace GuardDuty } // namespace Aws