/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Firehose::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; PutRecordBatchRequest::PutRecordBatchRequest() : m_deliveryStreamNameHasBeenSet(false), m_recordsHasBeenSet(false) { } Aws::String PutRecordBatchRequest::SerializePayload() const { JsonValue payload; if(m_deliveryStreamNameHasBeenSet) { payload.WithString("DeliveryStreamName", m_deliveryStreamName); } if(m_recordsHasBeenSet) { Aws::Utils::Array recordsJsonList(m_records.size()); for(unsigned recordsIndex = 0; recordsIndex < recordsJsonList.GetLength(); ++recordsIndex) { recordsJsonList[recordsIndex].AsObject(m_records[recordsIndex].Jsonize()); } payload.WithArray("Records", std::move(recordsJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection PutRecordBatchRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Firehose_20150804.PutRecordBatch")); return headers; }