/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::CloudTrail::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateChannelRequest::UpdateChannelRequest() : m_channelHasBeenSet(false), m_destinationsHasBeenSet(false), m_nameHasBeenSet(false) { } Aws::String UpdateChannelRequest::SerializePayload() const { JsonValue payload; if(m_channelHasBeenSet) { payload.WithString("Channel", m_channel); } if(m_destinationsHasBeenSet) { Aws::Utils::Array destinationsJsonList(m_destinations.size()); for(unsigned destinationsIndex = 0; destinationsIndex < destinationsJsonList.GetLength(); ++destinationsIndex) { destinationsJsonList[destinationsIndex].AsObject(m_destinations[destinationsIndex].Jsonize()); } payload.WithArray("Destinations", std::move(destinationsJsonList)); } if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection UpdateChannelRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.UpdateChannel")); return headers; }