/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::SSM::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateMaintenanceWindowTargetRequest::UpdateMaintenanceWindowTargetRequest() : m_windowIdHasBeenSet(false), m_windowTargetIdHasBeenSet(false), m_targetsHasBeenSet(false), m_ownerInformationHasBeenSet(false), m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_replace(false), m_replaceHasBeenSet(false) { } Aws::String UpdateMaintenanceWindowTargetRequest::SerializePayload() const { JsonValue payload; if(m_windowIdHasBeenSet) { payload.WithString("WindowId", m_windowId); } if(m_windowTargetIdHasBeenSet) { payload.WithString("WindowTargetId", m_windowTargetId); } if(m_targetsHasBeenSet) { Aws::Utils::Array targetsJsonList(m_targets.size()); for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex) { targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize()); } payload.WithArray("Targets", std::move(targetsJsonList)); } if(m_ownerInformationHasBeenSet) { payload.WithString("OwnerInformation", m_ownerInformation); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_replaceHasBeenSet) { payload.WithBool("Replace", m_replace); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection UpdateMaintenanceWindowTargetRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.UpdateMaintenanceWindowTarget")); return headers; }