/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::AppStream::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateEntitlementRequest::UpdateEntitlementRequest() : m_nameHasBeenSet(false), m_stackNameHasBeenSet(false), m_descriptionHasBeenSet(false), m_appVisibility(AppVisibility::NOT_SET), m_appVisibilityHasBeenSet(false), m_attributesHasBeenSet(false) { } Aws::String UpdateEntitlementRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_stackNameHasBeenSet) { payload.WithString("StackName", m_stackName); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_appVisibilityHasBeenSet) { payload.WithString("AppVisibility", AppVisibilityMapper::GetNameForAppVisibility(m_appVisibility)); } if(m_attributesHasBeenSet) { Aws::Utils::Array attributesJsonList(m_attributes.size()); for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex) { attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize()); } payload.WithArray("Attributes", std::move(attributesJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection UpdateEntitlementRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "PhotonAdminProxyService.UpdateEntitlement")); return headers; }