/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include 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), m_lambdaAuthorizerConfigHasBeenSet(false), m_mergedApiExecutionRoleArnHasBeenSet(false), m_ownerContactHasBeenSet(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) { Aws::Utils::Array 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); } if(m_lambdaAuthorizerConfigHasBeenSet) { payload.WithObject("lambdaAuthorizerConfig", m_lambdaAuthorizerConfig.Jsonize()); } if(m_mergedApiExecutionRoleArnHasBeenSet) { payload.WithString("mergedApiExecutionRoleArn", m_mergedApiExecutionRoleArn); } if(m_ownerContactHasBeenSet) { payload.WithString("ownerContact", m_ownerContact); } return payload.View().WriteReadable(); }