This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-appsync/source/model/AdditionalAuthenticationProvider.cpp

91 lines
2.1 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/appsync/model/AdditionalAuthenticationProvider.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
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)
{
}
AdditionalAuthenticationProvider::AdditionalAuthenticationProvider(JsonView jsonValue) :
m_authenticationType(AuthenticationType::NOT_SET),
m_authenticationTypeHasBeenSet(false),
m_openIDConnectConfigHasBeenSet(false),
m_userPoolConfigHasBeenSet(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;
}
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());
}
return payload;
}
} // namespace Model
} // namespace AppSync
} // namespace Aws