feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,76 @@
add_project(aws-cpp-sdk-savingsplans "C++ SDK for the AWS savingsplans service" aws-cpp-sdk-core)
file(GLOB AWS_SAVINGSPLANS_HEADERS
"include/aws/savingsplans/*.h"
)
file(GLOB AWS_SAVINGSPLANS_MODEL_HEADERS
"include/aws/savingsplans/model/*.h"
)
file(GLOB AWS_SAVINGSPLANS_SOURCE
"source/*.cpp"
)
file(GLOB AWS_SAVINGSPLANS_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB SAVINGSPLANS_UNIFIED_HEADERS
${AWS_SAVINGSPLANS_HEADERS}
${AWS_SAVINGSPLANS_MODEL_HEADERS}
)
file(GLOB SAVINGSPLANS_UNITY_SRC
${AWS_SAVINGSPLANS_SOURCE}
${AWS_SAVINGSPLANS_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("SAVINGSPLANS" SAVINGSPLANS_UNITY_SRC)
endif()
file(GLOB SAVINGSPLANS_SRC
${SAVINGSPLANS_UNIFIED_HEADERS}
${SAVINGSPLANS_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\savingsplans" FILES ${AWS_SAVINGSPLANS_HEADERS})
source_group("Header Files\\aws\\savingsplans\\model" FILES ${AWS_SAVINGSPLANS_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_SAVINGSPLANS_SOURCE})
source_group("Source Files\\model" FILES ${AWS_SAVINGSPLANS_MODEL_SOURCE})
endif(MSVC)
endif()
set(SAVINGSPLANS_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${SAVINGSPLANS_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_SAVINGSPLANS_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_SAVINGSPLANS_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/savingsplans)
install (FILES ${AWS_SAVINGSPLANS_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/savingsplans/model)
do_packaging()

View File

@@ -0,0 +1,366 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/savingsplans/model/CreateSavingsPlanResult.h>
#include <aws/savingsplans/model/DescribeSavingsPlanRatesResult.h>
#include <aws/savingsplans/model/DescribeSavingsPlansResult.h>
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingRatesResult.h>
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingsResult.h>
#include <aws/savingsplans/model/ListTagsForResourceResult.h>
#include <aws/savingsplans/model/TagResourceResult.h>
#include <aws/savingsplans/model/UntagResourceResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace SavingsPlans
{
namespace Model
{
class CreateSavingsPlanRequest;
class DescribeSavingsPlanRatesRequest;
class DescribeSavingsPlansRequest;
class DescribeSavingsPlansOfferingRatesRequest;
class DescribeSavingsPlansOfferingsRequest;
class ListTagsForResourceRequest;
class TagResourceRequest;
class UntagResourceRequest;
typedef Aws::Utils::Outcome<CreateSavingsPlanResult, SavingsPlansError> CreateSavingsPlanOutcome;
typedef Aws::Utils::Outcome<DescribeSavingsPlanRatesResult, SavingsPlansError> DescribeSavingsPlanRatesOutcome;
typedef Aws::Utils::Outcome<DescribeSavingsPlansResult, SavingsPlansError> DescribeSavingsPlansOutcome;
typedef Aws::Utils::Outcome<DescribeSavingsPlansOfferingRatesResult, SavingsPlansError> DescribeSavingsPlansOfferingRatesOutcome;
typedef Aws::Utils::Outcome<DescribeSavingsPlansOfferingsResult, SavingsPlansError> DescribeSavingsPlansOfferingsOutcome;
typedef Aws::Utils::Outcome<ListTagsForResourceResult, SavingsPlansError> ListTagsForResourceOutcome;
typedef Aws::Utils::Outcome<TagResourceResult, SavingsPlansError> TagResourceOutcome;
typedef Aws::Utils::Outcome<UntagResourceResult, SavingsPlansError> UntagResourceOutcome;
typedef std::future<CreateSavingsPlanOutcome> CreateSavingsPlanOutcomeCallable;
typedef std::future<DescribeSavingsPlanRatesOutcome> DescribeSavingsPlanRatesOutcomeCallable;
typedef std::future<DescribeSavingsPlansOutcome> DescribeSavingsPlansOutcomeCallable;
typedef std::future<DescribeSavingsPlansOfferingRatesOutcome> DescribeSavingsPlansOfferingRatesOutcomeCallable;
typedef std::future<DescribeSavingsPlansOfferingsOutcome> DescribeSavingsPlansOfferingsOutcomeCallable;
typedef std::future<ListTagsForResourceOutcome> ListTagsForResourceOutcomeCallable;
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
typedef std::future<UntagResourceOutcome> UntagResourceOutcomeCallable;
} // namespace Model
class SavingsPlansClient;
typedef std::function<void(const SavingsPlansClient*, const Model::CreateSavingsPlanRequest&, const Model::CreateSavingsPlanOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateSavingsPlanResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::DescribeSavingsPlanRatesRequest&, const Model::DescribeSavingsPlanRatesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeSavingsPlanRatesResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::DescribeSavingsPlansRequest&, const Model::DescribeSavingsPlansOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeSavingsPlansResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::DescribeSavingsPlansOfferingRatesRequest&, const Model::DescribeSavingsPlansOfferingRatesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeSavingsPlansOfferingRatesResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::DescribeSavingsPlansOfferingsRequest&, const Model::DescribeSavingsPlansOfferingsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeSavingsPlansOfferingsResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::ListTagsForResourceRequest&, const Model::ListTagsForResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListTagsForResourceResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::TagResourceRequest&, const Model::TagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TagResourceResponseReceivedHandler;
typedef std::function<void(const SavingsPlansClient*, const Model::UntagResourceRequest&, const Model::UntagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UntagResourceResponseReceivedHandler;
/**
* <p>Savings Plans are a pricing model that offer significant savings on AWS usage
* (for example, on Amazon EC2 instances). You commit to a consistent amount of
* usage, in USD per hour, for a term of 1 or 3 years, and receive a lower price
* for that usage. For more information, see the <a
* href="https://docs.aws.amazon.com/savingsplans/latest/userguide/">AWS Savings
* Plans User Guide</a>.</p>
*/
class AWS_SAVINGSPLANS_API SavingsPlansClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SavingsPlansClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
SavingsPlansClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
SavingsPlansClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~SavingsPlansClient();
/**
* <p>Creates a Savings Plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/CreateSavingsPlan">AWS
* API Reference</a></p>
*/
virtual Model::CreateSavingsPlanOutcome CreateSavingsPlan(const Model::CreateSavingsPlanRequest& request) const;
/**
* <p>Creates a Savings Plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/CreateSavingsPlan">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateSavingsPlanOutcomeCallable CreateSavingsPlanCallable(const Model::CreateSavingsPlanRequest& request) const;
/**
* <p>Creates a Savings Plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/CreateSavingsPlan">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateSavingsPlanAsync(const Model::CreateSavingsPlanRequest& request, const CreateSavingsPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the specified Savings Plans rates.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlanRates">AWS
* API Reference</a></p>
*/
virtual Model::DescribeSavingsPlanRatesOutcome DescribeSavingsPlanRates(const Model::DescribeSavingsPlanRatesRequest& request) const;
/**
* <p>Describes the specified Savings Plans rates.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlanRates">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlanRatesOutcomeCallable DescribeSavingsPlanRatesCallable(const Model::DescribeSavingsPlanRatesRequest& request) const;
/**
* <p>Describes the specified Savings Plans rates.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlanRates">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlanRatesAsync(const Model::DescribeSavingsPlanRatesRequest& request, const DescribeSavingsPlanRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the specified Savings Plans.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlans">AWS
* API Reference</a></p>
*/
virtual Model::DescribeSavingsPlansOutcome DescribeSavingsPlans(const Model::DescribeSavingsPlansRequest& request) const;
/**
* <p>Describes the specified Savings Plans.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlans">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlansOutcomeCallable DescribeSavingsPlansCallable(const Model::DescribeSavingsPlansRequest& request) const;
/**
* <p>Describes the specified Savings Plans.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlans">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlansAsync(const Model::DescribeSavingsPlansRequest& request, const DescribeSavingsPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the specified Savings Plans offering rates.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlansOfferingRates">AWS
* API Reference</a></p>
*/
virtual Model::DescribeSavingsPlansOfferingRatesOutcome DescribeSavingsPlansOfferingRates(const Model::DescribeSavingsPlansOfferingRatesRequest& request) const;
/**
* <p>Describes the specified Savings Plans offering rates.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlansOfferingRates">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlansOfferingRatesOutcomeCallable DescribeSavingsPlansOfferingRatesCallable(const Model::DescribeSavingsPlansOfferingRatesRequest& request) const;
/**
* <p>Describes the specified Savings Plans offering rates.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlansOfferingRates">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlansOfferingRatesAsync(const Model::DescribeSavingsPlansOfferingRatesRequest& request, const DescribeSavingsPlansOfferingRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Describes the specified Savings Plans offerings.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlansOfferings">AWS
* API Reference</a></p>
*/
virtual Model::DescribeSavingsPlansOfferingsOutcome DescribeSavingsPlansOfferings(const Model::DescribeSavingsPlansOfferingsRequest& request) const;
/**
* <p>Describes the specified Savings Plans offerings.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlansOfferings">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeSavingsPlansOfferingsOutcomeCallable DescribeSavingsPlansOfferingsCallable(const Model::DescribeSavingsPlansOfferingsRequest& request) const;
/**
* <p>Describes the specified Savings Plans offerings.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/DescribeSavingsPlansOfferings">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeSavingsPlansOfferingsAsync(const Model::DescribeSavingsPlansOfferingsRequest& request, const DescribeSavingsPlansOfferingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the tags for the specified resource.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ListTagsForResource">AWS
* API Reference</a></p>
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* <p>Lists the tags for the specified resource.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ListTagsForResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const Model::ListTagsForResourceRequest& request) const;
/**
* <p>Lists the tags for the specified resource.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ListTagsForResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListTagsForResourceAsync(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Adds the specified tags to the specified resource.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/TagResource">AWS
* API Reference</a></p>
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* <p>Adds the specified tags to the specified resource.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/TagResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const;
/**
* <p>Adds the specified tags to the specified resource.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/TagResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void TagResourceAsync(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Removes the specified tags from the specified resource.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/UntagResource">AWS
* API Reference</a></p>
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* <p>Removes the specified tags from the specified resource.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/UntagResource">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UntagResourceOutcomeCallable UntagResourceCallable(const Model::UntagResourceRequest& request) const;
/**
* <p>Removes the specified tags from the specified resource.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/UntagResource">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UntagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void CreateSavingsPlanAsyncHelper(const Model::CreateSavingsPlanRequest& request, const CreateSavingsPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeSavingsPlanRatesAsyncHelper(const Model::DescribeSavingsPlanRatesRequest& request, const DescribeSavingsPlanRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeSavingsPlansAsyncHelper(const Model::DescribeSavingsPlansRequest& request, const DescribeSavingsPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeSavingsPlansOfferingRatesAsyncHelper(const Model::DescribeSavingsPlansOfferingRatesRequest& request, const DescribeSavingsPlansOfferingRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void DescribeSavingsPlansOfferingsAsyncHelper(const Model::DescribeSavingsPlansOfferingsRequest& request, const DescribeSavingsPlansOfferingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void TagResourceAsyncHelper(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UntagResourceAsyncHelper(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace SavingsPlansEndpoint
{
AWS_SAVINGSPLANS_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace SavingsPlansEndpoint
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_SAVINGSPLANS_API SavingsPlansErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,73 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
namespace Aws
{
namespace SavingsPlans
{
enum class SavingsPlansErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
INTERNAL_SERVER= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
SERVICE_QUOTA_EXCEEDED
};
class AWS_SAVINGSPLANS_API SavingsPlansError : public Aws::Client::AWSError<SavingsPlansErrors>
{
public:
SavingsPlansError() {}
SavingsPlansError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<SavingsPlansErrors>(rhs) {}
SavingsPlansError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<SavingsPlansErrors>(rhs) {}
SavingsPlansError(const Aws::Client::AWSError<SavingsPlansErrors>& rhs) : Aws::Client::AWSError<SavingsPlansErrors>(rhs) {}
SavingsPlansError(Aws::Client::AWSError<SavingsPlansErrors>&& rhs) : Aws::Client::AWSError<SavingsPlansErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace SavingsPlansErrorMapper
{
AWS_SAVINGSPLANS_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace SavingsPlans
{
class AWS_SAVINGSPLANS_API SavingsPlansRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~SavingsPlansRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_0 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2019-06-28"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_SAVINGSPLANS_EXPORTS
#define AWS_SAVINGSPLANS_API __declspec(dllexport)
#else
#define AWS_SAVINGSPLANS_API __declspec(dllimport)
#endif /* AWS_SAVINGSPLANS_EXPORTS */
#else
#define AWS_SAVINGSPLANS_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_SAVINGSPLANS_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,318 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API CreateSavingsPlanRequest : public SavingsPlansRequest
{
public:
CreateSavingsPlanRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "CreateSavingsPlan"; }
Aws::String SerializePayload() const override;
/**
* <p>The ID of the offering.</p>
*/
inline const Aws::String& GetSavingsPlanOfferingId() const{ return m_savingsPlanOfferingId; }
/**
* <p>The ID of the offering.</p>
*/
inline bool SavingsPlanOfferingIdHasBeenSet() const { return m_savingsPlanOfferingIdHasBeenSet; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetSavingsPlanOfferingId(const Aws::String& value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId = value; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetSavingsPlanOfferingId(Aws::String&& value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId = std::move(value); }
/**
* <p>The ID of the offering.</p>
*/
inline void SetSavingsPlanOfferingId(const char* value) { m_savingsPlanOfferingIdHasBeenSet = true; m_savingsPlanOfferingId.assign(value); }
/**
* <p>The ID of the offering.</p>
*/
inline CreateSavingsPlanRequest& WithSavingsPlanOfferingId(const Aws::String& value) { SetSavingsPlanOfferingId(value); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline CreateSavingsPlanRequest& WithSavingsPlanOfferingId(Aws::String&& value) { SetSavingsPlanOfferingId(std::move(value)); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline CreateSavingsPlanRequest& WithSavingsPlanOfferingId(const char* value) { SetSavingsPlanOfferingId(value); return *this;}
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline const Aws::String& GetCommitment() const{ return m_commitment; }
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; }
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline void SetCommitment(const Aws::String& value) { m_commitmentHasBeenSet = true; m_commitment = value; }
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline void SetCommitment(Aws::String&& value) { m_commitmentHasBeenSet = true; m_commitment = std::move(value); }
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline void SetCommitment(const char* value) { m_commitmentHasBeenSet = true; m_commitment.assign(value); }
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline CreateSavingsPlanRequest& WithCommitment(const Aws::String& value) { SetCommitment(value); return *this;}
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline CreateSavingsPlanRequest& WithCommitment(Aws::String&& value) { SetCommitment(std::move(value)); return *this;}
/**
* <p>The hourly commitment, in USD. This is a value between 0.001 and 1 million.
* You cannot specify more than three digits after the decimal point.</p>
*/
inline CreateSavingsPlanRequest& WithCommitment(const char* value) { SetCommitment(value); return *this;}
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline const Aws::String& GetUpfrontPaymentAmount() const{ return m_upfrontPaymentAmount; }
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; }
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline void SetUpfrontPaymentAmount(const Aws::String& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = value; }
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline void SetUpfrontPaymentAmount(Aws::String&& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = std::move(value); }
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline void SetUpfrontPaymentAmount(const char* value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount.assign(value); }
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline CreateSavingsPlanRequest& WithUpfrontPaymentAmount(const Aws::String& value) { SetUpfrontPaymentAmount(value); return *this;}
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline CreateSavingsPlanRequest& WithUpfrontPaymentAmount(Aws::String&& value) { SetUpfrontPaymentAmount(std::move(value)); return *this;}
/**
* <p>The up-front payment amount. This is a whole number between 50 and 99 percent
* of the total value of the Savings Plan. This parameter is supported only if the
* payment option is <code>Partial Upfront</code>.</p>
*/
inline CreateSavingsPlanRequest& WithUpfrontPaymentAmount(const char* value) { SetUpfrontPaymentAmount(value); return *this;}
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline const Aws::String& GetClientToken() const{ return m_clientToken; }
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline CreateSavingsPlanRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline CreateSavingsPlanRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
/**
* <p>Unique, case-sensitive identifier that you provide to ensure the idempotency
* of the request.</p>
*/
inline CreateSavingsPlanRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
/**
* <p>One or more tags.</p>
*/
inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
/**
* <p>One or more tags.</p>
*/
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
/**
* <p>One or more tags.</p>
*/
inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
/**
* <p>One or more tags.</p>
*/
inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>One or more tags.</p>
*/
inline CreateSavingsPlanRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
private:
Aws::String m_savingsPlanOfferingId;
bool m_savingsPlanOfferingIdHasBeenSet;
Aws::String m_commitment;
bool m_commitmentHasBeenSet;
Aws::String m_upfrontPaymentAmount;
bool m_upfrontPaymentAmountHasBeenSet;
Aws::String m_clientToken;
bool m_clientTokenHasBeenSet;
Aws::Map<Aws::String, Aws::String> m_tags;
bool m_tagsHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API CreateSavingsPlanResult
{
public:
CreateSavingsPlanResult();
CreateSavingsPlanResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
CreateSavingsPlanResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The ID of the Savings Plan.</p>
*/
inline const Aws::String& GetSavingsPlanId() const{ return m_savingsPlanId; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const Aws::String& value) { m_savingsPlanId = value; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(Aws::String&& value) { m_savingsPlanId = std::move(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const char* value) { m_savingsPlanId.assign(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline CreateSavingsPlanResult& WithSavingsPlanId(const Aws::String& value) { SetSavingsPlanId(value); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline CreateSavingsPlanResult& WithSavingsPlanId(Aws::String&& value) { SetSavingsPlanId(std::move(value)); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline CreateSavingsPlanResult& WithSavingsPlanId(const char* value) { SetSavingsPlanId(value); return *this;}
private:
Aws::String m_savingsPlanId;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class CurrencyCode
{
NOT_SET,
CNY,
USD
};
namespace CurrencyCodeMapper
{
AWS_SAVINGSPLANS_API CurrencyCode GetCurrencyCodeForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForCurrencyCode(CurrencyCode value);
} // namespace CurrencyCodeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,201 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/SavingsPlanRateFilter.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API DescribeSavingsPlanRatesRequest : public SavingsPlansRequest
{
public:
DescribeSavingsPlanRatesRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeSavingsPlanRates"; }
Aws::String SerializePayload() const override;
/**
* <p>The ID of the Savings Plan.</p>
*/
inline const Aws::String& GetSavingsPlanId() const{ return m_savingsPlanId; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline bool SavingsPlanIdHasBeenSet() const { return m_savingsPlanIdHasBeenSet; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const Aws::String& value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = value; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(Aws::String&& value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = std::move(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const char* value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId.assign(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithSavingsPlanId(const Aws::String& value) { SetSavingsPlanId(value); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithSavingsPlanId(Aws::String&& value) { SetSavingsPlanId(std::move(value)); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithSavingsPlanId(const char* value) { SetSavingsPlanId(value); return *this;}
/**
* <p>The filters.</p>
*/
inline const Aws::Vector<SavingsPlanRateFilter>& GetFilters() const{ return m_filters; }
/**
* <p>The filters.</p>
*/
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(const Aws::Vector<SavingsPlanRateFilter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(Aws::Vector<SavingsPlanRateFilter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithFilters(const Aws::Vector<SavingsPlanRateFilter>& value) { SetFilters(value); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithFilters(Aws::Vector<SavingsPlanRateFilter>&& value) { SetFilters(std::move(value)); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlanRatesRequest& AddFilters(const SavingsPlanRateFilter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlanRatesRequest& AddFilters(SavingsPlanRateFilter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
/**
* <p>The token for the next page of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next page of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline DescribeSavingsPlanRatesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::String m_savingsPlanId;
bool m_savingsPlanIdHasBeenSet;
Aws::Vector<SavingsPlanRateFilter> m_filters;
bool m_filtersHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,162 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/SavingsPlanRate.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API DescribeSavingsPlanRatesResult
{
public:
DescribeSavingsPlanRatesResult();
DescribeSavingsPlanRatesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeSavingsPlanRatesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The ID of the Savings Plan.</p>
*/
inline const Aws::String& GetSavingsPlanId() const{ return m_savingsPlanId; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const Aws::String& value) { m_savingsPlanId = value; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(Aws::String&& value) { m_savingsPlanId = std::move(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const char* value) { m_savingsPlanId.assign(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline DescribeSavingsPlanRatesResult& WithSavingsPlanId(const Aws::String& value) { SetSavingsPlanId(value); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline DescribeSavingsPlanRatesResult& WithSavingsPlanId(Aws::String&& value) { SetSavingsPlanId(std::move(value)); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline DescribeSavingsPlanRatesResult& WithSavingsPlanId(const char* value) { SetSavingsPlanId(value); return *this;}
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline const Aws::Vector<SavingsPlanRate>& GetSearchResults() const{ return m_searchResults; }
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline void SetSearchResults(const Aws::Vector<SavingsPlanRate>& value) { m_searchResults = value; }
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline void SetSearchResults(Aws::Vector<SavingsPlanRate>&& value) { m_searchResults = std::move(value); }
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline DescribeSavingsPlanRatesResult& WithSearchResults(const Aws::Vector<SavingsPlanRate>& value) { SetSearchResults(value); return *this;}
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline DescribeSavingsPlanRatesResult& WithSearchResults(Aws::Vector<SavingsPlanRate>&& value) { SetSearchResults(std::move(value)); return *this;}
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline DescribeSavingsPlanRatesResult& AddSearchResults(const SavingsPlanRate& value) { m_searchResults.push_back(value); return *this; }
/**
* <p>Information about the Savings Plans rates.</p>
*/
inline DescribeSavingsPlanRatesResult& AddSearchResults(SavingsPlanRate&& value) { m_searchResults.push_back(std::move(value)); return *this; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlanRatesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlanRatesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlanRatesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::String m_savingsPlanId;
Aws::Vector<SavingsPlanRate> m_searchResults;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,484 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
#include <aws/savingsplans/model/SavingsPlanType.h>
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <aws/savingsplans/model/SavingsPlanRateServiceCode.h>
#include <aws/savingsplans/model/SavingsPlanOfferingRateFilterElement.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API DescribeSavingsPlansOfferingRatesRequest : public SavingsPlansRequest
{
public:
DescribeSavingsPlansOfferingRatesRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeSavingsPlansOfferingRates"; }
Aws::String SerializePayload() const override;
/**
* <p>The IDs of the offerings.</p>
*/
inline const Aws::Vector<Aws::String>& GetSavingsPlanOfferingIds() const{ return m_savingsPlanOfferingIds; }
/**
* <p>The IDs of the offerings.</p>
*/
inline bool SavingsPlanOfferingIdsHasBeenSet() const { return m_savingsPlanOfferingIdsHasBeenSet; }
/**
* <p>The IDs of the offerings.</p>
*/
inline void SetSavingsPlanOfferingIds(const Aws::Vector<Aws::String>& value) { m_savingsPlanOfferingIdsHasBeenSet = true; m_savingsPlanOfferingIds = value; }
/**
* <p>The IDs of the offerings.</p>
*/
inline void SetSavingsPlanOfferingIds(Aws::Vector<Aws::String>&& value) { m_savingsPlanOfferingIdsHasBeenSet = true; m_savingsPlanOfferingIds = std::move(value); }
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithSavingsPlanOfferingIds(const Aws::Vector<Aws::String>& value) { SetSavingsPlanOfferingIds(value); return *this;}
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithSavingsPlanOfferingIds(Aws::Vector<Aws::String>&& value) { SetSavingsPlanOfferingIds(std::move(value)); return *this;}
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanOfferingIds(const Aws::String& value) { m_savingsPlanOfferingIdsHasBeenSet = true; m_savingsPlanOfferingIds.push_back(value); return *this; }
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanOfferingIds(Aws::String&& value) { m_savingsPlanOfferingIdsHasBeenSet = true; m_savingsPlanOfferingIds.push_back(std::move(value)); return *this; }
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanOfferingIds(const char* value) { m_savingsPlanOfferingIdsHasBeenSet = true; m_savingsPlanOfferingIds.push_back(value); return *this; }
/**
* <p>The payment options.</p>
*/
inline const Aws::Vector<SavingsPlanPaymentOption>& GetSavingsPlanPaymentOptions() const{ return m_savingsPlanPaymentOptions; }
/**
* <p>The payment options.</p>
*/
inline bool SavingsPlanPaymentOptionsHasBeenSet() const { return m_savingsPlanPaymentOptionsHasBeenSet; }
/**
* <p>The payment options.</p>
*/
inline void SetSavingsPlanPaymentOptions(const Aws::Vector<SavingsPlanPaymentOption>& value) { m_savingsPlanPaymentOptionsHasBeenSet = true; m_savingsPlanPaymentOptions = value; }
/**
* <p>The payment options.</p>
*/
inline void SetSavingsPlanPaymentOptions(Aws::Vector<SavingsPlanPaymentOption>&& value) { m_savingsPlanPaymentOptionsHasBeenSet = true; m_savingsPlanPaymentOptions = std::move(value); }
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithSavingsPlanPaymentOptions(const Aws::Vector<SavingsPlanPaymentOption>& value) { SetSavingsPlanPaymentOptions(value); return *this;}
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithSavingsPlanPaymentOptions(Aws::Vector<SavingsPlanPaymentOption>&& value) { SetSavingsPlanPaymentOptions(std::move(value)); return *this;}
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanPaymentOptions(const SavingsPlanPaymentOption& value) { m_savingsPlanPaymentOptionsHasBeenSet = true; m_savingsPlanPaymentOptions.push_back(value); return *this; }
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanPaymentOptions(SavingsPlanPaymentOption&& value) { m_savingsPlanPaymentOptionsHasBeenSet = true; m_savingsPlanPaymentOptions.push_back(std::move(value)); return *this; }
/**
* <p>The plan types.</p>
*/
inline const Aws::Vector<SavingsPlanType>& GetSavingsPlanTypes() const{ return m_savingsPlanTypes; }
/**
* <p>The plan types.</p>
*/
inline bool SavingsPlanTypesHasBeenSet() const { return m_savingsPlanTypesHasBeenSet; }
/**
* <p>The plan types.</p>
*/
inline void SetSavingsPlanTypes(const Aws::Vector<SavingsPlanType>& value) { m_savingsPlanTypesHasBeenSet = true; m_savingsPlanTypes = value; }
/**
* <p>The plan types.</p>
*/
inline void SetSavingsPlanTypes(Aws::Vector<SavingsPlanType>&& value) { m_savingsPlanTypesHasBeenSet = true; m_savingsPlanTypes = std::move(value); }
/**
* <p>The plan types.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithSavingsPlanTypes(const Aws::Vector<SavingsPlanType>& value) { SetSavingsPlanTypes(value); return *this;}
/**
* <p>The plan types.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithSavingsPlanTypes(Aws::Vector<SavingsPlanType>&& value) { SetSavingsPlanTypes(std::move(value)); return *this;}
/**
* <p>The plan types.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanTypes(const SavingsPlanType& value) { m_savingsPlanTypesHasBeenSet = true; m_savingsPlanTypes.push_back(value); return *this; }
/**
* <p>The plan types.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddSavingsPlanTypes(SavingsPlanType&& value) { m_savingsPlanTypesHasBeenSet = true; m_savingsPlanTypes.push_back(std::move(value)); return *this; }
/**
* <p>The AWS products.</p>
*/
inline const Aws::Vector<SavingsPlanProductType>& GetProducts() const{ return m_products; }
/**
* <p>The AWS products.</p>
*/
inline bool ProductsHasBeenSet() const { return m_productsHasBeenSet; }
/**
* <p>The AWS products.</p>
*/
inline void SetProducts(const Aws::Vector<SavingsPlanProductType>& value) { m_productsHasBeenSet = true; m_products = value; }
/**
* <p>The AWS products.</p>
*/
inline void SetProducts(Aws::Vector<SavingsPlanProductType>&& value) { m_productsHasBeenSet = true; m_products = std::move(value); }
/**
* <p>The AWS products.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithProducts(const Aws::Vector<SavingsPlanProductType>& value) { SetProducts(value); return *this;}
/**
* <p>The AWS products.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithProducts(Aws::Vector<SavingsPlanProductType>&& value) { SetProducts(std::move(value)); return *this;}
/**
* <p>The AWS products.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddProducts(const SavingsPlanProductType& value) { m_productsHasBeenSet = true; m_products.push_back(value); return *this; }
/**
* <p>The AWS products.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddProducts(SavingsPlanProductType&& value) { m_productsHasBeenSet = true; m_products.push_back(std::move(value)); return *this; }
/**
* <p>The services.</p>
*/
inline const Aws::Vector<SavingsPlanRateServiceCode>& GetServiceCodes() const{ return m_serviceCodes; }
/**
* <p>The services.</p>
*/
inline bool ServiceCodesHasBeenSet() const { return m_serviceCodesHasBeenSet; }
/**
* <p>The services.</p>
*/
inline void SetServiceCodes(const Aws::Vector<SavingsPlanRateServiceCode>& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes = value; }
/**
* <p>The services.</p>
*/
inline void SetServiceCodes(Aws::Vector<SavingsPlanRateServiceCode>&& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes = std::move(value); }
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithServiceCodes(const Aws::Vector<SavingsPlanRateServiceCode>& value) { SetServiceCodes(value); return *this;}
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithServiceCodes(Aws::Vector<SavingsPlanRateServiceCode>&& value) { SetServiceCodes(std::move(value)); return *this;}
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddServiceCodes(const SavingsPlanRateServiceCode& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes.push_back(value); return *this; }
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddServiceCodes(SavingsPlanRateServiceCode&& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes.push_back(std::move(value)); return *this; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline const Aws::Vector<Aws::String>& GetUsageTypes() const{ return m_usageTypes; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline bool UsageTypesHasBeenSet() const { return m_usageTypesHasBeenSet; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageTypes(const Aws::Vector<Aws::String>& value) { m_usageTypesHasBeenSet = true; m_usageTypes = value; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageTypes(Aws::Vector<Aws::String>&& value) { m_usageTypesHasBeenSet = true; m_usageTypes = std::move(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithUsageTypes(const Aws::Vector<Aws::String>& value) { SetUsageTypes(value); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithUsageTypes(Aws::Vector<Aws::String>&& value) { SetUsageTypes(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddUsageTypes(const Aws::String& value) { m_usageTypesHasBeenSet = true; m_usageTypes.push_back(value); return *this; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddUsageTypes(Aws::String&& value) { m_usageTypesHasBeenSet = true; m_usageTypes.push_back(std::move(value)); return *this; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddUsageTypes(const char* value) { m_usageTypesHasBeenSet = true; m_usageTypes.push_back(value); return *this; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline const Aws::Vector<Aws::String>& GetOperations() const{ return m_operations; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperations(const Aws::Vector<Aws::String>& value) { m_operationsHasBeenSet = true; m_operations = value; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperations(Aws::Vector<Aws::String>&& value) { m_operationsHasBeenSet = true; m_operations = std::move(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithOperations(const Aws::Vector<Aws::String>& value) { SetOperations(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithOperations(Aws::Vector<Aws::String>&& value) { SetOperations(std::move(value)); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddOperations(const Aws::String& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddOperations(Aws::String&& value) { m_operationsHasBeenSet = true; m_operations.push_back(std::move(value)); return *this; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddOperations(const char* value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
/**
* <p>The filters.</p>
*/
inline const Aws::Vector<SavingsPlanOfferingRateFilterElement>& GetFilters() const{ return m_filters; }
/**
* <p>The filters.</p>
*/
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(const Aws::Vector<SavingsPlanOfferingRateFilterElement>& value) { m_filtersHasBeenSet = true; m_filters = value; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(Aws::Vector<SavingsPlanOfferingRateFilterElement>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithFilters(const Aws::Vector<SavingsPlanOfferingRateFilterElement>& value) { SetFilters(value); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithFilters(Aws::Vector<SavingsPlanOfferingRateFilterElement>&& value) { SetFilters(std::move(value)); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddFilters(const SavingsPlanOfferingRateFilterElement& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& AddFilters(SavingsPlanOfferingRateFilterElement&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
/**
* <p>The token for the next page of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next page of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline DescribeSavingsPlansOfferingRatesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::Vector<Aws::String> m_savingsPlanOfferingIds;
bool m_savingsPlanOfferingIdsHasBeenSet;
Aws::Vector<SavingsPlanPaymentOption> m_savingsPlanPaymentOptions;
bool m_savingsPlanPaymentOptionsHasBeenSet;
Aws::Vector<SavingsPlanType> m_savingsPlanTypes;
bool m_savingsPlanTypesHasBeenSet;
Aws::Vector<SavingsPlanProductType> m_products;
bool m_productsHasBeenSet;
Aws::Vector<SavingsPlanRateServiceCode> m_serviceCodes;
bool m_serviceCodesHasBeenSet;
Aws::Vector<Aws::String> m_usageTypes;
bool m_usageTypesHasBeenSet;
Aws::Vector<Aws::String> m_operations;
bool m_operationsHasBeenSet;
Aws::Vector<SavingsPlanOfferingRateFilterElement> m_filters;
bool m_filtersHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanOfferingRate.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API DescribeSavingsPlansOfferingRatesResult
{
public:
DescribeSavingsPlansOfferingRatesResult();
DescribeSavingsPlansOfferingRatesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeSavingsPlansOfferingRatesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline const Aws::Vector<SavingsPlanOfferingRate>& GetSearchResults() const{ return m_searchResults; }
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline void SetSearchResults(const Aws::Vector<SavingsPlanOfferingRate>& value) { m_searchResults = value; }
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline void SetSearchResults(Aws::Vector<SavingsPlanOfferingRate>&& value) { m_searchResults = std::move(value); }
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& WithSearchResults(const Aws::Vector<SavingsPlanOfferingRate>& value) { SetSearchResults(value); return *this;}
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& WithSearchResults(Aws::Vector<SavingsPlanOfferingRate>&& value) { SetSearchResults(std::move(value)); return *this;}
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& AddSearchResults(const SavingsPlanOfferingRate& value) { m_searchResults.push_back(value); return *this; }
/**
* <p>Information about the Savings Plans offering rates.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& AddSearchResults(SavingsPlanOfferingRate&& value) { m_searchResults.push_back(std::move(value)); return *this; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansOfferingRatesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<SavingsPlanOfferingRate> m_searchResults;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,611 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
#include <aws/savingsplans/model/SavingsPlanType.h>
#include <aws/savingsplans/model/CurrencyCode.h>
#include <aws/savingsplans/model/SavingsPlanOfferingFilterElement.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API DescribeSavingsPlansOfferingsRequest : public SavingsPlansRequest
{
public:
DescribeSavingsPlansOfferingsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeSavingsPlansOfferings"; }
Aws::String SerializePayload() const override;
/**
* <p>The IDs of the offerings.</p>
*/
inline const Aws::Vector<Aws::String>& GetOfferingIds() const{ return m_offeringIds; }
/**
* <p>The IDs of the offerings.</p>
*/
inline bool OfferingIdsHasBeenSet() const { return m_offeringIdsHasBeenSet; }
/**
* <p>The IDs of the offerings.</p>
*/
inline void SetOfferingIds(const Aws::Vector<Aws::String>& value) { m_offeringIdsHasBeenSet = true; m_offeringIds = value; }
/**
* <p>The IDs of the offerings.</p>
*/
inline void SetOfferingIds(Aws::Vector<Aws::String>&& value) { m_offeringIdsHasBeenSet = true; m_offeringIds = std::move(value); }
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithOfferingIds(const Aws::Vector<Aws::String>& value) { SetOfferingIds(value); return *this;}
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithOfferingIds(Aws::Vector<Aws::String>&& value) { SetOfferingIds(std::move(value)); return *this;}
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddOfferingIds(const Aws::String& value) { m_offeringIdsHasBeenSet = true; m_offeringIds.push_back(value); return *this; }
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddOfferingIds(Aws::String&& value) { m_offeringIdsHasBeenSet = true; m_offeringIds.push_back(std::move(value)); return *this; }
/**
* <p>The IDs of the offerings.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddOfferingIds(const char* value) { m_offeringIdsHasBeenSet = true; m_offeringIds.push_back(value); return *this; }
/**
* <p>The payment options.</p>
*/
inline const Aws::Vector<SavingsPlanPaymentOption>& GetPaymentOptions() const{ return m_paymentOptions; }
/**
* <p>The payment options.</p>
*/
inline bool PaymentOptionsHasBeenSet() const { return m_paymentOptionsHasBeenSet; }
/**
* <p>The payment options.</p>
*/
inline void SetPaymentOptions(const Aws::Vector<SavingsPlanPaymentOption>& value) { m_paymentOptionsHasBeenSet = true; m_paymentOptions = value; }
/**
* <p>The payment options.</p>
*/
inline void SetPaymentOptions(Aws::Vector<SavingsPlanPaymentOption>&& value) { m_paymentOptionsHasBeenSet = true; m_paymentOptions = std::move(value); }
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithPaymentOptions(const Aws::Vector<SavingsPlanPaymentOption>& value) { SetPaymentOptions(value); return *this;}
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithPaymentOptions(Aws::Vector<SavingsPlanPaymentOption>&& value) { SetPaymentOptions(std::move(value)); return *this;}
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddPaymentOptions(const SavingsPlanPaymentOption& value) { m_paymentOptionsHasBeenSet = true; m_paymentOptions.push_back(value); return *this; }
/**
* <p>The payment options.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddPaymentOptions(SavingsPlanPaymentOption&& value) { m_paymentOptionsHasBeenSet = true; m_paymentOptions.push_back(std::move(value)); return *this; }
/**
* <p>The product type.</p>
*/
inline const SavingsPlanProductType& GetProductType() const{ return m_productType; }
/**
* <p>The product type.</p>
*/
inline bool ProductTypeHasBeenSet() const { return m_productTypeHasBeenSet; }
/**
* <p>The product type.</p>
*/
inline void SetProductType(const SavingsPlanProductType& value) { m_productTypeHasBeenSet = true; m_productType = value; }
/**
* <p>The product type.</p>
*/
inline void SetProductType(SavingsPlanProductType&& value) { m_productTypeHasBeenSet = true; m_productType = std::move(value); }
/**
* <p>The product type.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithProductType(const SavingsPlanProductType& value) { SetProductType(value); return *this;}
/**
* <p>The product type.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithProductType(SavingsPlanProductType&& value) { SetProductType(std::move(value)); return *this;}
/**
* <p>The plan type.</p>
*/
inline const Aws::Vector<SavingsPlanType>& GetPlanTypes() const{ return m_planTypes; }
/**
* <p>The plan type.</p>
*/
inline bool PlanTypesHasBeenSet() const { return m_planTypesHasBeenSet; }
/**
* <p>The plan type.</p>
*/
inline void SetPlanTypes(const Aws::Vector<SavingsPlanType>& value) { m_planTypesHasBeenSet = true; m_planTypes = value; }
/**
* <p>The plan type.</p>
*/
inline void SetPlanTypes(Aws::Vector<SavingsPlanType>&& value) { m_planTypesHasBeenSet = true; m_planTypes = std::move(value); }
/**
* <p>The plan type.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithPlanTypes(const Aws::Vector<SavingsPlanType>& value) { SetPlanTypes(value); return *this;}
/**
* <p>The plan type.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithPlanTypes(Aws::Vector<SavingsPlanType>&& value) { SetPlanTypes(std::move(value)); return *this;}
/**
* <p>The plan type.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddPlanTypes(const SavingsPlanType& value) { m_planTypesHasBeenSet = true; m_planTypes.push_back(value); return *this; }
/**
* <p>The plan type.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddPlanTypes(SavingsPlanType&& value) { m_planTypesHasBeenSet = true; m_planTypes.push_back(std::move(value)); return *this; }
/**
* <p>The durations, in seconds.</p>
*/
inline const Aws::Vector<long long>& GetDurations() const{ return m_durations; }
/**
* <p>The durations, in seconds.</p>
*/
inline bool DurationsHasBeenSet() const { return m_durationsHasBeenSet; }
/**
* <p>The durations, in seconds.</p>
*/
inline void SetDurations(const Aws::Vector<long long>& value) { m_durationsHasBeenSet = true; m_durations = value; }
/**
* <p>The durations, in seconds.</p>
*/
inline void SetDurations(Aws::Vector<long long>&& value) { m_durationsHasBeenSet = true; m_durations = std::move(value); }
/**
* <p>The durations, in seconds.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithDurations(const Aws::Vector<long long>& value) { SetDurations(value); return *this;}
/**
* <p>The durations, in seconds.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithDurations(Aws::Vector<long long>&& value) { SetDurations(std::move(value)); return *this;}
/**
* <p>The durations, in seconds.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddDurations(long long value) { m_durationsHasBeenSet = true; m_durations.push_back(value); return *this; }
/**
* <p>The currencies.</p>
*/
inline const Aws::Vector<CurrencyCode>& GetCurrencies() const{ return m_currencies; }
/**
* <p>The currencies.</p>
*/
inline bool CurrenciesHasBeenSet() const { return m_currenciesHasBeenSet; }
/**
* <p>The currencies.</p>
*/
inline void SetCurrencies(const Aws::Vector<CurrencyCode>& value) { m_currenciesHasBeenSet = true; m_currencies = value; }
/**
* <p>The currencies.</p>
*/
inline void SetCurrencies(Aws::Vector<CurrencyCode>&& value) { m_currenciesHasBeenSet = true; m_currencies = std::move(value); }
/**
* <p>The currencies.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithCurrencies(const Aws::Vector<CurrencyCode>& value) { SetCurrencies(value); return *this;}
/**
* <p>The currencies.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithCurrencies(Aws::Vector<CurrencyCode>&& value) { SetCurrencies(std::move(value)); return *this;}
/**
* <p>The currencies.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddCurrencies(const CurrencyCode& value) { m_currenciesHasBeenSet = true; m_currencies.push_back(value); return *this; }
/**
* <p>The currencies.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddCurrencies(CurrencyCode&& value) { m_currenciesHasBeenSet = true; m_currencies.push_back(std::move(value)); return *this; }
/**
* <p>The descriptions.</p>
*/
inline const Aws::Vector<Aws::String>& GetDescriptions() const{ return m_descriptions; }
/**
* <p>The descriptions.</p>
*/
inline bool DescriptionsHasBeenSet() const { return m_descriptionsHasBeenSet; }
/**
* <p>The descriptions.</p>
*/
inline void SetDescriptions(const Aws::Vector<Aws::String>& value) { m_descriptionsHasBeenSet = true; m_descriptions = value; }
/**
* <p>The descriptions.</p>
*/
inline void SetDescriptions(Aws::Vector<Aws::String>&& value) { m_descriptionsHasBeenSet = true; m_descriptions = std::move(value); }
/**
* <p>The descriptions.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithDescriptions(const Aws::Vector<Aws::String>& value) { SetDescriptions(value); return *this;}
/**
* <p>The descriptions.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithDescriptions(Aws::Vector<Aws::String>&& value) { SetDescriptions(std::move(value)); return *this;}
/**
* <p>The descriptions.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddDescriptions(const Aws::String& value) { m_descriptionsHasBeenSet = true; m_descriptions.push_back(value); return *this; }
/**
* <p>The descriptions.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddDescriptions(Aws::String&& value) { m_descriptionsHasBeenSet = true; m_descriptions.push_back(std::move(value)); return *this; }
/**
* <p>The descriptions.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddDescriptions(const char* value) { m_descriptionsHasBeenSet = true; m_descriptions.push_back(value); return *this; }
/**
* <p>The services.</p>
*/
inline const Aws::Vector<Aws::String>& GetServiceCodes() const{ return m_serviceCodes; }
/**
* <p>The services.</p>
*/
inline bool ServiceCodesHasBeenSet() const { return m_serviceCodesHasBeenSet; }
/**
* <p>The services.</p>
*/
inline void SetServiceCodes(const Aws::Vector<Aws::String>& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes = value; }
/**
* <p>The services.</p>
*/
inline void SetServiceCodes(Aws::Vector<Aws::String>&& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes = std::move(value); }
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithServiceCodes(const Aws::Vector<Aws::String>& value) { SetServiceCodes(value); return *this;}
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithServiceCodes(Aws::Vector<Aws::String>&& value) { SetServiceCodes(std::move(value)); return *this;}
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddServiceCodes(const Aws::String& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes.push_back(value); return *this; }
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddServiceCodes(Aws::String&& value) { m_serviceCodesHasBeenSet = true; m_serviceCodes.push_back(std::move(value)); return *this; }
/**
* <p>The services.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddServiceCodes(const char* value) { m_serviceCodesHasBeenSet = true; m_serviceCodes.push_back(value); return *this; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline const Aws::Vector<Aws::String>& GetUsageTypes() const{ return m_usageTypes; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline bool UsageTypesHasBeenSet() const { return m_usageTypesHasBeenSet; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageTypes(const Aws::Vector<Aws::String>& value) { m_usageTypesHasBeenSet = true; m_usageTypes = value; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageTypes(Aws::Vector<Aws::String>&& value) { m_usageTypesHasBeenSet = true; m_usageTypes = std::move(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithUsageTypes(const Aws::Vector<Aws::String>& value) { SetUsageTypes(value); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithUsageTypes(Aws::Vector<Aws::String>&& value) { SetUsageTypes(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddUsageTypes(const Aws::String& value) { m_usageTypesHasBeenSet = true; m_usageTypes.push_back(value); return *this; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddUsageTypes(Aws::String&& value) { m_usageTypesHasBeenSet = true; m_usageTypes.push_back(std::move(value)); return *this; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddUsageTypes(const char* value) { m_usageTypesHasBeenSet = true; m_usageTypes.push_back(value); return *this; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline const Aws::Vector<Aws::String>& GetOperations() const{ return m_operations; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperations(const Aws::Vector<Aws::String>& value) { m_operationsHasBeenSet = true; m_operations = value; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperations(Aws::Vector<Aws::String>&& value) { m_operationsHasBeenSet = true; m_operations = std::move(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithOperations(const Aws::Vector<Aws::String>& value) { SetOperations(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithOperations(Aws::Vector<Aws::String>&& value) { SetOperations(std::move(value)); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddOperations(const Aws::String& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddOperations(Aws::String&& value) { m_operationsHasBeenSet = true; m_operations.push_back(std::move(value)); return *this; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddOperations(const char* value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; }
/**
* <p>The filters.</p>
*/
inline const Aws::Vector<SavingsPlanOfferingFilterElement>& GetFilters() const{ return m_filters; }
/**
* <p>The filters.</p>
*/
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(const Aws::Vector<SavingsPlanOfferingFilterElement>& value) { m_filtersHasBeenSet = true; m_filters = value; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(Aws::Vector<SavingsPlanOfferingFilterElement>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithFilters(const Aws::Vector<SavingsPlanOfferingFilterElement>& value) { SetFilters(value); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithFilters(Aws::Vector<SavingsPlanOfferingFilterElement>&& value) { SetFilters(std::move(value)); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddFilters(const SavingsPlanOfferingFilterElement& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& AddFilters(SavingsPlanOfferingFilterElement&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
/**
* <p>The token for the next page of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next page of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline DescribeSavingsPlansOfferingsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
private:
Aws::Vector<Aws::String> m_offeringIds;
bool m_offeringIdsHasBeenSet;
Aws::Vector<SavingsPlanPaymentOption> m_paymentOptions;
bool m_paymentOptionsHasBeenSet;
SavingsPlanProductType m_productType;
bool m_productTypeHasBeenSet;
Aws::Vector<SavingsPlanType> m_planTypes;
bool m_planTypesHasBeenSet;
Aws::Vector<long long> m_durations;
bool m_durationsHasBeenSet;
Aws::Vector<CurrencyCode> m_currencies;
bool m_currenciesHasBeenSet;
Aws::Vector<Aws::String> m_descriptions;
bool m_descriptionsHasBeenSet;
Aws::Vector<Aws::String> m_serviceCodes;
bool m_serviceCodesHasBeenSet;
Aws::Vector<Aws::String> m_usageTypes;
bool m_usageTypesHasBeenSet;
Aws::Vector<Aws::String> m_operations;
bool m_operationsHasBeenSet;
Aws::Vector<SavingsPlanOfferingFilterElement> m_filters;
bool m_filtersHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanOffering.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API DescribeSavingsPlansOfferingsResult
{
public:
DescribeSavingsPlansOfferingsResult();
DescribeSavingsPlansOfferingsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeSavingsPlansOfferingsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline const Aws::Vector<SavingsPlanOffering>& GetSearchResults() const{ return m_searchResults; }
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline void SetSearchResults(const Aws::Vector<SavingsPlanOffering>& value) { m_searchResults = value; }
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline void SetSearchResults(Aws::Vector<SavingsPlanOffering>&& value) { m_searchResults = std::move(value); }
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline DescribeSavingsPlansOfferingsResult& WithSearchResults(const Aws::Vector<SavingsPlanOffering>& value) { SetSearchResults(value); return *this;}
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline DescribeSavingsPlansOfferingsResult& WithSearchResults(Aws::Vector<SavingsPlanOffering>&& value) { SetSearchResults(std::move(value)); return *this;}
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline DescribeSavingsPlansOfferingsResult& AddSearchResults(const SavingsPlanOffering& value) { m_searchResults.push_back(value); return *this; }
/**
* <p>Information about the Savings Plans offerings.</p>
*/
inline DescribeSavingsPlansOfferingsResult& AddSearchResults(SavingsPlanOffering&& value) { m_searchResults.push_back(std::move(value)); return *this; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansOfferingsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansOfferingsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansOfferingsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<SavingsPlanOffering> m_searchResults;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,300 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanState.h>
#include <aws/savingsplans/model/SavingsPlanFilter.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API DescribeSavingsPlansRequest : public SavingsPlansRequest
{
public:
DescribeSavingsPlansRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeSavingsPlans"; }
Aws::String SerializePayload() const override;
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline const Aws::Vector<Aws::String>& GetSavingsPlanArns() const{ return m_savingsPlanArns; }
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline bool SavingsPlanArnsHasBeenSet() const { return m_savingsPlanArnsHasBeenSet; }
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline void SetSavingsPlanArns(const Aws::Vector<Aws::String>& value) { m_savingsPlanArnsHasBeenSet = true; m_savingsPlanArns = value; }
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline void SetSavingsPlanArns(Aws::Vector<Aws::String>&& value) { m_savingsPlanArnsHasBeenSet = true; m_savingsPlanArns = std::move(value); }
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& WithSavingsPlanArns(const Aws::Vector<Aws::String>& value) { SetSavingsPlanArns(value); return *this;}
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& WithSavingsPlanArns(Aws::Vector<Aws::String>&& value) { SetSavingsPlanArns(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& AddSavingsPlanArns(const Aws::String& value) { m_savingsPlanArnsHasBeenSet = true; m_savingsPlanArns.push_back(value); return *this; }
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& AddSavingsPlanArns(Aws::String&& value) { m_savingsPlanArnsHasBeenSet = true; m_savingsPlanArns.push_back(std::move(value)); return *this; }
/**
* <p>The Amazon Resource Names (ARN) of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& AddSavingsPlanArns(const char* value) { m_savingsPlanArnsHasBeenSet = true; m_savingsPlanArns.push_back(value); return *this; }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline const Aws::Vector<Aws::String>& GetSavingsPlanIds() const{ return m_savingsPlanIds; }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline bool SavingsPlanIdsHasBeenSet() const { return m_savingsPlanIdsHasBeenSet; }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline void SetSavingsPlanIds(const Aws::Vector<Aws::String>& value) { m_savingsPlanIdsHasBeenSet = true; m_savingsPlanIds = value; }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline void SetSavingsPlanIds(Aws::Vector<Aws::String>&& value) { m_savingsPlanIdsHasBeenSet = true; m_savingsPlanIds = std::move(value); }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& WithSavingsPlanIds(const Aws::Vector<Aws::String>& value) { SetSavingsPlanIds(value); return *this;}
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& WithSavingsPlanIds(Aws::Vector<Aws::String>&& value) { SetSavingsPlanIds(std::move(value)); return *this;}
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& AddSavingsPlanIds(const Aws::String& value) { m_savingsPlanIdsHasBeenSet = true; m_savingsPlanIds.push_back(value); return *this; }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& AddSavingsPlanIds(Aws::String&& value) { m_savingsPlanIdsHasBeenSet = true; m_savingsPlanIds.push_back(std::move(value)); return *this; }
/**
* <p>The IDs of the Savings Plans.</p>
*/
inline DescribeSavingsPlansRequest& AddSavingsPlanIds(const char* value) { m_savingsPlanIdsHasBeenSet = true; m_savingsPlanIds.push_back(value); return *this; }
/**
* <p>The token for the next page of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next page of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next page of results.</p>
*/
inline DescribeSavingsPlansRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return with a single call. To retrieve
* additional results, make another call with the returned token value.</p>
*/
inline DescribeSavingsPlansRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>The states.</p>
*/
inline const Aws::Vector<SavingsPlanState>& GetStates() const{ return m_states; }
/**
* <p>The states.</p>
*/
inline bool StatesHasBeenSet() const { return m_statesHasBeenSet; }
/**
* <p>The states.</p>
*/
inline void SetStates(const Aws::Vector<SavingsPlanState>& value) { m_statesHasBeenSet = true; m_states = value; }
/**
* <p>The states.</p>
*/
inline void SetStates(Aws::Vector<SavingsPlanState>&& value) { m_statesHasBeenSet = true; m_states = std::move(value); }
/**
* <p>The states.</p>
*/
inline DescribeSavingsPlansRequest& WithStates(const Aws::Vector<SavingsPlanState>& value) { SetStates(value); return *this;}
/**
* <p>The states.</p>
*/
inline DescribeSavingsPlansRequest& WithStates(Aws::Vector<SavingsPlanState>&& value) { SetStates(std::move(value)); return *this;}
/**
* <p>The states.</p>
*/
inline DescribeSavingsPlansRequest& AddStates(const SavingsPlanState& value) { m_statesHasBeenSet = true; m_states.push_back(value); return *this; }
/**
* <p>The states.</p>
*/
inline DescribeSavingsPlansRequest& AddStates(SavingsPlanState&& value) { m_statesHasBeenSet = true; m_states.push_back(std::move(value)); return *this; }
/**
* <p>The filters.</p>
*/
inline const Aws::Vector<SavingsPlanFilter>& GetFilters() const{ return m_filters; }
/**
* <p>The filters.</p>
*/
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(const Aws::Vector<SavingsPlanFilter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
/**
* <p>The filters.</p>
*/
inline void SetFilters(Aws::Vector<SavingsPlanFilter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansRequest& WithFilters(const Aws::Vector<SavingsPlanFilter>& value) { SetFilters(value); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansRequest& WithFilters(Aws::Vector<SavingsPlanFilter>&& value) { SetFilters(std::move(value)); return *this;}
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansRequest& AddFilters(const SavingsPlanFilter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
/**
* <p>The filters.</p>
*/
inline DescribeSavingsPlansRequest& AddFilters(SavingsPlanFilter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
private:
Aws::Vector<Aws::String> m_savingsPlanArns;
bool m_savingsPlanArnsHasBeenSet;
Aws::Vector<Aws::String> m_savingsPlanIds;
bool m_savingsPlanIdsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::Vector<SavingsPlanState> m_states;
bool m_statesHasBeenSet;
Aws::Vector<SavingsPlanFilter> m_filters;
bool m_filtersHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlan.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API DescribeSavingsPlansResult
{
public:
DescribeSavingsPlansResult();
DescribeSavingsPlansResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
DescribeSavingsPlansResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the Savings Plans.</p>
*/
inline const Aws::Vector<SavingsPlan>& GetSavingsPlans() const{ return m_savingsPlans; }
/**
* <p>Information about the Savings Plans.</p>
*/
inline void SetSavingsPlans(const Aws::Vector<SavingsPlan>& value) { m_savingsPlans = value; }
/**
* <p>Information about the Savings Plans.</p>
*/
inline void SetSavingsPlans(Aws::Vector<SavingsPlan>&& value) { m_savingsPlans = std::move(value); }
/**
* <p>Information about the Savings Plans.</p>
*/
inline DescribeSavingsPlansResult& WithSavingsPlans(const Aws::Vector<SavingsPlan>& value) { SetSavingsPlans(value); return *this;}
/**
* <p>Information about the Savings Plans.</p>
*/
inline DescribeSavingsPlansResult& WithSavingsPlans(Aws::Vector<SavingsPlan>&& value) { SetSavingsPlans(std::move(value)); return *this;}
/**
* <p>Information about the Savings Plans.</p>
*/
inline DescribeSavingsPlansResult& AddSavingsPlans(const SavingsPlan& value) { m_savingsPlans.push_back(value); return *this; }
/**
* <p>Information about the Savings Plans.</p>
*/
inline DescribeSavingsPlansResult& AddSavingsPlans(SavingsPlan&& value) { m_savingsPlans.push_back(std::move(value)); return *this; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token to use to retrieve the next page of results. This value is null
* when there are no more results to return.</p>
*/
inline DescribeSavingsPlansResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<SavingsPlan> m_savingsPlans;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API ListTagsForResourceRequest : public SavingsPlansRequest
{
public:
ListTagsForResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListTagsForResource"; }
Aws::String SerializePayload() const override;
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline ListTagsForResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline ListTagsForResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline ListTagsForResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,103 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API ListTagsForResourceResult
{
public:
ListTagsForResourceResult();
ListTagsForResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListTagsForResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>Information about the tags.</p>
*/
inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
/**
* <p>Information about the tags.</p>
*/
inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tags = value; }
/**
* <p>Information about the tags.</p>
*/
inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tags = std::move(value); }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(const Aws::String& key, const Aws::String& value) { m_tags.emplace(key, value); return *this; }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(Aws::String&& key, const Aws::String& value) { m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(const Aws::String& key, Aws::String&& value) { m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(Aws::String&& key, Aws::String&& value) { m_tags.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(const char* key, Aws::String&& value) { m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(Aws::String&& key, const char* value) { m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>Information about the tags.</p>
*/
inline ListTagsForResourceResult& AddTags(const char* key, const char* value) { m_tags.emplace(key, value); return *this; }
private:
Aws::Map<Aws::String, Aws::String> m_tags;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,261 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
#include <aws/savingsplans/model/SavingsPlanType.h>
#include <aws/savingsplans/model/CurrencyCode.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a Savings Plan offering.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/ParentSavingsPlanOffering">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API ParentSavingsPlanOffering
{
public:
ParentSavingsPlanOffering();
ParentSavingsPlanOffering(Aws::Utils::Json::JsonView jsonValue);
ParentSavingsPlanOffering& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The ID of the offering.</p>
*/
inline const Aws::String& GetOfferingId() const{ return m_offeringId; }
/**
* <p>The ID of the offering.</p>
*/
inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); }
/**
* <p>The ID of the offering.</p>
*/
inline ParentSavingsPlanOffering& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline ParentSavingsPlanOffering& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline ParentSavingsPlanOffering& WithOfferingId(const char* value) { SetOfferingId(value); return *this;}
/**
* <p>The payment option.</p>
*/
inline const SavingsPlanPaymentOption& GetPaymentOption() const{ return m_paymentOption; }
/**
* <p>The payment option.</p>
*/
inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
/**
* <p>The payment option.</p>
*/
inline void SetPaymentOption(const SavingsPlanPaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
/**
* <p>The payment option.</p>
*/
inline void SetPaymentOption(SavingsPlanPaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
/**
* <p>The payment option.</p>
*/
inline ParentSavingsPlanOffering& WithPaymentOption(const SavingsPlanPaymentOption& value) { SetPaymentOption(value); return *this;}
/**
* <p>The payment option.</p>
*/
inline ParentSavingsPlanOffering& WithPaymentOption(SavingsPlanPaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
/**
* <p>The plan type.</p>
*/
inline const SavingsPlanType& GetPlanType() const{ return m_planType; }
/**
* <p>The plan type.</p>
*/
inline bool PlanTypeHasBeenSet() const { return m_planTypeHasBeenSet; }
/**
* <p>The plan type.</p>
*/
inline void SetPlanType(const SavingsPlanType& value) { m_planTypeHasBeenSet = true; m_planType = value; }
/**
* <p>The plan type.</p>
*/
inline void SetPlanType(SavingsPlanType&& value) { m_planTypeHasBeenSet = true; m_planType = std::move(value); }
/**
* <p>The plan type.</p>
*/
inline ParentSavingsPlanOffering& WithPlanType(const SavingsPlanType& value) { SetPlanType(value); return *this;}
/**
* <p>The plan type.</p>
*/
inline ParentSavingsPlanOffering& WithPlanType(SavingsPlanType&& value) { SetPlanType(std::move(value)); return *this;}
/**
* <p>The duration, in seconds.</p>
*/
inline long long GetDurationSeconds() const{ return m_durationSeconds; }
/**
* <p>The duration, in seconds.</p>
*/
inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
/**
* <p>The duration, in seconds.</p>
*/
inline void SetDurationSeconds(long long value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
/**
* <p>The duration, in seconds.</p>
*/
inline ParentSavingsPlanOffering& WithDurationSeconds(long long value) { SetDurationSeconds(value); return *this;}
/**
* <p>The currency.</p>
*/
inline const CurrencyCode& GetCurrency() const{ return m_currency; }
/**
* <p>The currency.</p>
*/
inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(const CurrencyCode& value) { m_currencyHasBeenSet = true; m_currency = value; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(CurrencyCode&& value) { m_currencyHasBeenSet = true; m_currency = std::move(value); }
/**
* <p>The currency.</p>
*/
inline ParentSavingsPlanOffering& WithCurrency(const CurrencyCode& value) { SetCurrency(value); return *this;}
/**
* <p>The currency.</p>
*/
inline ParentSavingsPlanOffering& WithCurrency(CurrencyCode&& value) { SetCurrency(std::move(value)); return *this;}
/**
* <p>The description.</p>
*/
inline const Aws::String& GetPlanDescription() const{ return m_planDescription; }
/**
* <p>The description.</p>
*/
inline bool PlanDescriptionHasBeenSet() const { return m_planDescriptionHasBeenSet; }
/**
* <p>The description.</p>
*/
inline void SetPlanDescription(const Aws::String& value) { m_planDescriptionHasBeenSet = true; m_planDescription = value; }
/**
* <p>The description.</p>
*/
inline void SetPlanDescription(Aws::String&& value) { m_planDescriptionHasBeenSet = true; m_planDescription = std::move(value); }
/**
* <p>The description.</p>
*/
inline void SetPlanDescription(const char* value) { m_planDescriptionHasBeenSet = true; m_planDescription.assign(value); }
/**
* <p>The description.</p>
*/
inline ParentSavingsPlanOffering& WithPlanDescription(const Aws::String& value) { SetPlanDescription(value); return *this;}
/**
* <p>The description.</p>
*/
inline ParentSavingsPlanOffering& WithPlanDescription(Aws::String&& value) { SetPlanDescription(std::move(value)); return *this;}
/**
* <p>The description.</p>
*/
inline ParentSavingsPlanOffering& WithPlanDescription(const char* value) { SetPlanDescription(value); return *this;}
private:
Aws::String m_offeringId;
bool m_offeringIdHasBeenSet;
SavingsPlanPaymentOption m_paymentOption;
bool m_paymentOptionHasBeenSet;
SavingsPlanType m_planType;
bool m_planTypeHasBeenSet;
long long m_durationSeconds;
bool m_durationSecondsHasBeenSet;
CurrencyCode m_currency;
bool m_currencyHasBeenSet;
Aws::String m_planDescription;
bool m_planDescriptionHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,808 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanState.h>
#include <aws/savingsplans/model/SavingsPlanType.h>
#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/CurrencyCode.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a Savings Plan.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlan">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlan
{
public:
SavingsPlan();
SavingsPlan(Aws::Utils::Json::JsonView jsonValue);
SavingsPlan& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The ID of the offering.</p>
*/
inline const Aws::String& GetOfferingId() const{ return m_offeringId; }
/**
* <p>The ID of the offering.</p>
*/
inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); }
/**
* <p>The ID of the offering.</p>
*/
inline SavingsPlan& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline SavingsPlan& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline SavingsPlan& WithOfferingId(const char* value) { SetOfferingId(value); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline const Aws::String& GetSavingsPlanId() const{ return m_savingsPlanId; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline bool SavingsPlanIdHasBeenSet() const { return m_savingsPlanIdHasBeenSet; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const Aws::String& value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = value; }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(Aws::String&& value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId = std::move(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline void SetSavingsPlanId(const char* value) { m_savingsPlanIdHasBeenSet = true; m_savingsPlanId.assign(value); }
/**
* <p>The ID of the Savings Plan.</p>
*/
inline SavingsPlan& WithSavingsPlanId(const Aws::String& value) { SetSavingsPlanId(value); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline SavingsPlan& WithSavingsPlanId(Aws::String&& value) { SetSavingsPlanId(std::move(value)); return *this;}
/**
* <p>The ID of the Savings Plan.</p>
*/
inline SavingsPlan& WithSavingsPlanId(const char* value) { SetSavingsPlanId(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline const Aws::String& GetSavingsPlanArn() const{ return m_savingsPlanArn; }
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline bool SavingsPlanArnHasBeenSet() const { return m_savingsPlanArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline void SetSavingsPlanArn(const Aws::String& value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline void SetSavingsPlanArn(Aws::String&& value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline void SetSavingsPlanArn(const char* value) { m_savingsPlanArnHasBeenSet = true; m_savingsPlanArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline SavingsPlan& WithSavingsPlanArn(const Aws::String& value) { SetSavingsPlanArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline SavingsPlan& WithSavingsPlanArn(Aws::String&& value) { SetSavingsPlanArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the Savings Plan.</p>
*/
inline SavingsPlan& WithSavingsPlanArn(const char* value) { SetSavingsPlanArn(value); return *this;}
/**
* <p>The description.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
/**
* <p>The description.</p>
*/
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
/**
* <p>The description.</p>
*/
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
/**
* <p>The description.</p>
*/
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
/**
* <p>The description.</p>
*/
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
/**
* <p>The description.</p>
*/
inline SavingsPlan& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
/**
* <p>The description.</p>
*/
inline SavingsPlan& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
/**
* <p>The description.</p>
*/
inline SavingsPlan& WithDescription(const char* value) { SetDescription(value); return *this;}
/**
* <p>The start time.</p>
*/
inline const Aws::String& GetStart() const{ return m_start; }
/**
* <p>The start time.</p>
*/
inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
/**
* <p>The start time.</p>
*/
inline void SetStart(const Aws::String& value) { m_startHasBeenSet = true; m_start = value; }
/**
* <p>The start time.</p>
*/
inline void SetStart(Aws::String&& value) { m_startHasBeenSet = true; m_start = std::move(value); }
/**
* <p>The start time.</p>
*/
inline void SetStart(const char* value) { m_startHasBeenSet = true; m_start.assign(value); }
/**
* <p>The start time.</p>
*/
inline SavingsPlan& WithStart(const Aws::String& value) { SetStart(value); return *this;}
/**
* <p>The start time.</p>
*/
inline SavingsPlan& WithStart(Aws::String&& value) { SetStart(std::move(value)); return *this;}
/**
* <p>The start time.</p>
*/
inline SavingsPlan& WithStart(const char* value) { SetStart(value); return *this;}
/**
* <p>The end time.</p>
*/
inline const Aws::String& GetEnd() const{ return m_end; }
/**
* <p>The end time.</p>
*/
inline bool EndHasBeenSet() const { return m_endHasBeenSet; }
/**
* <p>The end time.</p>
*/
inline void SetEnd(const Aws::String& value) { m_endHasBeenSet = true; m_end = value; }
/**
* <p>The end time.</p>
*/
inline void SetEnd(Aws::String&& value) { m_endHasBeenSet = true; m_end = std::move(value); }
/**
* <p>The end time.</p>
*/
inline void SetEnd(const char* value) { m_endHasBeenSet = true; m_end.assign(value); }
/**
* <p>The end time.</p>
*/
inline SavingsPlan& WithEnd(const Aws::String& value) { SetEnd(value); return *this;}
/**
* <p>The end time.</p>
*/
inline SavingsPlan& WithEnd(Aws::String&& value) { SetEnd(std::move(value)); return *this;}
/**
* <p>The end time.</p>
*/
inline SavingsPlan& WithEnd(const char* value) { SetEnd(value); return *this;}
/**
* <p>The state.</p>
*/
inline const SavingsPlanState& GetState() const{ return m_state; }
/**
* <p>The state.</p>
*/
inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
/**
* <p>The state.</p>
*/
inline void SetState(const SavingsPlanState& value) { m_stateHasBeenSet = true; m_state = value; }
/**
* <p>The state.</p>
*/
inline void SetState(SavingsPlanState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
/**
* <p>The state.</p>
*/
inline SavingsPlan& WithState(const SavingsPlanState& value) { SetState(value); return *this;}
/**
* <p>The state.</p>
*/
inline SavingsPlan& WithState(SavingsPlanState&& value) { SetState(std::move(value)); return *this;}
/**
* <p>The AWS Region.</p>
*/
inline const Aws::String& GetRegion() const{ return m_region; }
/**
* <p>The AWS Region.</p>
*/
inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
/**
* <p>The AWS Region.</p>
*/
inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; }
/**
* <p>The AWS Region.</p>
*/
inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); }
/**
* <p>The AWS Region.</p>
*/
inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); }
/**
* <p>The AWS Region.</p>
*/
inline SavingsPlan& WithRegion(const Aws::String& value) { SetRegion(value); return *this;}
/**
* <p>The AWS Region.</p>
*/
inline SavingsPlan& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;}
/**
* <p>The AWS Region.</p>
*/
inline SavingsPlan& WithRegion(const char* value) { SetRegion(value); return *this;}
/**
* <p>The EC2 instance family.</p>
*/
inline const Aws::String& GetEc2InstanceFamily() const{ return m_ec2InstanceFamily; }
/**
* <p>The EC2 instance family.</p>
*/
inline bool Ec2InstanceFamilyHasBeenSet() const { return m_ec2InstanceFamilyHasBeenSet; }
/**
* <p>The EC2 instance family.</p>
*/
inline void SetEc2InstanceFamily(const Aws::String& value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily = value; }
/**
* <p>The EC2 instance family.</p>
*/
inline void SetEc2InstanceFamily(Aws::String&& value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily = std::move(value); }
/**
* <p>The EC2 instance family.</p>
*/
inline void SetEc2InstanceFamily(const char* value) { m_ec2InstanceFamilyHasBeenSet = true; m_ec2InstanceFamily.assign(value); }
/**
* <p>The EC2 instance family.</p>
*/
inline SavingsPlan& WithEc2InstanceFamily(const Aws::String& value) { SetEc2InstanceFamily(value); return *this;}
/**
* <p>The EC2 instance family.</p>
*/
inline SavingsPlan& WithEc2InstanceFamily(Aws::String&& value) { SetEc2InstanceFamily(std::move(value)); return *this;}
/**
* <p>The EC2 instance family.</p>
*/
inline SavingsPlan& WithEc2InstanceFamily(const char* value) { SetEc2InstanceFamily(value); return *this;}
/**
* <p>The plan type.</p>
*/
inline const SavingsPlanType& GetSavingsPlanType() const{ return m_savingsPlanType; }
/**
* <p>The plan type.</p>
*/
inline bool SavingsPlanTypeHasBeenSet() const { return m_savingsPlanTypeHasBeenSet; }
/**
* <p>The plan type.</p>
*/
inline void SetSavingsPlanType(const SavingsPlanType& value) { m_savingsPlanTypeHasBeenSet = true; m_savingsPlanType = value; }
/**
* <p>The plan type.</p>
*/
inline void SetSavingsPlanType(SavingsPlanType&& value) { m_savingsPlanTypeHasBeenSet = true; m_savingsPlanType = std::move(value); }
/**
* <p>The plan type.</p>
*/
inline SavingsPlan& WithSavingsPlanType(const SavingsPlanType& value) { SetSavingsPlanType(value); return *this;}
/**
* <p>The plan type.</p>
*/
inline SavingsPlan& WithSavingsPlanType(SavingsPlanType&& value) { SetSavingsPlanType(std::move(value)); return *this;}
/**
* <p>The payment option.</p>
*/
inline const SavingsPlanPaymentOption& GetPaymentOption() const{ return m_paymentOption; }
/**
* <p>The payment option.</p>
*/
inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
/**
* <p>The payment option.</p>
*/
inline void SetPaymentOption(const SavingsPlanPaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
/**
* <p>The payment option.</p>
*/
inline void SetPaymentOption(SavingsPlanPaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
/**
* <p>The payment option.</p>
*/
inline SavingsPlan& WithPaymentOption(const SavingsPlanPaymentOption& value) { SetPaymentOption(value); return *this;}
/**
* <p>The payment option.</p>
*/
inline SavingsPlan& WithPaymentOption(SavingsPlanPaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
/**
* <p>The product types.</p>
*/
inline const Aws::Vector<SavingsPlanProductType>& GetProductTypes() const{ return m_productTypes; }
/**
* <p>The product types.</p>
*/
inline bool ProductTypesHasBeenSet() const { return m_productTypesHasBeenSet; }
/**
* <p>The product types.</p>
*/
inline void SetProductTypes(const Aws::Vector<SavingsPlanProductType>& value) { m_productTypesHasBeenSet = true; m_productTypes = value; }
/**
* <p>The product types.</p>
*/
inline void SetProductTypes(Aws::Vector<SavingsPlanProductType>&& value) { m_productTypesHasBeenSet = true; m_productTypes = std::move(value); }
/**
* <p>The product types.</p>
*/
inline SavingsPlan& WithProductTypes(const Aws::Vector<SavingsPlanProductType>& value) { SetProductTypes(value); return *this;}
/**
* <p>The product types.</p>
*/
inline SavingsPlan& WithProductTypes(Aws::Vector<SavingsPlanProductType>&& value) { SetProductTypes(std::move(value)); return *this;}
/**
* <p>The product types.</p>
*/
inline SavingsPlan& AddProductTypes(const SavingsPlanProductType& value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(value); return *this; }
/**
* <p>The product types.</p>
*/
inline SavingsPlan& AddProductTypes(SavingsPlanProductType&& value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(std::move(value)); return *this; }
/**
* <p>The currency.</p>
*/
inline const CurrencyCode& GetCurrency() const{ return m_currency; }
/**
* <p>The currency.</p>
*/
inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(const CurrencyCode& value) { m_currencyHasBeenSet = true; m_currency = value; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(CurrencyCode&& value) { m_currencyHasBeenSet = true; m_currency = std::move(value); }
/**
* <p>The currency.</p>
*/
inline SavingsPlan& WithCurrency(const CurrencyCode& value) { SetCurrency(value); return *this;}
/**
* <p>The currency.</p>
*/
inline SavingsPlan& WithCurrency(CurrencyCode&& value) { SetCurrency(std::move(value)); return *this;}
/**
* <p>The hourly commitment, in USD.</p>
*/
inline const Aws::String& GetCommitment() const{ return m_commitment; }
/**
* <p>The hourly commitment, in USD.</p>
*/
inline bool CommitmentHasBeenSet() const { return m_commitmentHasBeenSet; }
/**
* <p>The hourly commitment, in USD.</p>
*/
inline void SetCommitment(const Aws::String& value) { m_commitmentHasBeenSet = true; m_commitment = value; }
/**
* <p>The hourly commitment, in USD.</p>
*/
inline void SetCommitment(Aws::String&& value) { m_commitmentHasBeenSet = true; m_commitment = std::move(value); }
/**
* <p>The hourly commitment, in USD.</p>
*/
inline void SetCommitment(const char* value) { m_commitmentHasBeenSet = true; m_commitment.assign(value); }
/**
* <p>The hourly commitment, in USD.</p>
*/
inline SavingsPlan& WithCommitment(const Aws::String& value) { SetCommitment(value); return *this;}
/**
* <p>The hourly commitment, in USD.</p>
*/
inline SavingsPlan& WithCommitment(Aws::String&& value) { SetCommitment(std::move(value)); return *this;}
/**
* <p>The hourly commitment, in USD.</p>
*/
inline SavingsPlan& WithCommitment(const char* value) { SetCommitment(value); return *this;}
/**
* <p>The up-front payment amount.</p>
*/
inline const Aws::String& GetUpfrontPaymentAmount() const{ return m_upfrontPaymentAmount; }
/**
* <p>The up-front payment amount.</p>
*/
inline bool UpfrontPaymentAmountHasBeenSet() const { return m_upfrontPaymentAmountHasBeenSet; }
/**
* <p>The up-front payment amount.</p>
*/
inline void SetUpfrontPaymentAmount(const Aws::String& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = value; }
/**
* <p>The up-front payment amount.</p>
*/
inline void SetUpfrontPaymentAmount(Aws::String&& value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount = std::move(value); }
/**
* <p>The up-front payment amount.</p>
*/
inline void SetUpfrontPaymentAmount(const char* value) { m_upfrontPaymentAmountHasBeenSet = true; m_upfrontPaymentAmount.assign(value); }
/**
* <p>The up-front payment amount.</p>
*/
inline SavingsPlan& WithUpfrontPaymentAmount(const Aws::String& value) { SetUpfrontPaymentAmount(value); return *this;}
/**
* <p>The up-front payment amount.</p>
*/
inline SavingsPlan& WithUpfrontPaymentAmount(Aws::String&& value) { SetUpfrontPaymentAmount(std::move(value)); return *this;}
/**
* <p>The up-front payment amount.</p>
*/
inline SavingsPlan& WithUpfrontPaymentAmount(const char* value) { SetUpfrontPaymentAmount(value); return *this;}
/**
* <p>The recurring payment amount.</p>
*/
inline const Aws::String& GetRecurringPaymentAmount() const{ return m_recurringPaymentAmount; }
/**
* <p>The recurring payment amount.</p>
*/
inline bool RecurringPaymentAmountHasBeenSet() const { return m_recurringPaymentAmountHasBeenSet; }
/**
* <p>The recurring payment amount.</p>
*/
inline void SetRecurringPaymentAmount(const Aws::String& value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount = value; }
/**
* <p>The recurring payment amount.</p>
*/
inline void SetRecurringPaymentAmount(Aws::String&& value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount = std::move(value); }
/**
* <p>The recurring payment amount.</p>
*/
inline void SetRecurringPaymentAmount(const char* value) { m_recurringPaymentAmountHasBeenSet = true; m_recurringPaymentAmount.assign(value); }
/**
* <p>The recurring payment amount.</p>
*/
inline SavingsPlan& WithRecurringPaymentAmount(const Aws::String& value) { SetRecurringPaymentAmount(value); return *this;}
/**
* <p>The recurring payment amount.</p>
*/
inline SavingsPlan& WithRecurringPaymentAmount(Aws::String&& value) { SetRecurringPaymentAmount(std::move(value)); return *this;}
/**
* <p>The recurring payment amount.</p>
*/
inline SavingsPlan& WithRecurringPaymentAmount(const char* value) { SetRecurringPaymentAmount(value); return *this;}
/**
* <p>The duration of the term, in seconds.</p>
*/
inline long long GetTermDurationInSeconds() const{ return m_termDurationInSeconds; }
/**
* <p>The duration of the term, in seconds.</p>
*/
inline bool TermDurationInSecondsHasBeenSet() const { return m_termDurationInSecondsHasBeenSet; }
/**
* <p>The duration of the term, in seconds.</p>
*/
inline void SetTermDurationInSeconds(long long value) { m_termDurationInSecondsHasBeenSet = true; m_termDurationInSeconds = value; }
/**
* <p>The duration of the term, in seconds.</p>
*/
inline SavingsPlan& WithTermDurationInSeconds(long long value) { SetTermDurationInSeconds(value); return *this;}
/**
* <p>One or more tags.</p>
*/
inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
/**
* <p>One or more tags.</p>
*/
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
/**
* <p>One or more tags.</p>
*/
inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
/**
* <p>One or more tags.</p>
*/
inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>One or more tags.</p>
*/
inline SavingsPlan& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
private:
Aws::String m_offeringId;
bool m_offeringIdHasBeenSet;
Aws::String m_savingsPlanId;
bool m_savingsPlanIdHasBeenSet;
Aws::String m_savingsPlanArn;
bool m_savingsPlanArnHasBeenSet;
Aws::String m_description;
bool m_descriptionHasBeenSet;
Aws::String m_start;
bool m_startHasBeenSet;
Aws::String m_end;
bool m_endHasBeenSet;
SavingsPlanState m_state;
bool m_stateHasBeenSet;
Aws::String m_region;
bool m_regionHasBeenSet;
Aws::String m_ec2InstanceFamily;
bool m_ec2InstanceFamilyHasBeenSet;
SavingsPlanType m_savingsPlanType;
bool m_savingsPlanTypeHasBeenSet;
SavingsPlanPaymentOption m_paymentOption;
bool m_paymentOptionHasBeenSet;
Aws::Vector<SavingsPlanProductType> m_productTypes;
bool m_productTypesHasBeenSet;
CurrencyCode m_currency;
bool m_currencyHasBeenSet;
Aws::String m_commitment;
bool m_commitmentHasBeenSet;
Aws::String m_upfrontPaymentAmount;
bool m_upfrontPaymentAmountHasBeenSet;
Aws::String m_recurringPaymentAmount;
bool m_recurringPaymentAmountHasBeenSet;
long long m_termDurationInSeconds;
bool m_termDurationInSecondsHasBeenSet;
Aws::Map<Aws::String, Aws::String> m_tags;
bool m_tagsHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/SavingsPlansFilterName.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a filter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanFilter">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanFilter
{
public:
SavingsPlanFilter();
SavingsPlanFilter(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanFilter& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The filter name.</p>
*/
inline const SavingsPlansFilterName& GetName() const{ return m_name; }
/**
* <p>The filter name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The filter name.</p>
*/
inline void SetName(const SavingsPlansFilterName& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The filter name.</p>
*/
inline void SetName(SavingsPlansFilterName&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The filter name.</p>
*/
inline SavingsPlanFilter& WithName(const SavingsPlansFilterName& value) { SetName(value); return *this;}
/**
* <p>The filter name.</p>
*/
inline SavingsPlanFilter& WithName(SavingsPlansFilterName&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The filter value.</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The filter value.</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The filter value.</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The filter value.</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The filter value.</p>
*/
inline SavingsPlanFilter& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The filter value.</p>
*/
inline SavingsPlanFilter& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The filter value.</p>
*/
inline SavingsPlanFilter& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The filter value.</p>
*/
inline SavingsPlanFilter& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The filter value.</p>
*/
inline SavingsPlanFilter& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
SavingsPlansFilterName m_name;
bool m_nameHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,484 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/SavingsPlanType.h>
#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
#include <aws/savingsplans/model/CurrencyCode.h>
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <aws/savingsplans/model/SavingsPlanOfferingProperty.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a Savings Plan offering.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanOffering">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanOffering
{
public:
SavingsPlanOffering();
SavingsPlanOffering(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanOffering& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The ID of the offering.</p>
*/
inline const Aws::String& GetOfferingId() const{ return m_offeringId; }
/**
* <p>The ID of the offering.</p>
*/
inline bool OfferingIdHasBeenSet() const { return m_offeringIdHasBeenSet; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(const Aws::String& value) { m_offeringIdHasBeenSet = true; m_offeringId = value; }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(Aws::String&& value) { m_offeringIdHasBeenSet = true; m_offeringId = std::move(value); }
/**
* <p>The ID of the offering.</p>
*/
inline void SetOfferingId(const char* value) { m_offeringIdHasBeenSet = true; m_offeringId.assign(value); }
/**
* <p>The ID of the offering.</p>
*/
inline SavingsPlanOffering& WithOfferingId(const Aws::String& value) { SetOfferingId(value); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline SavingsPlanOffering& WithOfferingId(Aws::String&& value) { SetOfferingId(std::move(value)); return *this;}
/**
* <p>The ID of the offering.</p>
*/
inline SavingsPlanOffering& WithOfferingId(const char* value) { SetOfferingId(value); return *this;}
/**
* <p>The product type.</p>
*/
inline const Aws::Vector<SavingsPlanProductType>& GetProductTypes() const{ return m_productTypes; }
/**
* <p>The product type.</p>
*/
inline bool ProductTypesHasBeenSet() const { return m_productTypesHasBeenSet; }
/**
* <p>The product type.</p>
*/
inline void SetProductTypes(const Aws::Vector<SavingsPlanProductType>& value) { m_productTypesHasBeenSet = true; m_productTypes = value; }
/**
* <p>The product type.</p>
*/
inline void SetProductTypes(Aws::Vector<SavingsPlanProductType>&& value) { m_productTypesHasBeenSet = true; m_productTypes = std::move(value); }
/**
* <p>The product type.</p>
*/
inline SavingsPlanOffering& WithProductTypes(const Aws::Vector<SavingsPlanProductType>& value) { SetProductTypes(value); return *this;}
/**
* <p>The product type.</p>
*/
inline SavingsPlanOffering& WithProductTypes(Aws::Vector<SavingsPlanProductType>&& value) { SetProductTypes(std::move(value)); return *this;}
/**
* <p>The product type.</p>
*/
inline SavingsPlanOffering& AddProductTypes(const SavingsPlanProductType& value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(value); return *this; }
/**
* <p>The product type.</p>
*/
inline SavingsPlanOffering& AddProductTypes(SavingsPlanProductType&& value) { m_productTypesHasBeenSet = true; m_productTypes.push_back(std::move(value)); return *this; }
/**
* <p>The plan type.</p>
*/
inline const SavingsPlanType& GetPlanType() const{ return m_planType; }
/**
* <p>The plan type.</p>
*/
inline bool PlanTypeHasBeenSet() const { return m_planTypeHasBeenSet; }
/**
* <p>The plan type.</p>
*/
inline void SetPlanType(const SavingsPlanType& value) { m_planTypeHasBeenSet = true; m_planType = value; }
/**
* <p>The plan type.</p>
*/
inline void SetPlanType(SavingsPlanType&& value) { m_planTypeHasBeenSet = true; m_planType = std::move(value); }
/**
* <p>The plan type.</p>
*/
inline SavingsPlanOffering& WithPlanType(const SavingsPlanType& value) { SetPlanType(value); return *this;}
/**
* <p>The plan type.</p>
*/
inline SavingsPlanOffering& WithPlanType(SavingsPlanType&& value) { SetPlanType(std::move(value)); return *this;}
/**
* <p>The description.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
/**
* <p>The description.</p>
*/
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
/**
* <p>The description.</p>
*/
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
/**
* <p>The description.</p>
*/
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
/**
* <p>The description.</p>
*/
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
/**
* <p>The description.</p>
*/
inline SavingsPlanOffering& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
/**
* <p>The description.</p>
*/
inline SavingsPlanOffering& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
/**
* <p>The description.</p>
*/
inline SavingsPlanOffering& WithDescription(const char* value) { SetDescription(value); return *this;}
/**
* <p>The payment option.</p>
*/
inline const SavingsPlanPaymentOption& GetPaymentOption() const{ return m_paymentOption; }
/**
* <p>The payment option.</p>
*/
inline bool PaymentOptionHasBeenSet() const { return m_paymentOptionHasBeenSet; }
/**
* <p>The payment option.</p>
*/
inline void SetPaymentOption(const SavingsPlanPaymentOption& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = value; }
/**
* <p>The payment option.</p>
*/
inline void SetPaymentOption(SavingsPlanPaymentOption&& value) { m_paymentOptionHasBeenSet = true; m_paymentOption = std::move(value); }
/**
* <p>The payment option.</p>
*/
inline SavingsPlanOffering& WithPaymentOption(const SavingsPlanPaymentOption& value) { SetPaymentOption(value); return *this;}
/**
* <p>The payment option.</p>
*/
inline SavingsPlanOffering& WithPaymentOption(SavingsPlanPaymentOption&& value) { SetPaymentOption(std::move(value)); return *this;}
/**
* <p>The duration, in seconds.</p>
*/
inline long long GetDurationSeconds() const{ return m_durationSeconds; }
/**
* <p>The duration, in seconds.</p>
*/
inline bool DurationSecondsHasBeenSet() const { return m_durationSecondsHasBeenSet; }
/**
* <p>The duration, in seconds.</p>
*/
inline void SetDurationSeconds(long long value) { m_durationSecondsHasBeenSet = true; m_durationSeconds = value; }
/**
* <p>The duration, in seconds.</p>
*/
inline SavingsPlanOffering& WithDurationSeconds(long long value) { SetDurationSeconds(value); return *this;}
/**
* <p>The currency.</p>
*/
inline const CurrencyCode& GetCurrency() const{ return m_currency; }
/**
* <p>The currency.</p>
*/
inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(const CurrencyCode& value) { m_currencyHasBeenSet = true; m_currency = value; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(CurrencyCode&& value) { m_currencyHasBeenSet = true; m_currency = std::move(value); }
/**
* <p>The currency.</p>
*/
inline SavingsPlanOffering& WithCurrency(const CurrencyCode& value) { SetCurrency(value); return *this;}
/**
* <p>The currency.</p>
*/
inline SavingsPlanOffering& WithCurrency(CurrencyCode&& value) { SetCurrency(std::move(value)); return *this;}
/**
* <p>The service.</p>
*/
inline const Aws::String& GetServiceCode() const{ return m_serviceCode; }
/**
* <p>The service.</p>
*/
inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(const Aws::String& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = value; }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(Aws::String&& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = std::move(value); }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(const char* value) { m_serviceCodeHasBeenSet = true; m_serviceCode.assign(value); }
/**
* <p>The service.</p>
*/
inline SavingsPlanOffering& WithServiceCode(const Aws::String& value) { SetServiceCode(value); return *this;}
/**
* <p>The service.</p>
*/
inline SavingsPlanOffering& WithServiceCode(Aws::String&& value) { SetServiceCode(std::move(value)); return *this;}
/**
* <p>The service.</p>
*/
inline SavingsPlanOffering& WithServiceCode(const char* value) { SetServiceCode(value); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline const Aws::String& GetUsageType() const{ return m_usageType; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(const Aws::String& value) { m_usageTypeHasBeenSet = true; m_usageType = value; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(Aws::String&& value) { m_usageTypeHasBeenSet = true; m_usageType = std::move(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(const char* value) { m_usageTypeHasBeenSet = true; m_usageType.assign(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanOffering& WithUsageType(const Aws::String& value) { SetUsageType(value); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanOffering& WithUsageType(Aws::String&& value) { SetUsageType(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanOffering& WithUsageType(const char* value) { SetUsageType(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline const Aws::String& GetOperation() const{ return m_operation; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(const Aws::String& value) { m_operationHasBeenSet = true; m_operation = value; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(Aws::String&& value) { m_operationHasBeenSet = true; m_operation = std::move(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(const char* value) { m_operationHasBeenSet = true; m_operation.assign(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanOffering& WithOperation(const Aws::String& value) { SetOperation(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanOffering& WithOperation(Aws::String&& value) { SetOperation(std::move(value)); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanOffering& WithOperation(const char* value) { SetOperation(value); return *this;}
/**
* <p>The properties.</p>
*/
inline const Aws::Vector<SavingsPlanOfferingProperty>& GetProperties() const{ return m_properties; }
/**
* <p>The properties.</p>
*/
inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
/**
* <p>The properties.</p>
*/
inline void SetProperties(const Aws::Vector<SavingsPlanOfferingProperty>& value) { m_propertiesHasBeenSet = true; m_properties = value; }
/**
* <p>The properties.</p>
*/
inline void SetProperties(Aws::Vector<SavingsPlanOfferingProperty>&& value) { m_propertiesHasBeenSet = true; m_properties = std::move(value); }
/**
* <p>The properties.</p>
*/
inline SavingsPlanOffering& WithProperties(const Aws::Vector<SavingsPlanOfferingProperty>& value) { SetProperties(value); return *this;}
/**
* <p>The properties.</p>
*/
inline SavingsPlanOffering& WithProperties(Aws::Vector<SavingsPlanOfferingProperty>&& value) { SetProperties(std::move(value)); return *this;}
/**
* <p>The properties.</p>
*/
inline SavingsPlanOffering& AddProperties(const SavingsPlanOfferingProperty& value) { m_propertiesHasBeenSet = true; m_properties.push_back(value); return *this; }
/**
* <p>The properties.</p>
*/
inline SavingsPlanOffering& AddProperties(SavingsPlanOfferingProperty&& value) { m_propertiesHasBeenSet = true; m_properties.push_back(std::move(value)); return *this; }
private:
Aws::String m_offeringId;
bool m_offeringIdHasBeenSet;
Aws::Vector<SavingsPlanProductType> m_productTypes;
bool m_productTypesHasBeenSet;
SavingsPlanType m_planType;
bool m_planTypeHasBeenSet;
Aws::String m_description;
bool m_descriptionHasBeenSet;
SavingsPlanPaymentOption m_paymentOption;
bool m_paymentOptionHasBeenSet;
long long m_durationSeconds;
bool m_durationSecondsHasBeenSet;
CurrencyCode m_currency;
bool m_currencyHasBeenSet;
Aws::String m_serviceCode;
bool m_serviceCodeHasBeenSet;
Aws::String m_usageType;
bool m_usageTypeHasBeenSet;
Aws::String m_operation;
bool m_operationHasBeenSet;
Aws::Vector<SavingsPlanOfferingProperty> m_properties;
bool m_propertiesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanOfferingFilterAttribute
{
NOT_SET,
region,
instanceFamily
};
namespace SavingsPlanOfferingFilterAttributeMapper
{
AWS_SAVINGSPLANS_API SavingsPlanOfferingFilterAttribute GetSavingsPlanOfferingFilterAttributeForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanOfferingFilterAttribute(SavingsPlanOfferingFilterAttribute value);
} // namespace SavingsPlanOfferingFilterAttributeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/SavingsPlanOfferingFilterAttribute.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a filter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanOfferingFilterElement">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanOfferingFilterElement
{
public:
SavingsPlanOfferingFilterElement();
SavingsPlanOfferingFilterElement(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanOfferingFilterElement& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The filter name.</p>
*/
inline const SavingsPlanOfferingFilterAttribute& GetName() const{ return m_name; }
/**
* <p>The filter name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The filter name.</p>
*/
inline void SetName(const SavingsPlanOfferingFilterAttribute& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The filter name.</p>
*/
inline void SetName(SavingsPlanOfferingFilterAttribute&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The filter name.</p>
*/
inline SavingsPlanOfferingFilterElement& WithName(const SavingsPlanOfferingFilterAttribute& value) { SetName(value); return *this;}
/**
* <p>The filter name.</p>
*/
inline SavingsPlanOfferingFilterElement& WithName(SavingsPlanOfferingFilterAttribute&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The filter values.</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The filter values.</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The filter values.</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The filter values.</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingFilterElement& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingFilterElement& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingFilterElement& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingFilterElement& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingFilterElement& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
SavingsPlanOfferingFilterAttribute m_name;
bool m_nameHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,123 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/SavingsPlanOfferingPropertyKey.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a property.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanOfferingProperty">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanOfferingProperty
{
public:
SavingsPlanOfferingProperty();
SavingsPlanOfferingProperty(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanOfferingProperty& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The property name.</p>
*/
inline const SavingsPlanOfferingPropertyKey& GetName() const{ return m_name; }
/**
* <p>The property name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The property name.</p>
*/
inline void SetName(const SavingsPlanOfferingPropertyKey& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The property name.</p>
*/
inline void SetName(SavingsPlanOfferingPropertyKey&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The property name.</p>
*/
inline SavingsPlanOfferingProperty& WithName(const SavingsPlanOfferingPropertyKey& value) { SetName(value); return *this;}
/**
* <p>The property name.</p>
*/
inline SavingsPlanOfferingProperty& WithName(SavingsPlanOfferingPropertyKey&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The property value.</p>
*/
inline const Aws::String& GetValue() const{ return m_value; }
/**
* <p>The property value.</p>
*/
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
/**
* <p>The property value.</p>
*/
inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
/**
* <p>The property value.</p>
*/
inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
/**
* <p>The property value.</p>
*/
inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
/**
* <p>The property value.</p>
*/
inline SavingsPlanOfferingProperty& WithValue(const Aws::String& value) { SetValue(value); return *this;}
/**
* <p>The property value.</p>
*/
inline SavingsPlanOfferingProperty& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
/**
* <p>The property value.</p>
*/
inline SavingsPlanOfferingProperty& WithValue(const char* value) { SetValue(value); return *this;}
private:
SavingsPlanOfferingPropertyKey m_name;
bool m_nameHasBeenSet;
Aws::String m_value;
bool m_valueHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanOfferingPropertyKey
{
NOT_SET,
region,
instanceFamily
};
namespace SavingsPlanOfferingPropertyKeyMapper
{
AWS_SAVINGSPLANS_API SavingsPlanOfferingPropertyKey GetSavingsPlanOfferingPropertyKeyForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanOfferingPropertyKey(SavingsPlanOfferingPropertyKey value);
} // namespace SavingsPlanOfferingPropertyKeyMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,362 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/ParentSavingsPlanOffering.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/SavingsPlanRateUnit.h>
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <aws/savingsplans/model/SavingsPlanRateServiceCode.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/SavingsPlanOfferingRateProperty.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a Savings Plan offering rate.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanOfferingRate">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanOfferingRate
{
public:
SavingsPlanOfferingRate();
SavingsPlanOfferingRate(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanOfferingRate& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The Savings Plan offering.</p>
*/
inline const ParentSavingsPlanOffering& GetSavingsPlanOffering() const{ return m_savingsPlanOffering; }
/**
* <p>The Savings Plan offering.</p>
*/
inline bool SavingsPlanOfferingHasBeenSet() const { return m_savingsPlanOfferingHasBeenSet; }
/**
* <p>The Savings Plan offering.</p>
*/
inline void SetSavingsPlanOffering(const ParentSavingsPlanOffering& value) { m_savingsPlanOfferingHasBeenSet = true; m_savingsPlanOffering = value; }
/**
* <p>The Savings Plan offering.</p>
*/
inline void SetSavingsPlanOffering(ParentSavingsPlanOffering&& value) { m_savingsPlanOfferingHasBeenSet = true; m_savingsPlanOffering = std::move(value); }
/**
* <p>The Savings Plan offering.</p>
*/
inline SavingsPlanOfferingRate& WithSavingsPlanOffering(const ParentSavingsPlanOffering& value) { SetSavingsPlanOffering(value); return *this;}
/**
* <p>The Savings Plan offering.</p>
*/
inline SavingsPlanOfferingRate& WithSavingsPlanOffering(ParentSavingsPlanOffering&& value) { SetSavingsPlanOffering(std::move(value)); return *this;}
/**
* <p>The Savings Plan rate.</p>
*/
inline const Aws::String& GetRate() const{ return m_rate; }
/**
* <p>The Savings Plan rate.</p>
*/
inline bool RateHasBeenSet() const { return m_rateHasBeenSet; }
/**
* <p>The Savings Plan rate.</p>
*/
inline void SetRate(const Aws::String& value) { m_rateHasBeenSet = true; m_rate = value; }
/**
* <p>The Savings Plan rate.</p>
*/
inline void SetRate(Aws::String&& value) { m_rateHasBeenSet = true; m_rate = std::move(value); }
/**
* <p>The Savings Plan rate.</p>
*/
inline void SetRate(const char* value) { m_rateHasBeenSet = true; m_rate.assign(value); }
/**
* <p>The Savings Plan rate.</p>
*/
inline SavingsPlanOfferingRate& WithRate(const Aws::String& value) { SetRate(value); return *this;}
/**
* <p>The Savings Plan rate.</p>
*/
inline SavingsPlanOfferingRate& WithRate(Aws::String&& value) { SetRate(std::move(value)); return *this;}
/**
* <p>The Savings Plan rate.</p>
*/
inline SavingsPlanOfferingRate& WithRate(const char* value) { SetRate(value); return *this;}
/**
* <p>The unit.</p>
*/
inline const SavingsPlanRateUnit& GetUnit() const{ return m_unit; }
/**
* <p>The unit.</p>
*/
inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
/**
* <p>The unit.</p>
*/
inline void SetUnit(const SavingsPlanRateUnit& value) { m_unitHasBeenSet = true; m_unit = value; }
/**
* <p>The unit.</p>
*/
inline void SetUnit(SavingsPlanRateUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); }
/**
* <p>The unit.</p>
*/
inline SavingsPlanOfferingRate& WithUnit(const SavingsPlanRateUnit& value) { SetUnit(value); return *this;}
/**
* <p>The unit.</p>
*/
inline SavingsPlanOfferingRate& WithUnit(SavingsPlanRateUnit&& value) { SetUnit(std::move(value)); return *this;}
/**
* <p>The product type.</p>
*/
inline const SavingsPlanProductType& GetProductType() const{ return m_productType; }
/**
* <p>The product type.</p>
*/
inline bool ProductTypeHasBeenSet() const { return m_productTypeHasBeenSet; }
/**
* <p>The product type.</p>
*/
inline void SetProductType(const SavingsPlanProductType& value) { m_productTypeHasBeenSet = true; m_productType = value; }
/**
* <p>The product type.</p>
*/
inline void SetProductType(SavingsPlanProductType&& value) { m_productTypeHasBeenSet = true; m_productType = std::move(value); }
/**
* <p>The product type.</p>
*/
inline SavingsPlanOfferingRate& WithProductType(const SavingsPlanProductType& value) { SetProductType(value); return *this;}
/**
* <p>The product type.</p>
*/
inline SavingsPlanOfferingRate& WithProductType(SavingsPlanProductType&& value) { SetProductType(std::move(value)); return *this;}
/**
* <p>The service.</p>
*/
inline const SavingsPlanRateServiceCode& GetServiceCode() const{ return m_serviceCode; }
/**
* <p>The service.</p>
*/
inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(const SavingsPlanRateServiceCode& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = value; }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(SavingsPlanRateServiceCode&& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = std::move(value); }
/**
* <p>The service.</p>
*/
inline SavingsPlanOfferingRate& WithServiceCode(const SavingsPlanRateServiceCode& value) { SetServiceCode(value); return *this;}
/**
* <p>The service.</p>
*/
inline SavingsPlanOfferingRate& WithServiceCode(SavingsPlanRateServiceCode&& value) { SetServiceCode(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline const Aws::String& GetUsageType() const{ return m_usageType; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(const Aws::String& value) { m_usageTypeHasBeenSet = true; m_usageType = value; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(Aws::String&& value) { m_usageTypeHasBeenSet = true; m_usageType = std::move(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(const char* value) { m_usageTypeHasBeenSet = true; m_usageType.assign(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanOfferingRate& WithUsageType(const Aws::String& value) { SetUsageType(value); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanOfferingRate& WithUsageType(Aws::String&& value) { SetUsageType(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanOfferingRate& WithUsageType(const char* value) { SetUsageType(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline const Aws::String& GetOperation() const{ return m_operation; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(const Aws::String& value) { m_operationHasBeenSet = true; m_operation = value; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(Aws::String&& value) { m_operationHasBeenSet = true; m_operation = std::move(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(const char* value) { m_operationHasBeenSet = true; m_operation.assign(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanOfferingRate& WithOperation(const Aws::String& value) { SetOperation(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanOfferingRate& WithOperation(Aws::String&& value) { SetOperation(std::move(value)); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanOfferingRate& WithOperation(const char* value) { SetOperation(value); return *this;}
/**
* <p>The properties.</p>
*/
inline const Aws::Vector<SavingsPlanOfferingRateProperty>& GetProperties() const{ return m_properties; }
/**
* <p>The properties.</p>
*/
inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
/**
* <p>The properties.</p>
*/
inline void SetProperties(const Aws::Vector<SavingsPlanOfferingRateProperty>& value) { m_propertiesHasBeenSet = true; m_properties = value; }
/**
* <p>The properties.</p>
*/
inline void SetProperties(Aws::Vector<SavingsPlanOfferingRateProperty>&& value) { m_propertiesHasBeenSet = true; m_properties = std::move(value); }
/**
* <p>The properties.</p>
*/
inline SavingsPlanOfferingRate& WithProperties(const Aws::Vector<SavingsPlanOfferingRateProperty>& value) { SetProperties(value); return *this;}
/**
* <p>The properties.</p>
*/
inline SavingsPlanOfferingRate& WithProperties(Aws::Vector<SavingsPlanOfferingRateProperty>&& value) { SetProperties(std::move(value)); return *this;}
/**
* <p>The properties.</p>
*/
inline SavingsPlanOfferingRate& AddProperties(const SavingsPlanOfferingRateProperty& value) { m_propertiesHasBeenSet = true; m_properties.push_back(value); return *this; }
/**
* <p>The properties.</p>
*/
inline SavingsPlanOfferingRate& AddProperties(SavingsPlanOfferingRateProperty&& value) { m_propertiesHasBeenSet = true; m_properties.push_back(std::move(value)); return *this; }
private:
ParentSavingsPlanOffering m_savingsPlanOffering;
bool m_savingsPlanOfferingHasBeenSet;
Aws::String m_rate;
bool m_rateHasBeenSet;
SavingsPlanRateUnit m_unit;
bool m_unitHasBeenSet;
SavingsPlanProductType m_productType;
bool m_productTypeHasBeenSet;
SavingsPlanRateServiceCode m_serviceCode;
bool m_serviceCodeHasBeenSet;
Aws::String m_usageType;
bool m_usageTypeHasBeenSet;
Aws::String m_operation;
bool m_operationHasBeenSet;
Aws::Vector<SavingsPlanOfferingRateProperty> m_properties;
bool m_propertiesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/SavingsPlanRateFilterAttribute.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a filter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanOfferingRateFilterElement">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanOfferingRateFilterElement
{
public:
SavingsPlanOfferingRateFilterElement();
SavingsPlanOfferingRateFilterElement(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanOfferingRateFilterElement& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The filter name.</p>
*/
inline const SavingsPlanRateFilterAttribute& GetName() const{ return m_name; }
/**
* <p>The filter name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The filter name.</p>
*/
inline void SetName(const SavingsPlanRateFilterAttribute& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The filter name.</p>
*/
inline void SetName(SavingsPlanRateFilterAttribute&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The filter name.</p>
*/
inline SavingsPlanOfferingRateFilterElement& WithName(const SavingsPlanRateFilterAttribute& value) { SetName(value); return *this;}
/**
* <p>The filter name.</p>
*/
inline SavingsPlanOfferingRateFilterElement& WithName(SavingsPlanRateFilterAttribute&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The filter values.</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The filter values.</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The filter values.</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The filter values.</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingRateFilterElement& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingRateFilterElement& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingRateFilterElement& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingRateFilterElement& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanOfferingRateFilterElement& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
SavingsPlanRateFilterAttribute m_name;
bool m_nameHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,132 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a property.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanOfferingRateProperty">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanOfferingRateProperty
{
public:
SavingsPlanOfferingRateProperty();
SavingsPlanOfferingRateProperty(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanOfferingRateProperty& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The property name.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The property name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The property name.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The property name.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The property name.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The property name.</p>
*/
inline SavingsPlanOfferingRateProperty& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The property name.</p>
*/
inline SavingsPlanOfferingRateProperty& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The property name.</p>
*/
inline SavingsPlanOfferingRateProperty& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>The property value.</p>
*/
inline const Aws::String& GetValue() const{ return m_value; }
/**
* <p>The property value.</p>
*/
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
/**
* <p>The property value.</p>
*/
inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
/**
* <p>The property value.</p>
*/
inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
/**
* <p>The property value.</p>
*/
inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
/**
* <p>The property value.</p>
*/
inline SavingsPlanOfferingRateProperty& WithValue(const Aws::String& value) { SetValue(value); return *this;}
/**
* <p>The property value.</p>
*/
inline SavingsPlanOfferingRateProperty& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
/**
* <p>The property value.</p>
*/
inline SavingsPlanOfferingRateProperty& WithValue(const char* value) { SetValue(value); return *this;}
private:
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::String m_value;
bool m_valueHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanPaymentOption
{
NOT_SET,
All_Upfront,
Partial_Upfront,
No_Upfront
};
namespace SavingsPlanPaymentOptionMapper
{
AWS_SAVINGSPLANS_API SavingsPlanPaymentOption GetSavingsPlanPaymentOptionForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanPaymentOption(SavingsPlanPaymentOption value);
} // namespace SavingsPlanPaymentOptionMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanProductType
{
NOT_SET,
EC2,
Fargate,
Lambda
};
namespace SavingsPlanProductTypeMapper
{
AWS_SAVINGSPLANS_API SavingsPlanProductType GetSavingsPlanProductTypeForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanProductType(SavingsPlanProductType value);
} // namespace SavingsPlanProductTypeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,362 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/savingsplans/model/CurrencyCode.h>
#include <aws/savingsplans/model/SavingsPlanRateUnit.h>
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <aws/savingsplans/model/SavingsPlanRateServiceCode.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/savingsplans/model/SavingsPlanRateProperty.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a Savings Plan rate.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanRate">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanRate
{
public:
SavingsPlanRate();
SavingsPlanRate(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanRate& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The rate.</p>
*/
inline const Aws::String& GetRate() const{ return m_rate; }
/**
* <p>The rate.</p>
*/
inline bool RateHasBeenSet() const { return m_rateHasBeenSet; }
/**
* <p>The rate.</p>
*/
inline void SetRate(const Aws::String& value) { m_rateHasBeenSet = true; m_rate = value; }
/**
* <p>The rate.</p>
*/
inline void SetRate(Aws::String&& value) { m_rateHasBeenSet = true; m_rate = std::move(value); }
/**
* <p>The rate.</p>
*/
inline void SetRate(const char* value) { m_rateHasBeenSet = true; m_rate.assign(value); }
/**
* <p>The rate.</p>
*/
inline SavingsPlanRate& WithRate(const Aws::String& value) { SetRate(value); return *this;}
/**
* <p>The rate.</p>
*/
inline SavingsPlanRate& WithRate(Aws::String&& value) { SetRate(std::move(value)); return *this;}
/**
* <p>The rate.</p>
*/
inline SavingsPlanRate& WithRate(const char* value) { SetRate(value); return *this;}
/**
* <p>The currency.</p>
*/
inline const CurrencyCode& GetCurrency() const{ return m_currency; }
/**
* <p>The currency.</p>
*/
inline bool CurrencyHasBeenSet() const { return m_currencyHasBeenSet; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(const CurrencyCode& value) { m_currencyHasBeenSet = true; m_currency = value; }
/**
* <p>The currency.</p>
*/
inline void SetCurrency(CurrencyCode&& value) { m_currencyHasBeenSet = true; m_currency = std::move(value); }
/**
* <p>The currency.</p>
*/
inline SavingsPlanRate& WithCurrency(const CurrencyCode& value) { SetCurrency(value); return *this;}
/**
* <p>The currency.</p>
*/
inline SavingsPlanRate& WithCurrency(CurrencyCode&& value) { SetCurrency(std::move(value)); return *this;}
/**
* <p>The unit.</p>
*/
inline const SavingsPlanRateUnit& GetUnit() const{ return m_unit; }
/**
* <p>The unit.</p>
*/
inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
/**
* <p>The unit.</p>
*/
inline void SetUnit(const SavingsPlanRateUnit& value) { m_unitHasBeenSet = true; m_unit = value; }
/**
* <p>The unit.</p>
*/
inline void SetUnit(SavingsPlanRateUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); }
/**
* <p>The unit.</p>
*/
inline SavingsPlanRate& WithUnit(const SavingsPlanRateUnit& value) { SetUnit(value); return *this;}
/**
* <p>The unit.</p>
*/
inline SavingsPlanRate& WithUnit(SavingsPlanRateUnit&& value) { SetUnit(std::move(value)); return *this;}
/**
* <p>The product type.</p>
*/
inline const SavingsPlanProductType& GetProductType() const{ return m_productType; }
/**
* <p>The product type.</p>
*/
inline bool ProductTypeHasBeenSet() const { return m_productTypeHasBeenSet; }
/**
* <p>The product type.</p>
*/
inline void SetProductType(const SavingsPlanProductType& value) { m_productTypeHasBeenSet = true; m_productType = value; }
/**
* <p>The product type.</p>
*/
inline void SetProductType(SavingsPlanProductType&& value) { m_productTypeHasBeenSet = true; m_productType = std::move(value); }
/**
* <p>The product type.</p>
*/
inline SavingsPlanRate& WithProductType(const SavingsPlanProductType& value) { SetProductType(value); return *this;}
/**
* <p>The product type.</p>
*/
inline SavingsPlanRate& WithProductType(SavingsPlanProductType&& value) { SetProductType(std::move(value)); return *this;}
/**
* <p>The service.</p>
*/
inline const SavingsPlanRateServiceCode& GetServiceCode() const{ return m_serviceCode; }
/**
* <p>The service.</p>
*/
inline bool ServiceCodeHasBeenSet() const { return m_serviceCodeHasBeenSet; }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(const SavingsPlanRateServiceCode& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = value; }
/**
* <p>The service.</p>
*/
inline void SetServiceCode(SavingsPlanRateServiceCode&& value) { m_serviceCodeHasBeenSet = true; m_serviceCode = std::move(value); }
/**
* <p>The service.</p>
*/
inline SavingsPlanRate& WithServiceCode(const SavingsPlanRateServiceCode& value) { SetServiceCode(value); return *this;}
/**
* <p>The service.</p>
*/
inline SavingsPlanRate& WithServiceCode(SavingsPlanRateServiceCode&& value) { SetServiceCode(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline const Aws::String& GetUsageType() const{ return m_usageType; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(const Aws::String& value) { m_usageTypeHasBeenSet = true; m_usageType = value; }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(Aws::String&& value) { m_usageTypeHasBeenSet = true; m_usageType = std::move(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline void SetUsageType(const char* value) { m_usageTypeHasBeenSet = true; m_usageType.assign(value); }
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanRate& WithUsageType(const Aws::String& value) { SetUsageType(value); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanRate& WithUsageType(Aws::String&& value) { SetUsageType(std::move(value)); return *this;}
/**
* <p>The usage details of the line item in the billing report.</p>
*/
inline SavingsPlanRate& WithUsageType(const char* value) { SetUsageType(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline const Aws::String& GetOperation() const{ return m_operation; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline bool OperationHasBeenSet() const { return m_operationHasBeenSet; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(const Aws::String& value) { m_operationHasBeenSet = true; m_operation = value; }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(Aws::String&& value) { m_operationHasBeenSet = true; m_operation = std::move(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline void SetOperation(const char* value) { m_operationHasBeenSet = true; m_operation.assign(value); }
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanRate& WithOperation(const Aws::String& value) { SetOperation(value); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanRate& WithOperation(Aws::String&& value) { SetOperation(std::move(value)); return *this;}
/**
* <p>The specific AWS operation for the line item in the billing report.</p>
*/
inline SavingsPlanRate& WithOperation(const char* value) { SetOperation(value); return *this;}
/**
* <p>The properties.</p>
*/
inline const Aws::Vector<SavingsPlanRateProperty>& GetProperties() const{ return m_properties; }
/**
* <p>The properties.</p>
*/
inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
/**
* <p>The properties.</p>
*/
inline void SetProperties(const Aws::Vector<SavingsPlanRateProperty>& value) { m_propertiesHasBeenSet = true; m_properties = value; }
/**
* <p>The properties.</p>
*/
inline void SetProperties(Aws::Vector<SavingsPlanRateProperty>&& value) { m_propertiesHasBeenSet = true; m_properties = std::move(value); }
/**
* <p>The properties.</p>
*/
inline SavingsPlanRate& WithProperties(const Aws::Vector<SavingsPlanRateProperty>& value) { SetProperties(value); return *this;}
/**
* <p>The properties.</p>
*/
inline SavingsPlanRate& WithProperties(Aws::Vector<SavingsPlanRateProperty>&& value) { SetProperties(std::move(value)); return *this;}
/**
* <p>The properties.</p>
*/
inline SavingsPlanRate& AddProperties(const SavingsPlanRateProperty& value) { m_propertiesHasBeenSet = true; m_properties.push_back(value); return *this; }
/**
* <p>The properties.</p>
*/
inline SavingsPlanRate& AddProperties(SavingsPlanRateProperty&& value) { m_propertiesHasBeenSet = true; m_properties.push_back(std::move(value)); return *this; }
private:
Aws::String m_rate;
bool m_rateHasBeenSet;
CurrencyCode m_currency;
bool m_currencyHasBeenSet;
SavingsPlanRateUnit m_unit;
bool m_unitHasBeenSet;
SavingsPlanProductType m_productType;
bool m_productTypeHasBeenSet;
SavingsPlanRateServiceCode m_serviceCode;
bool m_serviceCodeHasBeenSet;
Aws::String m_usageType;
bool m_usageTypeHasBeenSet;
Aws::String m_operation;
bool m_operationHasBeenSet;
Aws::Vector<SavingsPlanRateProperty> m_properties;
bool m_propertiesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/SavingsPlanRateFilterName.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a filter.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanRateFilter">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanRateFilter
{
public:
SavingsPlanRateFilter();
SavingsPlanRateFilter(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanRateFilter& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The filter name.</p>
*/
inline const SavingsPlanRateFilterName& GetName() const{ return m_name; }
/**
* <p>The filter name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The filter name.</p>
*/
inline void SetName(const SavingsPlanRateFilterName& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The filter name.</p>
*/
inline void SetName(SavingsPlanRateFilterName&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The filter name.</p>
*/
inline SavingsPlanRateFilter& WithName(const SavingsPlanRateFilterName& value) { SetName(value); return *this;}
/**
* <p>The filter name.</p>
*/
inline SavingsPlanRateFilter& WithName(SavingsPlanRateFilterName&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The filter values.</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The filter values.</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The filter values.</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The filter values.</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanRateFilter& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The filter values.</p>
*/
inline SavingsPlanRateFilter& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The filter values.</p>
*/
inline SavingsPlanRateFilter& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanRateFilter& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The filter values.</p>
*/
inline SavingsPlanRateFilter& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
SavingsPlanRateFilterName m_name;
bool m_nameHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanRateFilterAttribute
{
NOT_SET,
region,
instanceFamily,
instanceType,
productDescription,
tenancy,
productId
};
namespace SavingsPlanRateFilterAttributeMapper
{
AWS_SAVINGSPLANS_API SavingsPlanRateFilterAttribute GetSavingsPlanRateFilterAttributeForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanRateFilterAttribute(SavingsPlanRateFilterAttribute value);
} // namespace SavingsPlanRateFilterAttributeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanRateFilterName
{
NOT_SET,
region,
instanceType,
productDescription,
tenancy,
productType,
serviceCode,
usageType,
operation
};
namespace SavingsPlanRateFilterNameMapper
{
AWS_SAVINGSPLANS_API SavingsPlanRateFilterName GetSavingsPlanRateFilterNameForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanRateFilterName(SavingsPlanRateFilterName value);
} // namespace SavingsPlanRateFilterNameMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,123 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/model/SavingsPlanRatePropertyKey.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
/**
* <p>Information about a property.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/savingsplans-2019-06-28/SavingsPlanRateProperty">AWS
* API Reference</a></p>
*/
class AWS_SAVINGSPLANS_API SavingsPlanRateProperty
{
public:
SavingsPlanRateProperty();
SavingsPlanRateProperty(Aws::Utils::Json::JsonView jsonValue);
SavingsPlanRateProperty& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The property name.</p>
*/
inline const SavingsPlanRatePropertyKey& GetName() const{ return m_name; }
/**
* <p>The property name.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The property name.</p>
*/
inline void SetName(const SavingsPlanRatePropertyKey& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The property name.</p>
*/
inline void SetName(SavingsPlanRatePropertyKey&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The property name.</p>
*/
inline SavingsPlanRateProperty& WithName(const SavingsPlanRatePropertyKey& value) { SetName(value); return *this;}
/**
* <p>The property name.</p>
*/
inline SavingsPlanRateProperty& WithName(SavingsPlanRatePropertyKey&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The property value.</p>
*/
inline const Aws::String& GetValue() const{ return m_value; }
/**
* <p>The property value.</p>
*/
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
/**
* <p>The property value.</p>
*/
inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
/**
* <p>The property value.</p>
*/
inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
/**
* <p>The property value.</p>
*/
inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
/**
* <p>The property value.</p>
*/
inline SavingsPlanRateProperty& WithValue(const Aws::String& value) { SetValue(value); return *this;}
/**
* <p>The property value.</p>
*/
inline SavingsPlanRateProperty& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
/**
* <p>The property value.</p>
*/
inline SavingsPlanRateProperty& WithValue(const char* value) { SetValue(value); return *this;}
private:
SavingsPlanRatePropertyKey m_name;
bool m_nameHasBeenSet;
Aws::String m_value;
bool m_valueHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanRatePropertyKey
{
NOT_SET,
region,
instanceType,
instanceFamily,
productDescription,
tenancy
};
namespace SavingsPlanRatePropertyKeyMapper
{
AWS_SAVINGSPLANS_API SavingsPlanRatePropertyKey GetSavingsPlanRatePropertyKeyForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanRatePropertyKey(SavingsPlanRatePropertyKey value);
} // namespace SavingsPlanRatePropertyKeyMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanRateServiceCode
{
NOT_SET,
AmazonEC2,
AmazonECS,
AmazonEKS,
AWSLambda
};
namespace SavingsPlanRateServiceCodeMapper
{
AWS_SAVINGSPLANS_API SavingsPlanRateServiceCode GetSavingsPlanRateServiceCodeForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanRateServiceCode(SavingsPlanRateServiceCode value);
} // namespace SavingsPlanRateServiceCodeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanRateUnit
{
NOT_SET,
Hrs,
Lambda_GB_Second,
Request
};
namespace SavingsPlanRateUnitMapper
{
AWS_SAVINGSPLANS_API SavingsPlanRateUnit GetSavingsPlanRateUnitForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanRateUnit(SavingsPlanRateUnit value);
} // namespace SavingsPlanRateUnitMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanState
{
NOT_SET,
payment_pending,
payment_failed,
active,
retired
};
namespace SavingsPlanStateMapper
{
AWS_SAVINGSPLANS_API SavingsPlanState GetSavingsPlanStateForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanState(SavingsPlanState value);
} // namespace SavingsPlanStateMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlanType
{
NOT_SET,
Compute,
EC2Instance
};
namespace SavingsPlanTypeMapper
{
AWS_SAVINGSPLANS_API SavingsPlanType GetSavingsPlanTypeForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlanType(SavingsPlanType value);
} // namespace SavingsPlanTypeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,38 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
enum class SavingsPlansFilterName
{
NOT_SET,
region,
ec2_instance_family,
commitment,
upfront,
term,
savings_plan_type,
payment_option,
start,
end
};
namespace SavingsPlansFilterNameMapper
{
AWS_SAVINGSPLANS_API SavingsPlansFilterName GetSavingsPlansFilterNameForName(const Aws::String& name);
AWS_SAVINGSPLANS_API Aws::String GetNameForSavingsPlansFilterName(SavingsPlansFilterName value);
} // namespace SavingsPlansFilterNameMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,166 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API TagResourceRequest : public SavingsPlansRequest
{
public:
TagResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
Aws::String SerializePayload() const override;
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* <p>One or more tags. For example, { "tags": {"key1":"value1", "key2":"value2"}
* }.</p>
*/
inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
Aws::Map<Aws::String, Aws::String> m_tags;
bool m_tagsHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API TagResourceResult
{
public:
TagResourceResult();
TagResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
TagResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,133 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
#include <aws/savingsplans/SavingsPlansRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
/**
*/
class AWS_SAVINGSPLANS_API UntagResourceRequest : public SavingsPlansRequest
{
public:
UntagResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UntagResource"; }
Aws::String SerializePayload() const override;
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline UntagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline UntagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
/**
* <p>The Amazon Resource Name (ARN) of the resource.</p>
*/
inline UntagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
/**
* <p>The tag keys.</p>
*/
inline const Aws::Vector<Aws::String>& GetTagKeys() const{ return m_tagKeys; }
/**
* <p>The tag keys.</p>
*/
inline bool TagKeysHasBeenSet() const { return m_tagKeysHasBeenSet; }
/**
* <p>The tag keys.</p>
*/
inline void SetTagKeys(const Aws::Vector<Aws::String>& value) { m_tagKeysHasBeenSet = true; m_tagKeys = value; }
/**
* <p>The tag keys.</p>
*/
inline void SetTagKeys(Aws::Vector<Aws::String>&& value) { m_tagKeysHasBeenSet = true; m_tagKeys = std::move(value); }
/**
* <p>The tag keys.</p>
*/
inline UntagResourceRequest& WithTagKeys(const Aws::Vector<Aws::String>& value) { SetTagKeys(value); return *this;}
/**
* <p>The tag keys.</p>
*/
inline UntagResourceRequest& WithTagKeys(Aws::Vector<Aws::String>&& value) { SetTagKeys(std::move(value)); return *this;}
/**
* <p>The tag keys.</p>
*/
inline UntagResourceRequest& AddTagKeys(const Aws::String& value) { m_tagKeysHasBeenSet = true; m_tagKeys.push_back(value); return *this; }
/**
* <p>The tag keys.</p>
*/
inline UntagResourceRequest& AddTagKeys(Aws::String&& value) { m_tagKeysHasBeenSet = true; m_tagKeys.push_back(std::move(value)); return *this; }
/**
* <p>The tag keys.</p>
*/
inline UntagResourceRequest& AddTagKeys(const char* value) { m_tagKeysHasBeenSet = true; m_tagKeys.push_back(value); return *this; }
private:
Aws::String m_resourceArn;
bool m_resourceArnHasBeenSet;
Aws::Vector<Aws::String> m_tagKeys;
bool m_tagKeysHasBeenSet;
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/savingsplans/SavingsPlans_EXPORTS.h>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SavingsPlans
{
namespace Model
{
class AWS_SAVINGSPLANS_API UntagResourceResult
{
public:
UntagResourceResult();
UntagResourceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
UntagResourceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
};
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,320 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/savingsplans/SavingsPlansClient.h>
#include <aws/savingsplans/SavingsPlansEndpoint.h>
#include <aws/savingsplans/SavingsPlansErrorMarshaller.h>
#include <aws/savingsplans/model/CreateSavingsPlanRequest.h>
#include <aws/savingsplans/model/DescribeSavingsPlanRatesRequest.h>
#include <aws/savingsplans/model/DescribeSavingsPlansRequest.h>
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingRatesRequest.h>
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingsRequest.h>
#include <aws/savingsplans/model/ListTagsForResourceRequest.h>
#include <aws/savingsplans/model/TagResourceRequest.h>
#include <aws/savingsplans/model/UntagResourceRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::SavingsPlans;
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "savingsplans";
static const char* ALLOCATION_TAG = "SavingsPlansClient";
SavingsPlansClient::SavingsPlansClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<SavingsPlansErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
SavingsPlansClient::SavingsPlansClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<SavingsPlansErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
SavingsPlansClient::SavingsPlansClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<SavingsPlansErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
SavingsPlansClient::~SavingsPlansClient()
{
}
void SavingsPlansClient::init(const ClientConfiguration& config)
{
SetServiceClientName("savingsplans");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + SavingsPlansEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void SavingsPlansClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
CreateSavingsPlanOutcome SavingsPlansClient::CreateSavingsPlan(const CreateSavingsPlanRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/CreateSavingsPlan";
uri.SetPath(uri.GetPath() + ss.str());
return CreateSavingsPlanOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateSavingsPlanOutcomeCallable SavingsPlansClient::CreateSavingsPlanCallable(const CreateSavingsPlanRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateSavingsPlanOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateSavingsPlan(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::CreateSavingsPlanAsync(const CreateSavingsPlanRequest& request, const CreateSavingsPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateSavingsPlanAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::CreateSavingsPlanAsyncHelper(const CreateSavingsPlanRequest& request, const CreateSavingsPlanResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateSavingsPlan(request), context);
}
DescribeSavingsPlanRatesOutcome SavingsPlansClient::DescribeSavingsPlanRates(const DescribeSavingsPlanRatesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/DescribeSavingsPlanRates";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeSavingsPlanRatesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeSavingsPlanRatesOutcomeCallable SavingsPlansClient::DescribeSavingsPlanRatesCallable(const DescribeSavingsPlanRatesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeSavingsPlanRatesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeSavingsPlanRates(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::DescribeSavingsPlanRatesAsync(const DescribeSavingsPlanRatesRequest& request, const DescribeSavingsPlanRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeSavingsPlanRatesAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::DescribeSavingsPlanRatesAsyncHelper(const DescribeSavingsPlanRatesRequest& request, const DescribeSavingsPlanRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeSavingsPlanRates(request), context);
}
DescribeSavingsPlansOutcome SavingsPlansClient::DescribeSavingsPlans(const DescribeSavingsPlansRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/DescribeSavingsPlans";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeSavingsPlansOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeSavingsPlansOutcomeCallable SavingsPlansClient::DescribeSavingsPlansCallable(const DescribeSavingsPlansRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeSavingsPlansOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeSavingsPlans(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::DescribeSavingsPlansAsync(const DescribeSavingsPlansRequest& request, const DescribeSavingsPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeSavingsPlansAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::DescribeSavingsPlansAsyncHelper(const DescribeSavingsPlansRequest& request, const DescribeSavingsPlansResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeSavingsPlans(request), context);
}
DescribeSavingsPlansOfferingRatesOutcome SavingsPlansClient::DescribeSavingsPlansOfferingRates(const DescribeSavingsPlansOfferingRatesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/DescribeSavingsPlansOfferingRates";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeSavingsPlansOfferingRatesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeSavingsPlansOfferingRatesOutcomeCallable SavingsPlansClient::DescribeSavingsPlansOfferingRatesCallable(const DescribeSavingsPlansOfferingRatesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeSavingsPlansOfferingRatesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeSavingsPlansOfferingRates(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::DescribeSavingsPlansOfferingRatesAsync(const DescribeSavingsPlansOfferingRatesRequest& request, const DescribeSavingsPlansOfferingRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeSavingsPlansOfferingRatesAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::DescribeSavingsPlansOfferingRatesAsyncHelper(const DescribeSavingsPlansOfferingRatesRequest& request, const DescribeSavingsPlansOfferingRatesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeSavingsPlansOfferingRates(request), context);
}
DescribeSavingsPlansOfferingsOutcome SavingsPlansClient::DescribeSavingsPlansOfferings(const DescribeSavingsPlansOfferingsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/DescribeSavingsPlansOfferings";
uri.SetPath(uri.GetPath() + ss.str());
return DescribeSavingsPlansOfferingsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
DescribeSavingsPlansOfferingsOutcomeCallable SavingsPlansClient::DescribeSavingsPlansOfferingsCallable(const DescribeSavingsPlansOfferingsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< DescribeSavingsPlansOfferingsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->DescribeSavingsPlansOfferings(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::DescribeSavingsPlansOfferingsAsync(const DescribeSavingsPlansOfferingsRequest& request, const DescribeSavingsPlansOfferingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->DescribeSavingsPlansOfferingsAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::DescribeSavingsPlansOfferingsAsyncHelper(const DescribeSavingsPlansOfferingsRequest& request, const DescribeSavingsPlansOfferingsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, DescribeSavingsPlansOfferings(request), context);
}
ListTagsForResourceOutcome SavingsPlansClient::ListTagsForResource(const ListTagsForResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/ListTagsForResource";
uri.SetPath(uri.GetPath() + ss.str());
return ListTagsForResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
ListTagsForResourceOutcomeCallable SavingsPlansClient::ListTagsForResourceCallable(const ListTagsForResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< ListTagsForResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->ListTagsForResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::ListTagsForResourceAsync(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->ListTagsForResourceAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::ListTagsForResourceAsyncHelper(const ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, ListTagsForResource(request), context);
}
TagResourceOutcome SavingsPlansClient::TagResource(const TagResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/TagResource";
uri.SetPath(uri.GetPath() + ss.str());
return TagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
TagResourceOutcomeCallable SavingsPlansClient::TagResourceCallable(const TagResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< TagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->TagResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::TagResourceAsync(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->TagResourceAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::TagResourceAsyncHelper(const TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, TagResource(request), context);
}
UntagResourceOutcome SavingsPlansClient::UntagResource(const UntagResourceRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/UntagResource";
uri.SetPath(uri.GetPath() + ss.str());
return UntagResourceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UntagResourceOutcomeCallable SavingsPlansClient::UntagResourceCallable(const UntagResourceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UntagResourceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UntagResource(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void SavingsPlansClient::UntagResourceAsync(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UntagResourceAsyncHelper( request, handler, context ); } );
}
void SavingsPlansClient::UntagResourceAsyncHelper(const UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UntagResource(request), context);
}

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/SavingsPlansEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::SavingsPlans;
namespace Aws
{
namespace SavingsPlans
{
namespace SavingsPlansEndpoint
{
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
AWS_UNREFERENCED_PARAM(regionName);
AWS_UNREFERENCED_PARAM(useDualStack);
return "savingsplans.amazonaws.com";
}
} // namespace SavingsPlansEndpoint
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/savingsplans/SavingsPlansErrorMarshaller.h>
#include <aws/savingsplans/SavingsPlansErrors.h>
using namespace Aws::Client;
using namespace Aws::SavingsPlans;
AWSError<CoreErrors> SavingsPlansErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = SavingsPlansErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/savingsplans/SavingsPlansErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::SavingsPlans;
namespace Aws
{
namespace SavingsPlans
{
namespace SavingsPlansErrorMapper
{
static const int SERVICE_QUOTA_EXCEEDED_HASH = HashingUtils::HashString("ServiceQuotaExceededException");
static const int INTERNAL_SERVER_HASH = HashingUtils::HashString("InternalServerException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == SERVICE_QUOTA_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SavingsPlansErrors::SERVICE_QUOTA_EXCEEDED), false);
}
else if (hashCode == INTERNAL_SERVER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SavingsPlansErrors::INTERNAL_SERVER), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace SavingsPlansErrorMapper
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,69 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/CreateSavingsPlanRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateSavingsPlanRequest::CreateSavingsPlanRequest() :
m_savingsPlanOfferingIdHasBeenSet(false),
m_commitmentHasBeenSet(false),
m_upfrontPaymentAmountHasBeenSet(false),
m_clientToken(Aws::Utils::UUID::RandomUUID()),
m_clientTokenHasBeenSet(true),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateSavingsPlanRequest::SerializePayload() const
{
JsonValue payload;
if(m_savingsPlanOfferingIdHasBeenSet)
{
payload.WithString("savingsPlanOfferingId", m_savingsPlanOfferingId);
}
if(m_commitmentHasBeenSet)
{
payload.WithString("commitment", m_commitment);
}
if(m_upfrontPaymentAmountHasBeenSet)
{
payload.WithString("upfrontPaymentAmount", m_upfrontPaymentAmount);
}
if(m_clientTokenHasBeenSet)
{
payload.WithString("clientToken", m_clientToken);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/CreateSavingsPlanResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateSavingsPlanResult::CreateSavingsPlanResult()
{
}
CreateSavingsPlanResult::CreateSavingsPlanResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateSavingsPlanResult& CreateSavingsPlanResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("savingsPlanId"))
{
m_savingsPlanId = jsonValue.GetString("savingsPlanId");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/CurrencyCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace CurrencyCodeMapper
{
static const int CNY_HASH = HashingUtils::HashString("CNY");
static const int USD_HASH = HashingUtils::HashString("USD");
CurrencyCode GetCurrencyCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CNY_HASH)
{
return CurrencyCode::CNY;
}
else if (hashCode == USD_HASH)
{
return CurrencyCode::USD;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CurrencyCode>(hashCode);
}
return CurrencyCode::NOT_SET;
}
Aws::String GetNameForCurrencyCode(CurrencyCode enumValue)
{
switch(enumValue)
{
case CurrencyCode::CNY:
return "CNY";
case CurrencyCode::USD:
return "USD";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CurrencyCodeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlanRatesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeSavingsPlanRatesRequest::DescribeSavingsPlanRatesRequest() :
m_savingsPlanIdHasBeenSet(false),
m_filtersHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String DescribeSavingsPlanRatesRequest::SerializePayload() const
{
JsonValue payload;
if(m_savingsPlanIdHasBeenSet)
{
payload.WithString("savingsPlanId", m_savingsPlanId);
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlanRatesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeSavingsPlanRatesResult::DescribeSavingsPlanRatesResult()
{
}
DescribeSavingsPlanRatesResult::DescribeSavingsPlanRatesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeSavingsPlanRatesResult& DescribeSavingsPlanRatesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("savingsPlanId"))
{
m_savingsPlanId = jsonValue.GetString("savingsPlanId");
}
if(jsonValue.ValueExists("searchResults"))
{
Array<JsonView> searchResultsJsonList = jsonValue.GetArray("searchResults");
for(unsigned searchResultsIndex = 0; searchResultsIndex < searchResultsJsonList.GetLength(); ++searchResultsIndex)
{
m_searchResults.push_back(searchResultsJsonList[searchResultsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,139 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingRatesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeSavingsPlansOfferingRatesRequest::DescribeSavingsPlansOfferingRatesRequest() :
m_savingsPlanOfferingIdsHasBeenSet(false),
m_savingsPlanPaymentOptionsHasBeenSet(false),
m_savingsPlanTypesHasBeenSet(false),
m_productsHasBeenSet(false),
m_serviceCodesHasBeenSet(false),
m_usageTypesHasBeenSet(false),
m_operationsHasBeenSet(false),
m_filtersHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String DescribeSavingsPlansOfferingRatesRequest::SerializePayload() const
{
JsonValue payload;
if(m_savingsPlanOfferingIdsHasBeenSet)
{
Array<JsonValue> savingsPlanOfferingIdsJsonList(m_savingsPlanOfferingIds.size());
for(unsigned savingsPlanOfferingIdsIndex = 0; savingsPlanOfferingIdsIndex < savingsPlanOfferingIdsJsonList.GetLength(); ++savingsPlanOfferingIdsIndex)
{
savingsPlanOfferingIdsJsonList[savingsPlanOfferingIdsIndex].AsString(m_savingsPlanOfferingIds[savingsPlanOfferingIdsIndex]);
}
payload.WithArray("savingsPlanOfferingIds", std::move(savingsPlanOfferingIdsJsonList));
}
if(m_savingsPlanPaymentOptionsHasBeenSet)
{
Array<JsonValue> savingsPlanPaymentOptionsJsonList(m_savingsPlanPaymentOptions.size());
for(unsigned savingsPlanPaymentOptionsIndex = 0; savingsPlanPaymentOptionsIndex < savingsPlanPaymentOptionsJsonList.GetLength(); ++savingsPlanPaymentOptionsIndex)
{
savingsPlanPaymentOptionsJsonList[savingsPlanPaymentOptionsIndex].AsString(SavingsPlanPaymentOptionMapper::GetNameForSavingsPlanPaymentOption(m_savingsPlanPaymentOptions[savingsPlanPaymentOptionsIndex]));
}
payload.WithArray("savingsPlanPaymentOptions", std::move(savingsPlanPaymentOptionsJsonList));
}
if(m_savingsPlanTypesHasBeenSet)
{
Array<JsonValue> savingsPlanTypesJsonList(m_savingsPlanTypes.size());
for(unsigned savingsPlanTypesIndex = 0; savingsPlanTypesIndex < savingsPlanTypesJsonList.GetLength(); ++savingsPlanTypesIndex)
{
savingsPlanTypesJsonList[savingsPlanTypesIndex].AsString(SavingsPlanTypeMapper::GetNameForSavingsPlanType(m_savingsPlanTypes[savingsPlanTypesIndex]));
}
payload.WithArray("savingsPlanTypes", std::move(savingsPlanTypesJsonList));
}
if(m_productsHasBeenSet)
{
Array<JsonValue> productsJsonList(m_products.size());
for(unsigned productsIndex = 0; productsIndex < productsJsonList.GetLength(); ++productsIndex)
{
productsJsonList[productsIndex].AsString(SavingsPlanProductTypeMapper::GetNameForSavingsPlanProductType(m_products[productsIndex]));
}
payload.WithArray("products", std::move(productsJsonList));
}
if(m_serviceCodesHasBeenSet)
{
Array<JsonValue> serviceCodesJsonList(m_serviceCodes.size());
for(unsigned serviceCodesIndex = 0; serviceCodesIndex < serviceCodesJsonList.GetLength(); ++serviceCodesIndex)
{
serviceCodesJsonList[serviceCodesIndex].AsString(SavingsPlanRateServiceCodeMapper::GetNameForSavingsPlanRateServiceCode(m_serviceCodes[serviceCodesIndex]));
}
payload.WithArray("serviceCodes", std::move(serviceCodesJsonList));
}
if(m_usageTypesHasBeenSet)
{
Array<JsonValue> usageTypesJsonList(m_usageTypes.size());
for(unsigned usageTypesIndex = 0; usageTypesIndex < usageTypesJsonList.GetLength(); ++usageTypesIndex)
{
usageTypesJsonList[usageTypesIndex].AsString(m_usageTypes[usageTypesIndex]);
}
payload.WithArray("usageTypes", std::move(usageTypesJsonList));
}
if(m_operationsHasBeenSet)
{
Array<JsonValue> operationsJsonList(m_operations.size());
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
operationsJsonList[operationsIndex].AsString(m_operations[operationsIndex]);
}
payload.WithArray("operations", std::move(operationsJsonList));
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingRatesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeSavingsPlansOfferingRatesResult::DescribeSavingsPlansOfferingRatesResult()
{
}
DescribeSavingsPlansOfferingRatesResult::DescribeSavingsPlansOfferingRatesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeSavingsPlansOfferingRatesResult& DescribeSavingsPlansOfferingRatesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("searchResults"))
{
Array<JsonView> searchResultsJsonList = jsonValue.GetArray("searchResults");
for(unsigned searchResultsIndex = 0; searchResultsIndex < searchResultsJsonList.GetLength(); ++searchResultsIndex)
{
m_searchResults.push_back(searchResultsJsonList[searchResultsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,170 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeSavingsPlansOfferingsRequest::DescribeSavingsPlansOfferingsRequest() :
m_offeringIdsHasBeenSet(false),
m_paymentOptionsHasBeenSet(false),
m_productType(SavingsPlanProductType::NOT_SET),
m_productTypeHasBeenSet(false),
m_planTypesHasBeenSet(false),
m_durationsHasBeenSet(false),
m_currenciesHasBeenSet(false),
m_descriptionsHasBeenSet(false),
m_serviceCodesHasBeenSet(false),
m_usageTypesHasBeenSet(false),
m_operationsHasBeenSet(false),
m_filtersHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String DescribeSavingsPlansOfferingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_offeringIdsHasBeenSet)
{
Array<JsonValue> offeringIdsJsonList(m_offeringIds.size());
for(unsigned offeringIdsIndex = 0; offeringIdsIndex < offeringIdsJsonList.GetLength(); ++offeringIdsIndex)
{
offeringIdsJsonList[offeringIdsIndex].AsString(m_offeringIds[offeringIdsIndex]);
}
payload.WithArray("offeringIds", std::move(offeringIdsJsonList));
}
if(m_paymentOptionsHasBeenSet)
{
Array<JsonValue> paymentOptionsJsonList(m_paymentOptions.size());
for(unsigned paymentOptionsIndex = 0; paymentOptionsIndex < paymentOptionsJsonList.GetLength(); ++paymentOptionsIndex)
{
paymentOptionsJsonList[paymentOptionsIndex].AsString(SavingsPlanPaymentOptionMapper::GetNameForSavingsPlanPaymentOption(m_paymentOptions[paymentOptionsIndex]));
}
payload.WithArray("paymentOptions", std::move(paymentOptionsJsonList));
}
if(m_productTypeHasBeenSet)
{
payload.WithString("productType", SavingsPlanProductTypeMapper::GetNameForSavingsPlanProductType(m_productType));
}
if(m_planTypesHasBeenSet)
{
Array<JsonValue> planTypesJsonList(m_planTypes.size());
for(unsigned planTypesIndex = 0; planTypesIndex < planTypesJsonList.GetLength(); ++planTypesIndex)
{
planTypesJsonList[planTypesIndex].AsString(SavingsPlanTypeMapper::GetNameForSavingsPlanType(m_planTypes[planTypesIndex]));
}
payload.WithArray("planTypes", std::move(planTypesJsonList));
}
if(m_durationsHasBeenSet)
{
Array<JsonValue> durationsJsonList(m_durations.size());
for(unsigned durationsIndex = 0; durationsIndex < durationsJsonList.GetLength(); ++durationsIndex)
{
durationsJsonList[durationsIndex].AsInt64(m_durations[durationsIndex]);
}
payload.WithArray("durations", std::move(durationsJsonList));
}
if(m_currenciesHasBeenSet)
{
Array<JsonValue> currenciesJsonList(m_currencies.size());
for(unsigned currenciesIndex = 0; currenciesIndex < currenciesJsonList.GetLength(); ++currenciesIndex)
{
currenciesJsonList[currenciesIndex].AsString(CurrencyCodeMapper::GetNameForCurrencyCode(m_currencies[currenciesIndex]));
}
payload.WithArray("currencies", std::move(currenciesJsonList));
}
if(m_descriptionsHasBeenSet)
{
Array<JsonValue> descriptionsJsonList(m_descriptions.size());
for(unsigned descriptionsIndex = 0; descriptionsIndex < descriptionsJsonList.GetLength(); ++descriptionsIndex)
{
descriptionsJsonList[descriptionsIndex].AsString(m_descriptions[descriptionsIndex]);
}
payload.WithArray("descriptions", std::move(descriptionsJsonList));
}
if(m_serviceCodesHasBeenSet)
{
Array<JsonValue> serviceCodesJsonList(m_serviceCodes.size());
for(unsigned serviceCodesIndex = 0; serviceCodesIndex < serviceCodesJsonList.GetLength(); ++serviceCodesIndex)
{
serviceCodesJsonList[serviceCodesIndex].AsString(m_serviceCodes[serviceCodesIndex]);
}
payload.WithArray("serviceCodes", std::move(serviceCodesJsonList));
}
if(m_usageTypesHasBeenSet)
{
Array<JsonValue> usageTypesJsonList(m_usageTypes.size());
for(unsigned usageTypesIndex = 0; usageTypesIndex < usageTypesJsonList.GetLength(); ++usageTypesIndex)
{
usageTypesJsonList[usageTypesIndex].AsString(m_usageTypes[usageTypesIndex]);
}
payload.WithArray("usageTypes", std::move(usageTypesJsonList));
}
if(m_operationsHasBeenSet)
{
Array<JsonValue> operationsJsonList(m_operations.size());
for(unsigned operationsIndex = 0; operationsIndex < operationsJsonList.GetLength(); ++operationsIndex)
{
operationsJsonList[operationsIndex].AsString(m_operations[operationsIndex]);
}
payload.WithArray("operations", std::move(operationsJsonList));
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlansOfferingsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeSavingsPlansOfferingsResult::DescribeSavingsPlansOfferingsResult()
{
}
DescribeSavingsPlansOfferingsResult::DescribeSavingsPlansOfferingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeSavingsPlansOfferingsResult& DescribeSavingsPlansOfferingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("searchResults"))
{
Array<JsonView> searchResultsJsonList = jsonValue.GetArray("searchResults");
for(unsigned searchResultsIndex = 0; searchResultsIndex < searchResultsJsonList.GetLength(); ++searchResultsIndex)
{
m_searchResults.push_back(searchResultsJsonList[searchResultsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlansRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeSavingsPlansRequest::DescribeSavingsPlansRequest() :
m_savingsPlanArnsHasBeenSet(false),
m_savingsPlanIdsHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_statesHasBeenSet(false),
m_filtersHasBeenSet(false)
{
}
Aws::String DescribeSavingsPlansRequest::SerializePayload() const
{
JsonValue payload;
if(m_savingsPlanArnsHasBeenSet)
{
Array<JsonValue> savingsPlanArnsJsonList(m_savingsPlanArns.size());
for(unsigned savingsPlanArnsIndex = 0; savingsPlanArnsIndex < savingsPlanArnsJsonList.GetLength(); ++savingsPlanArnsIndex)
{
savingsPlanArnsJsonList[savingsPlanArnsIndex].AsString(m_savingsPlanArns[savingsPlanArnsIndex]);
}
payload.WithArray("savingsPlanArns", std::move(savingsPlanArnsJsonList));
}
if(m_savingsPlanIdsHasBeenSet)
{
Array<JsonValue> savingsPlanIdsJsonList(m_savingsPlanIds.size());
for(unsigned savingsPlanIdsIndex = 0; savingsPlanIdsIndex < savingsPlanIdsJsonList.GetLength(); ++savingsPlanIdsIndex)
{
savingsPlanIdsJsonList[savingsPlanIdsIndex].AsString(m_savingsPlanIds[savingsPlanIdsIndex]);
}
payload.WithArray("savingsPlanIds", std::move(savingsPlanIdsJsonList));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_statesHasBeenSet)
{
Array<JsonValue> statesJsonList(m_states.size());
for(unsigned statesIndex = 0; statesIndex < statesJsonList.GetLength(); ++statesIndex)
{
statesJsonList[statesIndex].AsString(SavingsPlanStateMapper::GetNameForSavingsPlanState(m_states[statesIndex]));
}
payload.WithArray("states", std::move(statesJsonList));
}
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/DescribeSavingsPlansResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeSavingsPlansResult::DescribeSavingsPlansResult()
{
}
DescribeSavingsPlansResult::DescribeSavingsPlansResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeSavingsPlansResult& DescribeSavingsPlansResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("savingsPlans"))
{
Array<JsonView> savingsPlansJsonList = jsonValue.GetArray("savingsPlans");
for(unsigned savingsPlansIndex = 0; savingsPlansIndex < savingsPlansJsonList.GetLength(); ++savingsPlansIndex)
{
m_savingsPlans.push_back(savingsPlansJsonList[savingsPlansIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("resourceArn", m_resourceArn);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/ListTagsForResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListTagsForResourceResult::ListTagsForResourceResult()
{
}
ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
}
return *this;
}

View File

@@ -0,0 +1,139 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/ParentSavingsPlanOffering.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
ParentSavingsPlanOffering::ParentSavingsPlanOffering() :
m_offeringIdHasBeenSet(false),
m_paymentOption(SavingsPlanPaymentOption::NOT_SET),
m_paymentOptionHasBeenSet(false),
m_planType(SavingsPlanType::NOT_SET),
m_planTypeHasBeenSet(false),
m_durationSeconds(0),
m_durationSecondsHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_planDescriptionHasBeenSet(false)
{
}
ParentSavingsPlanOffering::ParentSavingsPlanOffering(JsonView jsonValue) :
m_offeringIdHasBeenSet(false),
m_paymentOption(SavingsPlanPaymentOption::NOT_SET),
m_paymentOptionHasBeenSet(false),
m_planType(SavingsPlanType::NOT_SET),
m_planTypeHasBeenSet(false),
m_durationSeconds(0),
m_durationSecondsHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_planDescriptionHasBeenSet(false)
{
*this = jsonValue;
}
ParentSavingsPlanOffering& ParentSavingsPlanOffering::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("offeringId"))
{
m_offeringId = jsonValue.GetString("offeringId");
m_offeringIdHasBeenSet = true;
}
if(jsonValue.ValueExists("paymentOption"))
{
m_paymentOption = SavingsPlanPaymentOptionMapper::GetSavingsPlanPaymentOptionForName(jsonValue.GetString("paymentOption"));
m_paymentOptionHasBeenSet = true;
}
if(jsonValue.ValueExists("planType"))
{
m_planType = SavingsPlanTypeMapper::GetSavingsPlanTypeForName(jsonValue.GetString("planType"));
m_planTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("durationSeconds"))
{
m_durationSeconds = jsonValue.GetInt64("durationSeconds");
m_durationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("currency"))
{
m_currency = CurrencyCodeMapper::GetCurrencyCodeForName(jsonValue.GetString("currency"));
m_currencyHasBeenSet = true;
}
if(jsonValue.ValueExists("planDescription"))
{
m_planDescription = jsonValue.GetString("planDescription");
m_planDescriptionHasBeenSet = true;
}
return *this;
}
JsonValue ParentSavingsPlanOffering::Jsonize() const
{
JsonValue payload;
if(m_offeringIdHasBeenSet)
{
payload.WithString("offeringId", m_offeringId);
}
if(m_paymentOptionHasBeenSet)
{
payload.WithString("paymentOption", SavingsPlanPaymentOptionMapper::GetNameForSavingsPlanPaymentOption(m_paymentOption));
}
if(m_planTypeHasBeenSet)
{
payload.WithString("planType", SavingsPlanTypeMapper::GetNameForSavingsPlanType(m_planType));
}
if(m_durationSecondsHasBeenSet)
{
payload.WithInt64("durationSeconds", m_durationSeconds);
}
if(m_currencyHasBeenSet)
{
payload.WithString("currency", CurrencyCodeMapper::GetNameForCurrencyCode(m_currency));
}
if(m_planDescriptionHasBeenSet)
{
payload.WithString("planDescription", m_planDescription);
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,336 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlan.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlan::SavingsPlan() :
m_offeringIdHasBeenSet(false),
m_savingsPlanIdHasBeenSet(false),
m_savingsPlanArnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_startHasBeenSet(false),
m_endHasBeenSet(false),
m_state(SavingsPlanState::NOT_SET),
m_stateHasBeenSet(false),
m_regionHasBeenSet(false),
m_ec2InstanceFamilyHasBeenSet(false),
m_savingsPlanType(SavingsPlanType::NOT_SET),
m_savingsPlanTypeHasBeenSet(false),
m_paymentOption(SavingsPlanPaymentOption::NOT_SET),
m_paymentOptionHasBeenSet(false),
m_productTypesHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_commitmentHasBeenSet(false),
m_upfrontPaymentAmountHasBeenSet(false),
m_recurringPaymentAmountHasBeenSet(false),
m_termDurationInSeconds(0),
m_termDurationInSecondsHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
SavingsPlan::SavingsPlan(JsonView jsonValue) :
m_offeringIdHasBeenSet(false),
m_savingsPlanIdHasBeenSet(false),
m_savingsPlanArnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_startHasBeenSet(false),
m_endHasBeenSet(false),
m_state(SavingsPlanState::NOT_SET),
m_stateHasBeenSet(false),
m_regionHasBeenSet(false),
m_ec2InstanceFamilyHasBeenSet(false),
m_savingsPlanType(SavingsPlanType::NOT_SET),
m_savingsPlanTypeHasBeenSet(false),
m_paymentOption(SavingsPlanPaymentOption::NOT_SET),
m_paymentOptionHasBeenSet(false),
m_productTypesHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_commitmentHasBeenSet(false),
m_upfrontPaymentAmountHasBeenSet(false),
m_recurringPaymentAmountHasBeenSet(false),
m_termDurationInSeconds(0),
m_termDurationInSecondsHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlan& SavingsPlan::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("offeringId"))
{
m_offeringId = jsonValue.GetString("offeringId");
m_offeringIdHasBeenSet = true;
}
if(jsonValue.ValueExists("savingsPlanId"))
{
m_savingsPlanId = jsonValue.GetString("savingsPlanId");
m_savingsPlanIdHasBeenSet = true;
}
if(jsonValue.ValueExists("savingsPlanArn"))
{
m_savingsPlanArn = jsonValue.GetString("savingsPlanArn");
m_savingsPlanArnHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("start"))
{
m_start = jsonValue.GetString("start");
m_startHasBeenSet = true;
}
if(jsonValue.ValueExists("end"))
{
m_end = jsonValue.GetString("end");
m_endHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = SavingsPlanStateMapper::GetSavingsPlanStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("region"))
{
m_region = jsonValue.GetString("region");
m_regionHasBeenSet = true;
}
if(jsonValue.ValueExists("ec2InstanceFamily"))
{
m_ec2InstanceFamily = jsonValue.GetString("ec2InstanceFamily");
m_ec2InstanceFamilyHasBeenSet = true;
}
if(jsonValue.ValueExists("savingsPlanType"))
{
m_savingsPlanType = SavingsPlanTypeMapper::GetSavingsPlanTypeForName(jsonValue.GetString("savingsPlanType"));
m_savingsPlanTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("paymentOption"))
{
m_paymentOption = SavingsPlanPaymentOptionMapper::GetSavingsPlanPaymentOptionForName(jsonValue.GetString("paymentOption"));
m_paymentOptionHasBeenSet = true;
}
if(jsonValue.ValueExists("productTypes"))
{
Array<JsonView> productTypesJsonList = jsonValue.GetArray("productTypes");
for(unsigned productTypesIndex = 0; productTypesIndex < productTypesJsonList.GetLength(); ++productTypesIndex)
{
m_productTypes.push_back(SavingsPlanProductTypeMapper::GetSavingsPlanProductTypeForName(productTypesJsonList[productTypesIndex].AsString()));
}
m_productTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("currency"))
{
m_currency = CurrencyCodeMapper::GetCurrencyCodeForName(jsonValue.GetString("currency"));
m_currencyHasBeenSet = true;
}
if(jsonValue.ValueExists("commitment"))
{
m_commitment = jsonValue.GetString("commitment");
m_commitmentHasBeenSet = true;
}
if(jsonValue.ValueExists("upfrontPaymentAmount"))
{
m_upfrontPaymentAmount = jsonValue.GetString("upfrontPaymentAmount");
m_upfrontPaymentAmountHasBeenSet = true;
}
if(jsonValue.ValueExists("recurringPaymentAmount"))
{
m_recurringPaymentAmount = jsonValue.GetString("recurringPaymentAmount");
m_recurringPaymentAmountHasBeenSet = true;
}
if(jsonValue.ValueExists("termDurationInSeconds"))
{
m_termDurationInSeconds = jsonValue.GetInt64("termDurationInSeconds");
m_termDurationInSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects();
for(auto& tagsItem : tagsJsonMap)
{
m_tags[tagsItem.first] = tagsItem.second.AsString();
}
m_tagsHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlan::Jsonize() const
{
JsonValue payload;
if(m_offeringIdHasBeenSet)
{
payload.WithString("offeringId", m_offeringId);
}
if(m_savingsPlanIdHasBeenSet)
{
payload.WithString("savingsPlanId", m_savingsPlanId);
}
if(m_savingsPlanArnHasBeenSet)
{
payload.WithString("savingsPlanArn", m_savingsPlanArn);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_startHasBeenSet)
{
payload.WithString("start", m_start);
}
if(m_endHasBeenSet)
{
payload.WithString("end", m_end);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", SavingsPlanStateMapper::GetNameForSavingsPlanState(m_state));
}
if(m_regionHasBeenSet)
{
payload.WithString("region", m_region);
}
if(m_ec2InstanceFamilyHasBeenSet)
{
payload.WithString("ec2InstanceFamily", m_ec2InstanceFamily);
}
if(m_savingsPlanTypeHasBeenSet)
{
payload.WithString("savingsPlanType", SavingsPlanTypeMapper::GetNameForSavingsPlanType(m_savingsPlanType));
}
if(m_paymentOptionHasBeenSet)
{
payload.WithString("paymentOption", SavingsPlanPaymentOptionMapper::GetNameForSavingsPlanPaymentOption(m_paymentOption));
}
if(m_productTypesHasBeenSet)
{
Array<JsonValue> productTypesJsonList(m_productTypes.size());
for(unsigned productTypesIndex = 0; productTypesIndex < productTypesJsonList.GetLength(); ++productTypesIndex)
{
productTypesJsonList[productTypesIndex].AsString(SavingsPlanProductTypeMapper::GetNameForSavingsPlanProductType(m_productTypes[productTypesIndex]));
}
payload.WithArray("productTypes", std::move(productTypesJsonList));
}
if(m_currencyHasBeenSet)
{
payload.WithString("currency", CurrencyCodeMapper::GetNameForCurrencyCode(m_currency));
}
if(m_commitmentHasBeenSet)
{
payload.WithString("commitment", m_commitment);
}
if(m_upfrontPaymentAmountHasBeenSet)
{
payload.WithString("upfrontPaymentAmount", m_upfrontPaymentAmount);
}
if(m_recurringPaymentAmountHasBeenSet)
{
payload.WithString("recurringPaymentAmount", m_recurringPaymentAmount);
}
if(m_termDurationInSecondsHasBeenSet)
{
payload.WithInt64("termDurationInSeconds", m_termDurationInSeconds);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanFilter::SavingsPlanFilter() :
m_name(SavingsPlansFilterName::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
SavingsPlanFilter::SavingsPlanFilter(JsonView jsonValue) :
m_name(SavingsPlansFilterName::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanFilter& SavingsPlanFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = SavingsPlansFilterNameMapper::GetSavingsPlansFilterNameForName(jsonValue.GetString("name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanFilter::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", SavingsPlansFilterNameMapper::GetNameForSavingsPlansFilterName(m_name));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,230 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOffering.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanOffering::SavingsPlanOffering() :
m_offeringIdHasBeenSet(false),
m_productTypesHasBeenSet(false),
m_planType(SavingsPlanType::NOT_SET),
m_planTypeHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_paymentOption(SavingsPlanPaymentOption::NOT_SET),
m_paymentOptionHasBeenSet(false),
m_durationSeconds(0),
m_durationSecondsHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_serviceCodeHasBeenSet(false),
m_usageTypeHasBeenSet(false),
m_operationHasBeenSet(false),
m_propertiesHasBeenSet(false)
{
}
SavingsPlanOffering::SavingsPlanOffering(JsonView jsonValue) :
m_offeringIdHasBeenSet(false),
m_productTypesHasBeenSet(false),
m_planType(SavingsPlanType::NOT_SET),
m_planTypeHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_paymentOption(SavingsPlanPaymentOption::NOT_SET),
m_paymentOptionHasBeenSet(false),
m_durationSeconds(0),
m_durationSecondsHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_serviceCodeHasBeenSet(false),
m_usageTypeHasBeenSet(false),
m_operationHasBeenSet(false),
m_propertiesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanOffering& SavingsPlanOffering::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("offeringId"))
{
m_offeringId = jsonValue.GetString("offeringId");
m_offeringIdHasBeenSet = true;
}
if(jsonValue.ValueExists("productTypes"))
{
Array<JsonView> productTypesJsonList = jsonValue.GetArray("productTypes");
for(unsigned productTypesIndex = 0; productTypesIndex < productTypesJsonList.GetLength(); ++productTypesIndex)
{
m_productTypes.push_back(SavingsPlanProductTypeMapper::GetSavingsPlanProductTypeForName(productTypesJsonList[productTypesIndex].AsString()));
}
m_productTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("planType"))
{
m_planType = SavingsPlanTypeMapper::GetSavingsPlanTypeForName(jsonValue.GetString("planType"));
m_planTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("paymentOption"))
{
m_paymentOption = SavingsPlanPaymentOptionMapper::GetSavingsPlanPaymentOptionForName(jsonValue.GetString("paymentOption"));
m_paymentOptionHasBeenSet = true;
}
if(jsonValue.ValueExists("durationSeconds"))
{
m_durationSeconds = jsonValue.GetInt64("durationSeconds");
m_durationSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("currency"))
{
m_currency = CurrencyCodeMapper::GetCurrencyCodeForName(jsonValue.GetString("currency"));
m_currencyHasBeenSet = true;
}
if(jsonValue.ValueExists("serviceCode"))
{
m_serviceCode = jsonValue.GetString("serviceCode");
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("usageType"))
{
m_usageType = jsonValue.GetString("usageType");
m_usageTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetString("operation");
m_operationHasBeenSet = true;
}
if(jsonValue.ValueExists("properties"))
{
Array<JsonView> propertiesJsonList = jsonValue.GetArray("properties");
for(unsigned propertiesIndex = 0; propertiesIndex < propertiesJsonList.GetLength(); ++propertiesIndex)
{
m_properties.push_back(propertiesJsonList[propertiesIndex].AsObject());
}
m_propertiesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanOffering::Jsonize() const
{
JsonValue payload;
if(m_offeringIdHasBeenSet)
{
payload.WithString("offeringId", m_offeringId);
}
if(m_productTypesHasBeenSet)
{
Array<JsonValue> productTypesJsonList(m_productTypes.size());
for(unsigned productTypesIndex = 0; productTypesIndex < productTypesJsonList.GetLength(); ++productTypesIndex)
{
productTypesJsonList[productTypesIndex].AsString(SavingsPlanProductTypeMapper::GetNameForSavingsPlanProductType(m_productTypes[productTypesIndex]));
}
payload.WithArray("productTypes", std::move(productTypesJsonList));
}
if(m_planTypeHasBeenSet)
{
payload.WithString("planType", SavingsPlanTypeMapper::GetNameForSavingsPlanType(m_planType));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_paymentOptionHasBeenSet)
{
payload.WithString("paymentOption", SavingsPlanPaymentOptionMapper::GetNameForSavingsPlanPaymentOption(m_paymentOption));
}
if(m_durationSecondsHasBeenSet)
{
payload.WithInt64("durationSeconds", m_durationSeconds);
}
if(m_currencyHasBeenSet)
{
payload.WithString("currency", CurrencyCodeMapper::GetNameForCurrencyCode(m_currency));
}
if(m_serviceCodeHasBeenSet)
{
payload.WithString("serviceCode", m_serviceCode);
}
if(m_usageTypeHasBeenSet)
{
payload.WithString("usageType", m_usageType);
}
if(m_operationHasBeenSet)
{
payload.WithString("operation", m_operation);
}
if(m_propertiesHasBeenSet)
{
Array<JsonValue> propertiesJsonList(m_properties.size());
for(unsigned propertiesIndex = 0; propertiesIndex < propertiesJsonList.GetLength(); ++propertiesIndex)
{
propertiesJsonList[propertiesIndex].AsObject(m_properties[propertiesIndex].Jsonize());
}
payload.WithArray("properties", std::move(propertiesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingFilterAttribute.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanOfferingFilterAttributeMapper
{
static const int region_HASH = HashingUtils::HashString("region");
static const int instanceFamily_HASH = HashingUtils::HashString("instanceFamily");
SavingsPlanOfferingFilterAttribute GetSavingsPlanOfferingFilterAttributeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == region_HASH)
{
return SavingsPlanOfferingFilterAttribute::region;
}
else if (hashCode == instanceFamily_HASH)
{
return SavingsPlanOfferingFilterAttribute::instanceFamily;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanOfferingFilterAttribute>(hashCode);
}
return SavingsPlanOfferingFilterAttribute::NOT_SET;
}
Aws::String GetNameForSavingsPlanOfferingFilterAttribute(SavingsPlanOfferingFilterAttribute enumValue)
{
switch(enumValue)
{
case SavingsPlanOfferingFilterAttribute::region:
return "region";
case SavingsPlanOfferingFilterAttribute::instanceFamily:
return "instanceFamily";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanOfferingFilterAttributeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingFilterElement.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanOfferingFilterElement::SavingsPlanOfferingFilterElement() :
m_name(SavingsPlanOfferingFilterAttribute::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
SavingsPlanOfferingFilterElement::SavingsPlanOfferingFilterElement(JsonView jsonValue) :
m_name(SavingsPlanOfferingFilterAttribute::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanOfferingFilterElement& SavingsPlanOfferingFilterElement::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = SavingsPlanOfferingFilterAttributeMapper::GetSavingsPlanOfferingFilterAttributeForName(jsonValue.GetString("name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanOfferingFilterElement::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", SavingsPlanOfferingFilterAttributeMapper::GetNameForSavingsPlanOfferingFilterAttribute(m_name));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingProperty.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanOfferingProperty::SavingsPlanOfferingProperty() :
m_name(SavingsPlanOfferingPropertyKey::NOT_SET),
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
SavingsPlanOfferingProperty::SavingsPlanOfferingProperty(JsonView jsonValue) :
m_name(SavingsPlanOfferingPropertyKey::NOT_SET),
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanOfferingProperty& SavingsPlanOfferingProperty::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = SavingsPlanOfferingPropertyKeyMapper::GetSavingsPlanOfferingPropertyKeyForName(jsonValue.GetString("name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanOfferingProperty::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", SavingsPlanOfferingPropertyKeyMapper::GetNameForSavingsPlanOfferingPropertyKey(m_name));
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingPropertyKey.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanOfferingPropertyKeyMapper
{
static const int region_HASH = HashingUtils::HashString("region");
static const int instanceFamily_HASH = HashingUtils::HashString("instanceFamily");
SavingsPlanOfferingPropertyKey GetSavingsPlanOfferingPropertyKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == region_HASH)
{
return SavingsPlanOfferingPropertyKey::region;
}
else if (hashCode == instanceFamily_HASH)
{
return SavingsPlanOfferingPropertyKey::instanceFamily;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanOfferingPropertyKey>(hashCode);
}
return SavingsPlanOfferingPropertyKey::NOT_SET;
}
Aws::String GetNameForSavingsPlanOfferingPropertyKey(SavingsPlanOfferingPropertyKey enumValue)
{
switch(enumValue)
{
case SavingsPlanOfferingPropertyKey::region:
return "region";
case SavingsPlanOfferingPropertyKey::instanceFamily:
return "instanceFamily";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanOfferingPropertyKeyMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,175 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingRate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanOfferingRate::SavingsPlanOfferingRate() :
m_savingsPlanOfferingHasBeenSet(false),
m_rateHasBeenSet(false),
m_unit(SavingsPlanRateUnit::NOT_SET),
m_unitHasBeenSet(false),
m_productType(SavingsPlanProductType::NOT_SET),
m_productTypeHasBeenSet(false),
m_serviceCode(SavingsPlanRateServiceCode::NOT_SET),
m_serviceCodeHasBeenSet(false),
m_usageTypeHasBeenSet(false),
m_operationHasBeenSet(false),
m_propertiesHasBeenSet(false)
{
}
SavingsPlanOfferingRate::SavingsPlanOfferingRate(JsonView jsonValue) :
m_savingsPlanOfferingHasBeenSet(false),
m_rateHasBeenSet(false),
m_unit(SavingsPlanRateUnit::NOT_SET),
m_unitHasBeenSet(false),
m_productType(SavingsPlanProductType::NOT_SET),
m_productTypeHasBeenSet(false),
m_serviceCode(SavingsPlanRateServiceCode::NOT_SET),
m_serviceCodeHasBeenSet(false),
m_usageTypeHasBeenSet(false),
m_operationHasBeenSet(false),
m_propertiesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanOfferingRate& SavingsPlanOfferingRate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("savingsPlanOffering"))
{
m_savingsPlanOffering = jsonValue.GetObject("savingsPlanOffering");
m_savingsPlanOfferingHasBeenSet = true;
}
if(jsonValue.ValueExists("rate"))
{
m_rate = jsonValue.GetString("rate");
m_rateHasBeenSet = true;
}
if(jsonValue.ValueExists("unit"))
{
m_unit = SavingsPlanRateUnitMapper::GetSavingsPlanRateUnitForName(jsonValue.GetString("unit"));
m_unitHasBeenSet = true;
}
if(jsonValue.ValueExists("productType"))
{
m_productType = SavingsPlanProductTypeMapper::GetSavingsPlanProductTypeForName(jsonValue.GetString("productType"));
m_productTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("serviceCode"))
{
m_serviceCode = SavingsPlanRateServiceCodeMapper::GetSavingsPlanRateServiceCodeForName(jsonValue.GetString("serviceCode"));
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("usageType"))
{
m_usageType = jsonValue.GetString("usageType");
m_usageTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetString("operation");
m_operationHasBeenSet = true;
}
if(jsonValue.ValueExists("properties"))
{
Array<JsonView> propertiesJsonList = jsonValue.GetArray("properties");
for(unsigned propertiesIndex = 0; propertiesIndex < propertiesJsonList.GetLength(); ++propertiesIndex)
{
m_properties.push_back(propertiesJsonList[propertiesIndex].AsObject());
}
m_propertiesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanOfferingRate::Jsonize() const
{
JsonValue payload;
if(m_savingsPlanOfferingHasBeenSet)
{
payload.WithObject("savingsPlanOffering", m_savingsPlanOffering.Jsonize());
}
if(m_rateHasBeenSet)
{
payload.WithString("rate", m_rate);
}
if(m_unitHasBeenSet)
{
payload.WithString("unit", SavingsPlanRateUnitMapper::GetNameForSavingsPlanRateUnit(m_unit));
}
if(m_productTypeHasBeenSet)
{
payload.WithString("productType", SavingsPlanProductTypeMapper::GetNameForSavingsPlanProductType(m_productType));
}
if(m_serviceCodeHasBeenSet)
{
payload.WithString("serviceCode", SavingsPlanRateServiceCodeMapper::GetNameForSavingsPlanRateServiceCode(m_serviceCode));
}
if(m_usageTypeHasBeenSet)
{
payload.WithString("usageType", m_usageType);
}
if(m_operationHasBeenSet)
{
payload.WithString("operation", m_operation);
}
if(m_propertiesHasBeenSet)
{
Array<JsonValue> propertiesJsonList(m_properties.size());
for(unsigned propertiesIndex = 0; propertiesIndex < propertiesJsonList.GetLength(); ++propertiesIndex)
{
propertiesJsonList[propertiesIndex].AsObject(m_properties[propertiesIndex].Jsonize());
}
payload.WithArray("properties", std::move(propertiesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingRateFilterElement.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanOfferingRateFilterElement::SavingsPlanOfferingRateFilterElement() :
m_name(SavingsPlanRateFilterAttribute::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
SavingsPlanOfferingRateFilterElement::SavingsPlanOfferingRateFilterElement(JsonView jsonValue) :
m_name(SavingsPlanRateFilterAttribute::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanOfferingRateFilterElement& SavingsPlanOfferingRateFilterElement::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = SavingsPlanRateFilterAttributeMapper::GetSavingsPlanRateFilterAttributeForName(jsonValue.GetString("name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanOfferingRateFilterElement::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", SavingsPlanRateFilterAttributeMapper::GetNameForSavingsPlanRateFilterAttribute(m_name));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanOfferingRateProperty.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanOfferingRateProperty::SavingsPlanOfferingRateProperty() :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
SavingsPlanOfferingRateProperty::SavingsPlanOfferingRateProperty(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanOfferingRateProperty& SavingsPlanOfferingRateProperty::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanOfferingRateProperty::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanPaymentOption.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanPaymentOptionMapper
{
static const int All_Upfront_HASH = HashingUtils::HashString("All Upfront");
static const int Partial_Upfront_HASH = HashingUtils::HashString("Partial Upfront");
static const int No_Upfront_HASH = HashingUtils::HashString("No Upfront");
SavingsPlanPaymentOption GetSavingsPlanPaymentOptionForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == All_Upfront_HASH)
{
return SavingsPlanPaymentOption::All_Upfront;
}
else if (hashCode == Partial_Upfront_HASH)
{
return SavingsPlanPaymentOption::Partial_Upfront;
}
else if (hashCode == No_Upfront_HASH)
{
return SavingsPlanPaymentOption::No_Upfront;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanPaymentOption>(hashCode);
}
return SavingsPlanPaymentOption::NOT_SET;
}
Aws::String GetNameForSavingsPlanPaymentOption(SavingsPlanPaymentOption enumValue)
{
switch(enumValue)
{
case SavingsPlanPaymentOption::All_Upfront:
return "All Upfront";
case SavingsPlanPaymentOption::Partial_Upfront:
return "Partial Upfront";
case SavingsPlanPaymentOption::No_Upfront:
return "No Upfront";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanPaymentOptionMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanProductType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanProductTypeMapper
{
static const int EC2_HASH = HashingUtils::HashString("EC2");
static const int Fargate_HASH = HashingUtils::HashString("Fargate");
static const int Lambda_HASH = HashingUtils::HashString("Lambda");
SavingsPlanProductType GetSavingsPlanProductTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EC2_HASH)
{
return SavingsPlanProductType::EC2;
}
else if (hashCode == Fargate_HASH)
{
return SavingsPlanProductType::Fargate;
}
else if (hashCode == Lambda_HASH)
{
return SavingsPlanProductType::Lambda;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanProductType>(hashCode);
}
return SavingsPlanProductType::NOT_SET;
}
Aws::String GetNameForSavingsPlanProductType(SavingsPlanProductType enumValue)
{
switch(enumValue)
{
case SavingsPlanProductType::EC2:
return "EC2";
case SavingsPlanProductType::Fargate:
return "Fargate";
case SavingsPlanProductType::Lambda:
return "Lambda";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanProductTypeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,176 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanRate::SavingsPlanRate() :
m_rateHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_unit(SavingsPlanRateUnit::NOT_SET),
m_unitHasBeenSet(false),
m_productType(SavingsPlanProductType::NOT_SET),
m_productTypeHasBeenSet(false),
m_serviceCode(SavingsPlanRateServiceCode::NOT_SET),
m_serviceCodeHasBeenSet(false),
m_usageTypeHasBeenSet(false),
m_operationHasBeenSet(false),
m_propertiesHasBeenSet(false)
{
}
SavingsPlanRate::SavingsPlanRate(JsonView jsonValue) :
m_rateHasBeenSet(false),
m_currency(CurrencyCode::NOT_SET),
m_currencyHasBeenSet(false),
m_unit(SavingsPlanRateUnit::NOT_SET),
m_unitHasBeenSet(false),
m_productType(SavingsPlanProductType::NOT_SET),
m_productTypeHasBeenSet(false),
m_serviceCode(SavingsPlanRateServiceCode::NOT_SET),
m_serviceCodeHasBeenSet(false),
m_usageTypeHasBeenSet(false),
m_operationHasBeenSet(false),
m_propertiesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanRate& SavingsPlanRate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("rate"))
{
m_rate = jsonValue.GetString("rate");
m_rateHasBeenSet = true;
}
if(jsonValue.ValueExists("currency"))
{
m_currency = CurrencyCodeMapper::GetCurrencyCodeForName(jsonValue.GetString("currency"));
m_currencyHasBeenSet = true;
}
if(jsonValue.ValueExists("unit"))
{
m_unit = SavingsPlanRateUnitMapper::GetSavingsPlanRateUnitForName(jsonValue.GetString("unit"));
m_unitHasBeenSet = true;
}
if(jsonValue.ValueExists("productType"))
{
m_productType = SavingsPlanProductTypeMapper::GetSavingsPlanProductTypeForName(jsonValue.GetString("productType"));
m_productTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("serviceCode"))
{
m_serviceCode = SavingsPlanRateServiceCodeMapper::GetSavingsPlanRateServiceCodeForName(jsonValue.GetString("serviceCode"));
m_serviceCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("usageType"))
{
m_usageType = jsonValue.GetString("usageType");
m_usageTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("operation"))
{
m_operation = jsonValue.GetString("operation");
m_operationHasBeenSet = true;
}
if(jsonValue.ValueExists("properties"))
{
Array<JsonView> propertiesJsonList = jsonValue.GetArray("properties");
for(unsigned propertiesIndex = 0; propertiesIndex < propertiesJsonList.GetLength(); ++propertiesIndex)
{
m_properties.push_back(propertiesJsonList[propertiesIndex].AsObject());
}
m_propertiesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanRate::Jsonize() const
{
JsonValue payload;
if(m_rateHasBeenSet)
{
payload.WithString("rate", m_rate);
}
if(m_currencyHasBeenSet)
{
payload.WithString("currency", CurrencyCodeMapper::GetNameForCurrencyCode(m_currency));
}
if(m_unitHasBeenSet)
{
payload.WithString("unit", SavingsPlanRateUnitMapper::GetNameForSavingsPlanRateUnit(m_unit));
}
if(m_productTypeHasBeenSet)
{
payload.WithString("productType", SavingsPlanProductTypeMapper::GetNameForSavingsPlanProductType(m_productType));
}
if(m_serviceCodeHasBeenSet)
{
payload.WithString("serviceCode", SavingsPlanRateServiceCodeMapper::GetNameForSavingsPlanRateServiceCode(m_serviceCode));
}
if(m_usageTypeHasBeenSet)
{
payload.WithString("usageType", m_usageType);
}
if(m_operationHasBeenSet)
{
payload.WithString("operation", m_operation);
}
if(m_propertiesHasBeenSet)
{
Array<JsonValue> propertiesJsonList(m_properties.size());
for(unsigned propertiesIndex = 0; propertiesIndex < propertiesJsonList.GetLength(); ++propertiesIndex)
{
propertiesJsonList[propertiesIndex].AsObject(m_properties[propertiesIndex].Jsonize());
}
payload.WithArray("properties", std::move(propertiesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRateFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanRateFilter::SavingsPlanRateFilter() :
m_name(SavingsPlanRateFilterName::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
SavingsPlanRateFilter::SavingsPlanRateFilter(JsonView jsonValue) :
m_name(SavingsPlanRateFilterName::NOT_SET),
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanRateFilter& SavingsPlanRateFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = SavingsPlanRateFilterNameMapper::GetSavingsPlanRateFilterNameForName(jsonValue.GetString("name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanRateFilter::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", SavingsPlanRateFilterNameMapper::GetNameForSavingsPlanRateFilterName(m_name));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRateFilterAttribute.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanRateFilterAttributeMapper
{
static const int region_HASH = HashingUtils::HashString("region");
static const int instanceFamily_HASH = HashingUtils::HashString("instanceFamily");
static const int instanceType_HASH = HashingUtils::HashString("instanceType");
static const int productDescription_HASH = HashingUtils::HashString("productDescription");
static const int tenancy_HASH = HashingUtils::HashString("tenancy");
static const int productId_HASH = HashingUtils::HashString("productId");
SavingsPlanRateFilterAttribute GetSavingsPlanRateFilterAttributeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == region_HASH)
{
return SavingsPlanRateFilterAttribute::region;
}
else if (hashCode == instanceFamily_HASH)
{
return SavingsPlanRateFilterAttribute::instanceFamily;
}
else if (hashCode == instanceType_HASH)
{
return SavingsPlanRateFilterAttribute::instanceType;
}
else if (hashCode == productDescription_HASH)
{
return SavingsPlanRateFilterAttribute::productDescription;
}
else if (hashCode == tenancy_HASH)
{
return SavingsPlanRateFilterAttribute::tenancy;
}
else if (hashCode == productId_HASH)
{
return SavingsPlanRateFilterAttribute::productId;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanRateFilterAttribute>(hashCode);
}
return SavingsPlanRateFilterAttribute::NOT_SET;
}
Aws::String GetNameForSavingsPlanRateFilterAttribute(SavingsPlanRateFilterAttribute enumValue)
{
switch(enumValue)
{
case SavingsPlanRateFilterAttribute::region:
return "region";
case SavingsPlanRateFilterAttribute::instanceFamily:
return "instanceFamily";
case SavingsPlanRateFilterAttribute::instanceType:
return "instanceType";
case SavingsPlanRateFilterAttribute::productDescription:
return "productDescription";
case SavingsPlanRateFilterAttribute::tenancy:
return "tenancy";
case SavingsPlanRateFilterAttribute::productId:
return "productId";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanRateFilterAttributeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRateFilterName.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanRateFilterNameMapper
{
static const int region_HASH = HashingUtils::HashString("region");
static const int instanceType_HASH = HashingUtils::HashString("instanceType");
static const int productDescription_HASH = HashingUtils::HashString("productDescription");
static const int tenancy_HASH = HashingUtils::HashString("tenancy");
static const int productType_HASH = HashingUtils::HashString("productType");
static const int serviceCode_HASH = HashingUtils::HashString("serviceCode");
static const int usageType_HASH = HashingUtils::HashString("usageType");
static const int operation_HASH = HashingUtils::HashString("operation");
SavingsPlanRateFilterName GetSavingsPlanRateFilterNameForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == region_HASH)
{
return SavingsPlanRateFilterName::region;
}
else if (hashCode == instanceType_HASH)
{
return SavingsPlanRateFilterName::instanceType;
}
else if (hashCode == productDescription_HASH)
{
return SavingsPlanRateFilterName::productDescription;
}
else if (hashCode == tenancy_HASH)
{
return SavingsPlanRateFilterName::tenancy;
}
else if (hashCode == productType_HASH)
{
return SavingsPlanRateFilterName::productType;
}
else if (hashCode == serviceCode_HASH)
{
return SavingsPlanRateFilterName::serviceCode;
}
else if (hashCode == usageType_HASH)
{
return SavingsPlanRateFilterName::usageType;
}
else if (hashCode == operation_HASH)
{
return SavingsPlanRateFilterName::operation;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanRateFilterName>(hashCode);
}
return SavingsPlanRateFilterName::NOT_SET;
}
Aws::String GetNameForSavingsPlanRateFilterName(SavingsPlanRateFilterName enumValue)
{
switch(enumValue)
{
case SavingsPlanRateFilterName::region:
return "region";
case SavingsPlanRateFilterName::instanceType:
return "instanceType";
case SavingsPlanRateFilterName::productDescription:
return "productDescription";
case SavingsPlanRateFilterName::tenancy:
return "tenancy";
case SavingsPlanRateFilterName::productType:
return "productType";
case SavingsPlanRateFilterName::serviceCode:
return "serviceCode";
case SavingsPlanRateFilterName::usageType:
return "usageType";
case SavingsPlanRateFilterName::operation:
return "operation";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanRateFilterNameMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRateProperty.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
SavingsPlanRateProperty::SavingsPlanRateProperty() :
m_name(SavingsPlanRatePropertyKey::NOT_SET),
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
SavingsPlanRateProperty::SavingsPlanRateProperty(JsonView jsonValue) :
m_name(SavingsPlanRatePropertyKey::NOT_SET),
m_nameHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
SavingsPlanRateProperty& SavingsPlanRateProperty::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = SavingsPlanRatePropertyKeyMapper::GetSavingsPlanRatePropertyKeyForName(jsonValue.GetString("name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue SavingsPlanRateProperty::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", SavingsPlanRatePropertyKeyMapper::GetNameForSavingsPlanRatePropertyKey(m_name));
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRatePropertyKey.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanRatePropertyKeyMapper
{
static const int region_HASH = HashingUtils::HashString("region");
static const int instanceType_HASH = HashingUtils::HashString("instanceType");
static const int instanceFamily_HASH = HashingUtils::HashString("instanceFamily");
static const int productDescription_HASH = HashingUtils::HashString("productDescription");
static const int tenancy_HASH = HashingUtils::HashString("tenancy");
SavingsPlanRatePropertyKey GetSavingsPlanRatePropertyKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == region_HASH)
{
return SavingsPlanRatePropertyKey::region;
}
else if (hashCode == instanceType_HASH)
{
return SavingsPlanRatePropertyKey::instanceType;
}
else if (hashCode == instanceFamily_HASH)
{
return SavingsPlanRatePropertyKey::instanceFamily;
}
else if (hashCode == productDescription_HASH)
{
return SavingsPlanRatePropertyKey::productDescription;
}
else if (hashCode == tenancy_HASH)
{
return SavingsPlanRatePropertyKey::tenancy;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanRatePropertyKey>(hashCode);
}
return SavingsPlanRatePropertyKey::NOT_SET;
}
Aws::String GetNameForSavingsPlanRatePropertyKey(SavingsPlanRatePropertyKey enumValue)
{
switch(enumValue)
{
case SavingsPlanRatePropertyKey::region:
return "region";
case SavingsPlanRatePropertyKey::instanceType:
return "instanceType";
case SavingsPlanRatePropertyKey::instanceFamily:
return "instanceFamily";
case SavingsPlanRatePropertyKey::productDescription:
return "productDescription";
case SavingsPlanRatePropertyKey::tenancy:
return "tenancy";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanRatePropertyKeyMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRateServiceCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanRateServiceCodeMapper
{
static const int AmazonEC2_HASH = HashingUtils::HashString("AmazonEC2");
static const int AmazonECS_HASH = HashingUtils::HashString("AmazonECS");
static const int AmazonEKS_HASH = HashingUtils::HashString("AmazonEKS");
static const int AWSLambda_HASH = HashingUtils::HashString("AWSLambda");
SavingsPlanRateServiceCode GetSavingsPlanRateServiceCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == AmazonEC2_HASH)
{
return SavingsPlanRateServiceCode::AmazonEC2;
}
else if (hashCode == AmazonECS_HASH)
{
return SavingsPlanRateServiceCode::AmazonECS;
}
else if (hashCode == AmazonEKS_HASH)
{
return SavingsPlanRateServiceCode::AmazonEKS;
}
else if (hashCode == AWSLambda_HASH)
{
return SavingsPlanRateServiceCode::AWSLambda;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanRateServiceCode>(hashCode);
}
return SavingsPlanRateServiceCode::NOT_SET;
}
Aws::String GetNameForSavingsPlanRateServiceCode(SavingsPlanRateServiceCode enumValue)
{
switch(enumValue)
{
case SavingsPlanRateServiceCode::AmazonEC2:
return "AmazonEC2";
case SavingsPlanRateServiceCode::AmazonECS:
return "AmazonECS";
case SavingsPlanRateServiceCode::AmazonEKS:
return "AmazonEKS";
case SavingsPlanRateServiceCode::AWSLambda:
return "AWSLambda";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanRateServiceCodeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanRateUnit.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanRateUnitMapper
{
static const int Hrs_HASH = HashingUtils::HashString("Hrs");
static const int Lambda_GB_Second_HASH = HashingUtils::HashString("Lambda-GB-Second");
static const int Request_HASH = HashingUtils::HashString("Request");
SavingsPlanRateUnit GetSavingsPlanRateUnitForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Hrs_HASH)
{
return SavingsPlanRateUnit::Hrs;
}
else if (hashCode == Lambda_GB_Second_HASH)
{
return SavingsPlanRateUnit::Lambda_GB_Second;
}
else if (hashCode == Request_HASH)
{
return SavingsPlanRateUnit::Request;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanRateUnit>(hashCode);
}
return SavingsPlanRateUnit::NOT_SET;
}
Aws::String GetNameForSavingsPlanRateUnit(SavingsPlanRateUnit enumValue)
{
switch(enumValue)
{
case SavingsPlanRateUnit::Hrs:
return "Hrs";
case SavingsPlanRateUnit::Lambda_GB_Second:
return "Lambda-GB-Second";
case SavingsPlanRateUnit::Request:
return "Request";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanRateUnitMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanState.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanStateMapper
{
static const int payment_pending_HASH = HashingUtils::HashString("payment-pending");
static const int payment_failed_HASH = HashingUtils::HashString("payment-failed");
static const int active_HASH = HashingUtils::HashString("active");
static const int retired_HASH = HashingUtils::HashString("retired");
SavingsPlanState GetSavingsPlanStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == payment_pending_HASH)
{
return SavingsPlanState::payment_pending;
}
else if (hashCode == payment_failed_HASH)
{
return SavingsPlanState::payment_failed;
}
else if (hashCode == active_HASH)
{
return SavingsPlanState::active;
}
else if (hashCode == retired_HASH)
{
return SavingsPlanState::retired;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanState>(hashCode);
}
return SavingsPlanState::NOT_SET;
}
Aws::String GetNameForSavingsPlanState(SavingsPlanState enumValue)
{
switch(enumValue)
{
case SavingsPlanState::payment_pending:
return "payment-pending";
case SavingsPlanState::payment_failed:
return "payment-failed";
case SavingsPlanState::active:
return "active";
case SavingsPlanState::retired:
return "retired";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanStateMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlanType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlanTypeMapper
{
static const int Compute_HASH = HashingUtils::HashString("Compute");
static const int EC2Instance_HASH = HashingUtils::HashString("EC2Instance");
SavingsPlanType GetSavingsPlanTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Compute_HASH)
{
return SavingsPlanType::Compute;
}
else if (hashCode == EC2Instance_HASH)
{
return SavingsPlanType::EC2Instance;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlanType>(hashCode);
}
return SavingsPlanType::NOT_SET;
}
Aws::String GetNameForSavingsPlanType(SavingsPlanType enumValue)
{
switch(enumValue)
{
case SavingsPlanType::Compute:
return "Compute";
case SavingsPlanType::EC2Instance:
return "EC2Instance";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlanTypeMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,119 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/SavingsPlansFilterName.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace SavingsPlans
{
namespace Model
{
namespace SavingsPlansFilterNameMapper
{
static const int region_HASH = HashingUtils::HashString("region");
static const int ec2_instance_family_HASH = HashingUtils::HashString("ec2-instance-family");
static const int commitment_HASH = HashingUtils::HashString("commitment");
static const int upfront_HASH = HashingUtils::HashString("upfront");
static const int term_HASH = HashingUtils::HashString("term");
static const int savings_plan_type_HASH = HashingUtils::HashString("savings-plan-type");
static const int payment_option_HASH = HashingUtils::HashString("payment-option");
static const int start_HASH = HashingUtils::HashString("start");
static const int end_HASH = HashingUtils::HashString("end");
SavingsPlansFilterName GetSavingsPlansFilterNameForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == region_HASH)
{
return SavingsPlansFilterName::region;
}
else if (hashCode == ec2_instance_family_HASH)
{
return SavingsPlansFilterName::ec2_instance_family;
}
else if (hashCode == commitment_HASH)
{
return SavingsPlansFilterName::commitment;
}
else if (hashCode == upfront_HASH)
{
return SavingsPlansFilterName::upfront;
}
else if (hashCode == term_HASH)
{
return SavingsPlansFilterName::term;
}
else if (hashCode == savings_plan_type_HASH)
{
return SavingsPlansFilterName::savings_plan_type;
}
else if (hashCode == payment_option_HASH)
{
return SavingsPlansFilterName::payment_option;
}
else if (hashCode == start_HASH)
{
return SavingsPlansFilterName::start;
}
else if (hashCode == end_HASH)
{
return SavingsPlansFilterName::end;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SavingsPlansFilterName>(hashCode);
}
return SavingsPlansFilterName::NOT_SET;
}
Aws::String GetNameForSavingsPlansFilterName(SavingsPlansFilterName enumValue)
{
switch(enumValue)
{
case SavingsPlansFilterName::region:
return "region";
case SavingsPlansFilterName::ec2_instance_family:
return "ec2-instance-family";
case SavingsPlansFilterName::commitment:
return "commitment";
case SavingsPlansFilterName::upfront:
return "upfront";
case SavingsPlansFilterName::term:
return "term";
case SavingsPlansFilterName::savings_plan_type:
return "savings-plan-type";
case SavingsPlansFilterName::payment_option:
return "payment-option";
case SavingsPlansFilterName::start:
return "start";
case SavingsPlansFilterName::end:
return "end";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SavingsPlansFilterNameMapper
} // namespace Model
} // namespace SavingsPlans
} // namespace Aws

View File

@@ -0,0 +1,47 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/TagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
TagResourceRequest::TagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String TagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("resourceArn", m_resourceArn);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/TagResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
TagResourceResult::TagResourceResult()
{
}
TagResourceResult::TagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
TagResourceResult& TagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,47 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/UntagResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UntagResourceRequest::UntagResourceRequest() :
m_resourceArnHasBeenSet(false),
m_tagKeysHasBeenSet(false)
{
}
Aws::String UntagResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("resourceArn", m_resourceArn);
}
if(m_tagKeysHasBeenSet)
{
Array<JsonValue> tagKeysJsonList(m_tagKeys.size());
for(unsigned tagKeysIndex = 0; tagKeysIndex < tagKeysJsonList.GetLength(); ++tagKeysIndex)
{
tagKeysJsonList[tagKeysIndex].AsString(m_tagKeys[tagKeysIndex]);
}
payload.WithArray("tagKeys", std::move(tagKeysJsonList));
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/savingsplans/model/UntagResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SavingsPlans::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UntagResourceResult::UntagResourceResult()
{
}
UntagResourceResult::UntagResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UntagResourceResult& UntagResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}