/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include #include using namespace Aws::AccessAnalyzer::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; using namespace Aws::Http; ValidatePolicyRequest::ValidatePolicyRequest() : m_locale(Locale::NOT_SET), m_localeHasBeenSet(false), m_maxResults(0), m_maxResultsHasBeenSet(false), m_nextTokenHasBeenSet(false), m_policyDocumentHasBeenSet(false), m_policyType(PolicyType::NOT_SET), m_policyTypeHasBeenSet(false), m_validatePolicyResourceType(ValidatePolicyResourceType::NOT_SET), m_validatePolicyResourceTypeHasBeenSet(false) { } Aws::String ValidatePolicyRequest::SerializePayload() const { JsonValue payload; if(m_localeHasBeenSet) { payload.WithString("locale", LocaleMapper::GetNameForLocale(m_locale)); } if(m_policyDocumentHasBeenSet) { payload.WithString("policyDocument", m_policyDocument); } if(m_policyTypeHasBeenSet) { payload.WithString("policyType", PolicyTypeMapper::GetNameForPolicyType(m_policyType)); } if(m_validatePolicyResourceTypeHasBeenSet) { payload.WithString("validatePolicyResourceType", ValidatePolicyResourceTypeMapper::GetNameForValidatePolicyResourceType(m_validatePolicyResourceType)); } return payload.View().WriteReadable(); } void ValidatePolicyRequest::AddQueryStringParameters(URI& uri) const { Aws::StringStream ss; if(m_maxResultsHasBeenSet) { ss << m_maxResults; uri.AddQueryStringParameter("maxResults", ss.str()); ss.str(""); } if(m_nextTokenHasBeenSet) { ss << m_nextToken; uri.AddQueryStringParameter("nextToken", ss.str()); ss.str(""); } }