101 lines
2.5 KiB
C++
101 lines
2.5 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/ce/model/GetReservationPurchaseRecommendationRequest.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::CostExplorer::Model;
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
GetReservationPurchaseRecommendationRequest::GetReservationPurchaseRecommendationRequest() :
|
|||
|
|
m_accountIdHasBeenSet(false),
|
|||
|
|
m_serviceHasBeenSet(false),
|
|||
|
|
m_accountScope(AccountScope::NOT_SET),
|
|||
|
|
m_accountScopeHasBeenSet(false),
|
|||
|
|
m_lookbackPeriodInDays(LookbackPeriodInDays::NOT_SET),
|
|||
|
|
m_lookbackPeriodInDaysHasBeenSet(false),
|
|||
|
|
m_termInYears(TermInYears::NOT_SET),
|
|||
|
|
m_termInYearsHasBeenSet(false),
|
|||
|
|
m_paymentOption(PaymentOption::NOT_SET),
|
|||
|
|
m_paymentOptionHasBeenSet(false),
|
|||
|
|
m_serviceSpecificationHasBeenSet(false),
|
|||
|
|
m_pageSize(0),
|
|||
|
|
m_pageSizeHasBeenSet(false),
|
|||
|
|
m_nextPageTokenHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::String GetReservationPurchaseRecommendationRequest::SerializePayload() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_accountIdHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("AccountId", m_accountId);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_serviceHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("Service", m_service);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_accountScopeHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("AccountScope", AccountScopeMapper::GetNameForAccountScope(m_accountScope));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_lookbackPeriodInDaysHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("LookbackPeriodInDays", LookbackPeriodInDaysMapper::GetNameForLookbackPeriodInDays(m_lookbackPeriodInDays));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_termInYearsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("TermInYears", TermInYearsMapper::GetNameForTermInYears(m_termInYears));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_paymentOptionHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("PaymentOption", PaymentOptionMapper::GetNameForPaymentOption(m_paymentOption));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_serviceSpecificationHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithObject("ServiceSpecification", m_serviceSpecification.Jsonize());
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_pageSizeHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithInteger("PageSize", m_pageSize);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if(m_nextPageTokenHasBeenSet)
|
|||
|
|
{
|
|||
|
|
payload.WithString("NextPageToken", m_nextPageToken);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload.View().WriteReadable();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Aws::Http::HeaderValueCollection GetReservationPurchaseRecommendationRequest::GetRequestSpecificHeaders() const
|
|||
|
|
{
|
|||
|
|
Aws::Http::HeaderValueCollection headers;
|
|||
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSInsightsIndexService.GetReservationPurchaseRecommendation"));
|
|||
|
|
return headers;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|