79 lines
1.6 KiB
C++
79 lines
1.6 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/kinesis/model/ListShardsRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Kinesis::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
ListShardsRequest::ListShardsRequest() :
|
|
m_streamNameHasBeenSet(false),
|
|
m_nextTokenHasBeenSet(false),
|
|
m_exclusiveStartShardIdHasBeenSet(false),
|
|
m_maxResults(0),
|
|
m_maxResultsHasBeenSet(false),
|
|
m_streamCreationTimestampHasBeenSet(false),
|
|
m_shardFilterHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String ListShardsRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_streamNameHasBeenSet)
|
|
{
|
|
payload.WithString("StreamName", m_streamName);
|
|
|
|
}
|
|
|
|
if(m_nextTokenHasBeenSet)
|
|
{
|
|
payload.WithString("NextToken", m_nextToken);
|
|
|
|
}
|
|
|
|
if(m_exclusiveStartShardIdHasBeenSet)
|
|
{
|
|
payload.WithString("ExclusiveStartShardId", m_exclusiveStartShardId);
|
|
|
|
}
|
|
|
|
if(m_maxResultsHasBeenSet)
|
|
{
|
|
payload.WithInteger("MaxResults", m_maxResults);
|
|
|
|
}
|
|
|
|
if(m_streamCreationTimestampHasBeenSet)
|
|
{
|
|
payload.WithDouble("StreamCreationTimestamp", m_streamCreationTimestamp.SecondsWithMSPrecision());
|
|
}
|
|
|
|
if(m_shardFilterHasBeenSet)
|
|
{
|
|
payload.WithObject("ShardFilter", m_shardFilter.Jsonize());
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection ListShardsRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Kinesis_20131202.ListShards"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|