/** * 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; RegisterTargetWithMaintenanceWindowRequest::RegisterTargetWithMaintenanceWindowRequest() : m_windowIdHasBeenSet(false), m_resourceType(MaintenanceWindowResourceType::NOT_SET), m_resourceTypeHasBeenSet(false), m_targetsHasBeenSet(false), m_ownerInformationHasBeenSet(false), m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_clientToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientTokenHasBeenSet(true) { } Aws::String RegisterTargetWithMaintenanceWindowRequest::SerializePayload() const { JsonValue payload; if(m_windowIdHasBeenSet) { payload.WithString("WindowId", m_windowId); } if(m_resourceTypeHasBeenSet) { payload.WithString("ResourceType", MaintenanceWindowResourceTypeMapper::GetNameForMaintenanceWindowResourceType(m_resourceType)); } 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_clientTokenHasBeenSet) { payload.WithString("ClientToken", m_clientToken); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection RegisterTargetWithMaintenanceWindowRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.RegisterTargetWithMaintenanceWindow")); return headers; }