/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** */ class ModifyInstanceCreditSpecificationRequest : public EC2Request { public: AWS_EC2_API ModifyInstanceCreditSpecificationRequest(); // 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 "ModifyInstanceCreditSpecification"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

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 ModifyInstanceCreditSpecificationRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} /** *

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

A unique, case-sensitive token that you provide to ensure idempotency of your * modification request. For more information, see Ensuring * Idempotency.

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

Information about the credit option for CPU usage.

*/ inline const Aws::Vector& GetInstanceCreditSpecifications() const{ return m_instanceCreditSpecifications; } /** *

Information about the credit option for CPU usage.

*/ inline bool InstanceCreditSpecificationsHasBeenSet() const { return m_instanceCreditSpecificationsHasBeenSet; } /** *

Information about the credit option for CPU usage.

*/ inline void SetInstanceCreditSpecifications(const Aws::Vector& value) { m_instanceCreditSpecificationsHasBeenSet = true; m_instanceCreditSpecifications = value; } /** *

Information about the credit option for CPU usage.

*/ inline void SetInstanceCreditSpecifications(Aws::Vector&& value) { m_instanceCreditSpecificationsHasBeenSet = true; m_instanceCreditSpecifications = std::move(value); } /** *

Information about the credit option for CPU usage.

*/ inline ModifyInstanceCreditSpecificationRequest& WithInstanceCreditSpecifications(const Aws::Vector& value) { SetInstanceCreditSpecifications(value); return *this;} /** *

Information about the credit option for CPU usage.

*/ inline ModifyInstanceCreditSpecificationRequest& WithInstanceCreditSpecifications(Aws::Vector&& value) { SetInstanceCreditSpecifications(std::move(value)); return *this;} /** *

Information about the credit option for CPU usage.

*/ inline ModifyInstanceCreditSpecificationRequest& AddInstanceCreditSpecifications(const InstanceCreditSpecificationRequest& value) { m_instanceCreditSpecificationsHasBeenSet = true; m_instanceCreditSpecifications.push_back(value); return *this; } /** *

Information about the credit option for CPU usage.

*/ inline ModifyInstanceCreditSpecificationRequest& AddInstanceCreditSpecifications(InstanceCreditSpecificationRequest&& value) { m_instanceCreditSpecificationsHasBeenSet = true; m_instanceCreditSpecifications.push_back(std::move(value)); return *this; } private: bool m_dryRun; bool m_dryRunHasBeenSet = false; Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::Vector m_instanceCreditSpecifications; bool m_instanceCreditSpecificationsHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws