/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** *

Contains the parameters for PurchaseScheduledInstances.

See * Also:

AWS * API Reference

*/ class AWS_EC2_API PurchaseScheduledInstancesRequest : public EC2Request { public: PurchaseScheduledInstancesRequest(); // 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 "PurchaseScheduledInstances"; } Aws::String SerializePayload() const override; protected: void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline PurchaseScheduledInstancesRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline PurchaseScheduledInstancesRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

Unique, case-sensitive identifier that ensures the idempotency of the * request. For more information, see Ensuring * Idempotency.

*/ inline PurchaseScheduledInstancesRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline PurchaseScheduledInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

The purchase requests.

*/ inline const Aws::Vector& GetPurchaseRequests() const{ return m_purchaseRequests; } /** *

The purchase requests.

*/ inline bool PurchaseRequestsHasBeenSet() const { return m_purchaseRequestsHasBeenSet; } /** *

The purchase requests.

*/ inline void SetPurchaseRequests(const Aws::Vector& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests = value; } /** *

The purchase requests.

*/ inline void SetPurchaseRequests(Aws::Vector&& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests = std::move(value); } /** *

The purchase requests.

*/ inline PurchaseScheduledInstancesRequest& WithPurchaseRequests(const Aws::Vector& value) { SetPurchaseRequests(value); return *this;} /** *

The purchase requests.

*/ inline PurchaseScheduledInstancesRequest& WithPurchaseRequests(Aws::Vector&& value) { SetPurchaseRequests(std::move(value)); return *this;} /** *

The purchase requests.

*/ inline PurchaseScheduledInstancesRequest& AddPurchaseRequests(const PurchaseRequest& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests.push_back(value); return *this; } /** *

The purchase requests.

*/ inline PurchaseScheduledInstancesRequest& AddPurchaseRequests(PurchaseRequest&& value) { m_purchaseRequestsHasBeenSet = true; m_purchaseRequests.push_back(std::move(value)); return *this; } private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet; bool m_dryRun; bool m_dryRunHasBeenSet; Aws::Vector m_purchaseRequests; bool m_purchaseRequestsHasBeenSet; }; } // namespace Model } // namespace EC2 } // namespace Aws