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/UpdateGraphqlApiRequest.cpp

85 lines
2.2 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/appsync/model/UpdateGraphqlApiRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::AppSync::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateGraphqlApiRequest::UpdateGraphqlApiRequest() :
m_apiIdHasBeenSet(false),
m_nameHasBeenSet(false),
m_logConfigHasBeenSet(false),
m_authenticationType(AuthenticationType::NOT_SET),
m_authenticationTypeHasBeenSet(false),
m_userPoolConfigHasBeenSet(false),
m_openIDConnectConfigHasBeenSet(false),
m_additionalAuthenticationProvidersHasBeenSet(false),
m_xrayEnabled(false),
m_xrayEnabledHasBeenSet(false)
{
}
Aws::String UpdateGraphqlApiRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_logConfigHasBeenSet)
{
payload.WithObject("logConfig", m_logConfig.Jsonize());
}
if(m_authenticationTypeHasBeenSet)
{
payload.WithString("authenticationType", AuthenticationTypeMapper::GetNameForAuthenticationType(m_authenticationType));
}
if(m_userPoolConfigHasBeenSet)
{
payload.WithObject("userPoolConfig", m_userPoolConfig.Jsonize());
}
if(m_openIDConnectConfigHasBeenSet)
{
payload.WithObject("openIDConnectConfig", m_openIDConnectConfig.Jsonize());
}
if(m_additionalAuthenticationProvidersHasBeenSet)
{
Array<JsonValue> additionalAuthenticationProvidersJsonList(m_additionalAuthenticationProviders.size());
for(unsigned additionalAuthenticationProvidersIndex = 0; additionalAuthenticationProvidersIndex < additionalAuthenticationProvidersJsonList.GetLength(); ++additionalAuthenticationProvidersIndex)
{
additionalAuthenticationProvidersJsonList[additionalAuthenticationProvidersIndex].AsObject(m_additionalAuthenticationProviders[additionalAuthenticationProvidersIndex].Jsonize());
}
payload.WithArray("additionalAuthenticationProviders", std::move(additionalAuthenticationProvidersJsonList));
}
if(m_xrayEnabledHasBeenSet)
{
payload.WithBool("xrayEnabled", m_xrayEnabled);
}
return payload.View().WriteReadable();
}