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

Describes a block storage disk.

See Also:

AWS API * Reference

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

The unique name of the disk.

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

The unique name of the disk.

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

The unique name of the disk.

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

The unique name of the disk.

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

The unique name of the disk.

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

The unique name of the disk.

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

The unique name of the disk.

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

The unique name of the disk.

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

The Amazon Resource Name (ARN) of the disk.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline Disk& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline Disk& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the disk.

*/ inline Disk& WithArn(const char* value) { SetArn(value); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline const Aws::String& GetSupportCode() const{ return m_supportCode; } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline void SetSupportCode(const Aws::String& value) { m_supportCodeHasBeenSet = true; m_supportCode = value; } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline void SetSupportCode(Aws::String&& value) { m_supportCodeHasBeenSet = true; m_supportCode = std::move(value); } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline void SetSupportCode(const char* value) { m_supportCodeHasBeenSet = true; m_supportCode.assign(value); } /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline Disk& WithSupportCode(const Aws::String& value) { SetSupportCode(value); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline Disk& WithSupportCode(Aws::String&& value) { SetSupportCode(std::move(value)); return *this;} /** *

The support code. Include this code in your email to support when you have * questions about an instance or another resource in Lightsail. This code enables * our support team to look up your Lightsail information more easily.

*/ inline Disk& WithSupportCode(const char* value) { SetSupportCode(value); return *this;} /** *

The date when the disk was created.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The date when the disk was created.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The date when the disk was created.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The date when the disk was created.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The date when the disk was created.

*/ inline Disk& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The date when the disk was created.

*/ inline Disk& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The AWS Region and Availability Zone where the disk is located.

*/ inline const ResourceLocation& GetLocation() const{ return m_location; } /** *

The AWS Region and Availability Zone where the disk is located.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

The AWS Region and Availability Zone where the disk is located.

*/ inline void SetLocation(const ResourceLocation& value) { m_locationHasBeenSet = true; m_location = value; } /** *

The AWS Region and Availability Zone where the disk is located.

*/ inline void SetLocation(ResourceLocation&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

The AWS Region and Availability Zone where the disk is located.

*/ inline Disk& WithLocation(const ResourceLocation& value) { SetLocation(value); return *this;} /** *

The AWS Region and Availability Zone where the disk is located.

*/ inline Disk& WithLocation(ResourceLocation&& value) { SetLocation(std::move(value)); return *this;} /** *

The Lightsail resource type (e.g., Disk).

*/ inline const ResourceType& GetResourceType() const{ return m_resourceType; } /** *

The Lightsail resource type (e.g., Disk).

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The Lightsail resource type (e.g., Disk).

*/ inline void SetResourceType(const ResourceType& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The Lightsail resource type (e.g., Disk).

*/ inline void SetResourceType(ResourceType&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The Lightsail resource type (e.g., Disk).

*/ inline Disk& WithResourceType(const ResourceType& value) { SetResourceType(value); return *this;} /** *

The Lightsail resource type (e.g., Disk).

*/ inline Disk& WithResourceType(ResourceType&& value) { SetResourceType(std::move(value)); return *this;} /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline Disk& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline Disk& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline Disk& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tag keys and optional values for the resource. For more information about * tags in Lightsail, see the Amazon * Lightsail Developer Guide.

*/ inline Disk& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline const Aws::Vector& GetAddOns() const{ return m_addOns; } /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline bool AddOnsHasBeenSet() const { return m_addOnsHasBeenSet; } /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline void SetAddOns(const Aws::Vector& value) { m_addOnsHasBeenSet = true; m_addOns = value; } /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline void SetAddOns(Aws::Vector&& value) { m_addOnsHasBeenSet = true; m_addOns = std::move(value); } /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline Disk& WithAddOns(const Aws::Vector& value) { SetAddOns(value); return *this;} /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline Disk& WithAddOns(Aws::Vector&& value) { SetAddOns(std::move(value)); return *this;} /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline Disk& AddAddOns(const AddOn& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(value); return *this; } /** *

An array of objects representing the add-ons enabled on the disk.

*/ inline Disk& AddAddOns(AddOn&& value) { m_addOnsHasBeenSet = true; m_addOns.push_back(std::move(value)); return *this; } /** *

The size of the disk in GB.

*/ inline int GetSizeInGb() const{ return m_sizeInGb; } /** *

The size of the disk in GB.

*/ inline bool SizeInGbHasBeenSet() const { return m_sizeInGbHasBeenSet; } /** *

The size of the disk in GB.

*/ inline void SetSizeInGb(int value) { m_sizeInGbHasBeenSet = true; m_sizeInGb = value; } /** *

The size of the disk in GB.

*/ inline Disk& WithSizeInGb(int value) { SetSizeInGb(value); return *this;} /** *

A Boolean value indicating whether this disk is a system disk (has an * operating system loaded on it).

*/ inline bool GetIsSystemDisk() const{ return m_isSystemDisk; } /** *

A Boolean value indicating whether this disk is a system disk (has an * operating system loaded on it).

*/ inline bool IsSystemDiskHasBeenSet() const { return m_isSystemDiskHasBeenSet; } /** *

A Boolean value indicating whether this disk is a system disk (has an * operating system loaded on it).

*/ inline void SetIsSystemDisk(bool value) { m_isSystemDiskHasBeenSet = true; m_isSystemDisk = value; } /** *

A Boolean value indicating whether this disk is a system disk (has an * operating system loaded on it).

*/ inline Disk& WithIsSystemDisk(bool value) { SetIsSystemDisk(value); return *this;} /** *

The input/output operations per second (IOPS) of the disk.

*/ inline int GetIops() const{ return m_iops; } /** *

The input/output operations per second (IOPS) of the disk.

*/ inline bool IopsHasBeenSet() const { return m_iopsHasBeenSet; } /** *

The input/output operations per second (IOPS) of the disk.

*/ inline void SetIops(int value) { m_iopsHasBeenSet = true; m_iops = value; } /** *

The input/output operations per second (IOPS) of the disk.

*/ inline Disk& WithIops(int value) { SetIops(value); return *this;} /** *

The disk path.

*/ inline const Aws::String& GetPath() const{ return m_path; } /** *

The disk path.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The disk path.

*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The disk path.

*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The disk path.

*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *

The disk path.

*/ inline Disk& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *

The disk path.

*/ inline Disk& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *

The disk path.

*/ inline Disk& WithPath(const char* value) { SetPath(value); return *this;} /** *

Describes the status of the disk.

*/ inline const DiskState& GetState() const{ return m_state; } /** *

Describes the status of the disk.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

Describes the status of the disk.

*/ inline void SetState(const DiskState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

Describes the status of the disk.

*/ inline void SetState(DiskState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

Describes the status of the disk.

*/ inline Disk& WithState(const DiskState& value) { SetState(value); return *this;} /** *

Describes the status of the disk.

*/ inline Disk& WithState(DiskState&& value) { SetState(std::move(value)); return *this;} /** *

The resources to which the disk is attached.

*/ inline const Aws::String& GetAttachedTo() const{ return m_attachedTo; } /** *

The resources to which the disk is attached.

*/ inline bool AttachedToHasBeenSet() const { return m_attachedToHasBeenSet; } /** *

The resources to which the disk is attached.

*/ inline void SetAttachedTo(const Aws::String& value) { m_attachedToHasBeenSet = true; m_attachedTo = value; } /** *

The resources to which the disk is attached.

*/ inline void SetAttachedTo(Aws::String&& value) { m_attachedToHasBeenSet = true; m_attachedTo = std::move(value); } /** *

The resources to which the disk is attached.

*/ inline void SetAttachedTo(const char* value) { m_attachedToHasBeenSet = true; m_attachedTo.assign(value); } /** *

The resources to which the disk is attached.

*/ inline Disk& WithAttachedTo(const Aws::String& value) { SetAttachedTo(value); return *this;} /** *

The resources to which the disk is attached.

*/ inline Disk& WithAttachedTo(Aws::String&& value) { SetAttachedTo(std::move(value)); return *this;} /** *

The resources to which the disk is attached.

*/ inline Disk& WithAttachedTo(const char* value) { SetAttachedTo(value); return *this;} /** *

A Boolean value indicating whether the disk is attached.

*/ inline bool GetIsAttached() const{ return m_isAttached; } /** *

A Boolean value indicating whether the disk is attached.

*/ inline bool IsAttachedHasBeenSet() const { return m_isAttachedHasBeenSet; } /** *

A Boolean value indicating whether the disk is attached.

*/ inline void SetIsAttached(bool value) { m_isAttachedHasBeenSet = true; m_isAttached = value; } /** *

A Boolean value indicating whether the disk is attached.

*/ inline Disk& WithIsAttached(bool value) { SetIsAttached(value); return *this;} /** *

The status of automatically mounting a storage disk to a virtual * computer.

This parameter only applies to Lightsail for * Research resources.

*/ inline const AutoMountStatus& GetAutoMountStatus() const{ return m_autoMountStatus; } /** *

The status of automatically mounting a storage disk to a virtual * computer.

This parameter only applies to Lightsail for * Research resources.

*/ inline bool AutoMountStatusHasBeenSet() const { return m_autoMountStatusHasBeenSet; } /** *

The status of automatically mounting a storage disk to a virtual * computer.

This parameter only applies to Lightsail for * Research resources.

*/ inline void SetAutoMountStatus(const AutoMountStatus& value) { m_autoMountStatusHasBeenSet = true; m_autoMountStatus = value; } /** *

The status of automatically mounting a storage disk to a virtual * computer.

This parameter only applies to Lightsail for * Research resources.

*/ inline void SetAutoMountStatus(AutoMountStatus&& value) { m_autoMountStatusHasBeenSet = true; m_autoMountStatus = std::move(value); } /** *

The status of automatically mounting a storage disk to a virtual * computer.

This parameter only applies to Lightsail for * Research resources.

*/ inline Disk& WithAutoMountStatus(const AutoMountStatus& value) { SetAutoMountStatus(value); return *this;} /** *

The status of automatically mounting a storage disk to a virtual * computer.

This parameter only applies to Lightsail for * Research resources.

*/ inline Disk& WithAutoMountStatus(AutoMountStatus&& value) { SetAutoMountStatus(std::move(value)); return *this;} private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_supportCode; bool m_supportCodeHasBeenSet = false; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet = false; ResourceLocation m_location; bool m_locationHasBeenSet = false; ResourceType m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Vector m_addOns; bool m_addOnsHasBeenSet = false; int m_sizeInGb; bool m_sizeInGbHasBeenSet = false; bool m_isSystemDisk; bool m_isSystemDiskHasBeenSet = false; int m_iops; bool m_iopsHasBeenSet = false; Aws::String m_path; bool m_pathHasBeenSet = false; DiskState m_state; bool m_stateHasBeenSet = false; Aws::String m_attachedTo; bool m_attachedToHasBeenSet = false; bool m_isAttached; bool m_isAttachedHasBeenSet = false; AutoMountStatus m_autoMountStatus; bool m_autoMountStatusHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws