/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include #include #include using namespace Aws::Lambda::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; GetFunctionUrlConfigResult::GetFunctionUrlConfigResult() : m_authType(FunctionUrlAuthType::NOT_SET), m_invokeMode(InvokeMode::NOT_SET) { } GetFunctionUrlConfigResult::GetFunctionUrlConfigResult(const Aws::AmazonWebServiceResult& result) : m_authType(FunctionUrlAuthType::NOT_SET), m_invokeMode(InvokeMode::NOT_SET) { *this = result; } GetFunctionUrlConfigResult& GetFunctionUrlConfigResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("FunctionUrl")) { m_functionUrl = jsonValue.GetString("FunctionUrl"); } if(jsonValue.ValueExists("FunctionArn")) { m_functionArn = jsonValue.GetString("FunctionArn"); } if(jsonValue.ValueExists("AuthType")) { m_authType = FunctionUrlAuthTypeMapper::GetFunctionUrlAuthTypeForName(jsonValue.GetString("AuthType")); } if(jsonValue.ValueExists("Cors")) { m_cors = jsonValue.GetObject("Cors"); } if(jsonValue.ValueExists("CreationTime")) { m_creationTime = jsonValue.GetString("CreationTime"); } if(jsonValue.ValueExists("LastModifiedTime")) { m_lastModifiedTime = jsonValue.GetString("LastModifiedTime"); } if(jsonValue.ValueExists("InvokeMode")) { m_invokeMode = InvokeModeMapper::GetInvokeModeForName(jsonValue.GetString("InvokeMode")); } const auto& headers = result.GetHeaderValueCollection(); const auto& requestIdIter = headers.find("x-amzn-requestid"); if(requestIdIter != headers.end()) { m_requestId = requestIdIter->second; } return *this; }