/** * 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 AppSync { namespace Model { AdditionalAuthenticationProvider::AdditionalAuthenticationProvider() : m_authenticationType(AuthenticationType::NOT_SET), m_authenticationTypeHasBeenSet(false), m_openIDConnectConfigHasBeenSet(false), m_userPoolConfigHasBeenSet(false), m_lambdaAuthorizerConfigHasBeenSet(false) { } AdditionalAuthenticationProvider::AdditionalAuthenticationProvider(JsonView jsonValue) : m_authenticationType(AuthenticationType::NOT_SET), m_authenticationTypeHasBeenSet(false), m_openIDConnectConfigHasBeenSet(false), m_userPoolConfigHasBeenSet(false), m_lambdaAuthorizerConfigHasBeenSet(false) { *this = jsonValue; } AdditionalAuthenticationProvider& AdditionalAuthenticationProvider::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("authenticationType")) { m_authenticationType = AuthenticationTypeMapper::GetAuthenticationTypeForName(jsonValue.GetString("authenticationType")); m_authenticationTypeHasBeenSet = true; } if(jsonValue.ValueExists("openIDConnectConfig")) { m_openIDConnectConfig = jsonValue.GetObject("openIDConnectConfig"); m_openIDConnectConfigHasBeenSet = true; } if(jsonValue.ValueExists("userPoolConfig")) { m_userPoolConfig = jsonValue.GetObject("userPoolConfig"); m_userPoolConfigHasBeenSet = true; } if(jsonValue.ValueExists("lambdaAuthorizerConfig")) { m_lambdaAuthorizerConfig = jsonValue.GetObject("lambdaAuthorizerConfig"); m_lambdaAuthorizerConfigHasBeenSet = true; } return *this; } JsonValue AdditionalAuthenticationProvider::Jsonize() const { JsonValue payload; if(m_authenticationTypeHasBeenSet) { payload.WithString("authenticationType", AuthenticationTypeMapper::GetNameForAuthenticationType(m_authenticationType)); } if(m_openIDConnectConfigHasBeenSet) { payload.WithObject("openIDConnectConfig", m_openIDConnectConfig.Jsonize()); } if(m_userPoolConfigHasBeenSet) { payload.WithObject("userPoolConfig", m_userPoolConfig.Jsonize()); } if(m_lambdaAuthorizerConfigHasBeenSet) { payload.WithObject("lambdaAuthorizerConfig", m_lambdaAuthorizerConfig.Jsonize()); } return payload; } } // namespace Model } // namespace AppSync } // namespace Aws