/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::CloudWatchEvents::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; RemoveTargetsRequest::RemoveTargetsRequest() : m_ruleHasBeenSet(false), m_eventBusNameHasBeenSet(false), m_idsHasBeenSet(false), m_force(false), m_forceHasBeenSet(false) { } Aws::String RemoveTargetsRequest::SerializePayload() const { JsonValue payload; if(m_ruleHasBeenSet) { payload.WithString("Rule", m_rule); } if(m_eventBusNameHasBeenSet) { payload.WithString("EventBusName", m_eventBusName); } if(m_idsHasBeenSet) { Aws::Utils::Array idsJsonList(m_ids.size()); for(unsigned idsIndex = 0; idsIndex < idsJsonList.GetLength(); ++idsIndex) { idsJsonList[idsIndex].AsString(m_ids[idsIndex]); } payload.WithArray("Ids", std::move(idsJsonList)); } if(m_forceHasBeenSet) { payload.WithBool("Force", m_force); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection RemoveTargetsRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSEvents.RemoveTargets")); return headers; }