/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Athena { namespace Model { /** *

A reservation for a specified number of data processing units (DPUs). When a * reservation is initially created, it has no DPUs. Athena allocates DPUs until * the allocated amount equals the requested amount.

See Also:

AWS * API Reference

*/ class CapacityReservation { public: AWS_ATHENA_API CapacityReservation(); AWS_ATHENA_API CapacityReservation(Aws::Utils::Json::JsonView jsonValue); AWS_ATHENA_API CapacityReservation& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ATHENA_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the capacity reservation.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the capacity reservation.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the capacity reservation.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the capacity reservation.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the capacity reservation.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the capacity reservation.

*/ inline CapacityReservation& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the capacity reservation.

*/ inline CapacityReservation& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the capacity reservation.

*/ inline CapacityReservation& WithName(const char* value) { SetName(value); return *this;} /** *

The status of the capacity reservation.

*/ inline const CapacityReservationStatus& GetStatus() const{ return m_status; } /** *

The status of the capacity reservation.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the capacity reservation.

*/ inline void SetStatus(const CapacityReservationStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the capacity reservation.

*/ inline void SetStatus(CapacityReservationStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the capacity reservation.

*/ inline CapacityReservation& WithStatus(const CapacityReservationStatus& value) { SetStatus(value); return *this;} /** *

The status of the capacity reservation.

*/ inline CapacityReservation& WithStatus(CapacityReservationStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The number of data processing units requested.

*/ inline int GetTargetDpus() const{ return m_targetDpus; } /** *

The number of data processing units requested.

*/ inline bool TargetDpusHasBeenSet() const { return m_targetDpusHasBeenSet; } /** *

The number of data processing units requested.

*/ inline void SetTargetDpus(int value) { m_targetDpusHasBeenSet = true; m_targetDpus = value; } /** *

The number of data processing units requested.

*/ inline CapacityReservation& WithTargetDpus(int value) { SetTargetDpus(value); return *this;} /** *

The number of data processing units currently allocated.

*/ inline int GetAllocatedDpus() const{ return m_allocatedDpus; } /** *

The number of data processing units currently allocated.

*/ inline bool AllocatedDpusHasBeenSet() const { return m_allocatedDpusHasBeenSet; } /** *

The number of data processing units currently allocated.

*/ inline void SetAllocatedDpus(int value) { m_allocatedDpusHasBeenSet = true; m_allocatedDpus = value; } /** *

The number of data processing units currently allocated.

*/ inline CapacityReservation& WithAllocatedDpus(int value) { SetAllocatedDpus(value); return *this;} inline const CapacityAllocation& GetLastAllocation() const{ return m_lastAllocation; } inline bool LastAllocationHasBeenSet() const { return m_lastAllocationHasBeenSet; } inline void SetLastAllocation(const CapacityAllocation& value) { m_lastAllocationHasBeenSet = true; m_lastAllocation = value; } inline void SetLastAllocation(CapacityAllocation&& value) { m_lastAllocationHasBeenSet = true; m_lastAllocation = std::move(value); } inline CapacityReservation& WithLastAllocation(const CapacityAllocation& value) { SetLastAllocation(value); return *this;} inline CapacityReservation& WithLastAllocation(CapacityAllocation&& value) { SetLastAllocation(std::move(value)); return *this;} /** *

The time of the most recent capacity allocation that succeeded.

*/ inline const Aws::Utils::DateTime& GetLastSuccessfulAllocationTime() const{ return m_lastSuccessfulAllocationTime; } /** *

The time of the most recent capacity allocation that succeeded.

*/ inline bool LastSuccessfulAllocationTimeHasBeenSet() const { return m_lastSuccessfulAllocationTimeHasBeenSet; } /** *

The time of the most recent capacity allocation that succeeded.

*/ inline void SetLastSuccessfulAllocationTime(const Aws::Utils::DateTime& value) { m_lastSuccessfulAllocationTimeHasBeenSet = true; m_lastSuccessfulAllocationTime = value; } /** *

The time of the most recent capacity allocation that succeeded.

*/ inline void SetLastSuccessfulAllocationTime(Aws::Utils::DateTime&& value) { m_lastSuccessfulAllocationTimeHasBeenSet = true; m_lastSuccessfulAllocationTime = std::move(value); } /** *

The time of the most recent capacity allocation that succeeded.

*/ inline CapacityReservation& WithLastSuccessfulAllocationTime(const Aws::Utils::DateTime& value) { SetLastSuccessfulAllocationTime(value); return *this;} /** *

The time of the most recent capacity allocation that succeeded.

*/ inline CapacityReservation& WithLastSuccessfulAllocationTime(Aws::Utils::DateTime&& value) { SetLastSuccessfulAllocationTime(std::move(value)); return *this;} /** *

The time in UTC epoch millis when the capacity reservation was created.

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

The time in UTC epoch millis when the capacity reservation was created.

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

The time in UTC epoch millis when the capacity reservation was created.

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

The time in UTC epoch millis when the capacity reservation was created.

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

The time in UTC epoch millis when the capacity reservation was created.

*/ inline CapacityReservation& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

The time in UTC epoch millis when the capacity reservation was created.

*/ inline CapacityReservation& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; CapacityReservationStatus m_status; bool m_statusHasBeenSet = false; int m_targetDpus; bool m_targetDpusHasBeenSet = false; int m_allocatedDpus; bool m_allocatedDpusHasBeenSet = false; CapacityAllocation m_lastAllocation; bool m_lastAllocationHasBeenSet = false; Aws::Utils::DateTime m_lastSuccessfulAllocationTime; bool m_lastSuccessfulAllocationTimeHasBeenSet = false; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; }; } // namespace Model } // namespace Athena } // namespace Aws