/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include using namespace Aws::Lambda::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetLayerVersionByArnResult::GetLayerVersionByArnResult() : m_version(0) { } GetLayerVersionByArnResult::GetLayerVersionByArnResult(const Aws::AmazonWebServiceResult& result) : m_version(0) { *this = result; } GetLayerVersionByArnResult& GetLayerVersionByArnResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("Content")) { m_content = jsonValue.GetObject("Content"); } if(jsonValue.ValueExists("LayerArn")) { m_layerArn = jsonValue.GetString("LayerArn"); } if(jsonValue.ValueExists("LayerVersionArn")) { m_layerVersionArn = jsonValue.GetString("LayerVersionArn"); } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); } if(jsonValue.ValueExists("CreatedDate")) { m_createdDate = jsonValue.GetString("CreatedDate"); } if(jsonValue.ValueExists("Version")) { m_version = jsonValue.GetInt64("Version"); } if(jsonValue.ValueExists("CompatibleRuntimes")) { Array compatibleRuntimesJsonList = jsonValue.GetArray("CompatibleRuntimes"); for(unsigned compatibleRuntimesIndex = 0; compatibleRuntimesIndex < compatibleRuntimesJsonList.GetLength(); ++compatibleRuntimesIndex) { m_compatibleRuntimes.push_back(RuntimeMapper::GetRuntimeForName(compatibleRuntimesJsonList[compatibleRuntimesIndex].AsString())); } } if(jsonValue.ValueExists("LicenseInfo")) { m_licenseInfo = jsonValue.GetString("LicenseInfo"); } return *this; }