/** * 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::ApiGatewayV2::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws; UpdateAuthorizerResult::UpdateAuthorizerResult() : m_authorizerResultTtlInSeconds(0), m_authorizerType(AuthorizerType::NOT_SET) { } UpdateAuthorizerResult::UpdateAuthorizerResult(const Aws::AmazonWebServiceResult& result) : m_authorizerResultTtlInSeconds(0), m_authorizerType(AuthorizerType::NOT_SET) { *this = result; } UpdateAuthorizerResult& UpdateAuthorizerResult::operator =(const Aws::AmazonWebServiceResult& result) { JsonView jsonValue = result.GetPayload().View(); if(jsonValue.ValueExists("authorizerCredentialsArn")) { m_authorizerCredentialsArn = jsonValue.GetString("authorizerCredentialsArn"); } if(jsonValue.ValueExists("authorizerId")) { m_authorizerId = jsonValue.GetString("authorizerId"); } if(jsonValue.ValueExists("authorizerResultTtlInSeconds")) { m_authorizerResultTtlInSeconds = jsonValue.GetInteger("authorizerResultTtlInSeconds"); } if(jsonValue.ValueExists("authorizerType")) { m_authorizerType = AuthorizerTypeMapper::GetAuthorizerTypeForName(jsonValue.GetString("authorizerType")); } if(jsonValue.ValueExists("authorizerUri")) { m_authorizerUri = jsonValue.GetString("authorizerUri"); } if(jsonValue.ValueExists("identitySource")) { Array identitySourceJsonList = jsonValue.GetArray("identitySource"); for(unsigned identitySourceIndex = 0; identitySourceIndex < identitySourceJsonList.GetLength(); ++identitySourceIndex) { m_identitySource.push_back(identitySourceJsonList[identitySourceIndex].AsString()); } } if(jsonValue.ValueExists("identityValidationExpression")) { m_identityValidationExpression = jsonValue.GetString("identityValidationExpression"); } if(jsonValue.ValueExists("jwtConfiguration")) { m_jwtConfiguration = jsonValue.GetObject("jwtConfiguration"); } if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); } return *this; }