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

Describes a block storage disk snapshot.

See Also:

AWS * API Reference

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The name of the disk snapshot (e.g., my-disk-snapshot).

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

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

The Amazon Resource Name (ARN) of the disk snapshot.

*/ inline DiskSnapshot& 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 DiskSnapshot& 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 DiskSnapshot& 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 DiskSnapshot& WithSupportCode(const char* value) { SetSupportCode(value); return *this;} /** *

The date when the disk snapshot was created.

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

The date when the disk snapshot was created.

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

The date when the disk snapshot was created.

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

The date when the disk snapshot was created.

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

The date when the disk snapshot was created.

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

The date when the disk snapshot was created.

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

The AWS Region and Availability Zone where the disk snapshot was created.

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

The AWS Region and Availability Zone where the disk snapshot was created.

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

The AWS Region and Availability Zone where the disk snapshot was created.

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

The AWS Region and Availability Zone where the disk snapshot was created.

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

The AWS Region and Availability Zone where the disk snapshot was created.

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

The AWS Region and Availability Zone where the disk snapshot was created.

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

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

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

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

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

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

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

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

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

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

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

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

*/ inline DiskSnapshot& 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 DiskSnapshot& 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 DiskSnapshot& 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 DiskSnapshot& 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 DiskSnapshot& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.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 DiskSnapshot& WithSizeInGb(int value) { SetSizeInGb(value); return *this;} /** *

The status of the disk snapshot operation.

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

The status of the disk snapshot operation.

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

The status of the disk snapshot operation.

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

The status of the disk snapshot operation.

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

The status of the disk snapshot operation.

*/ inline DiskSnapshot& WithState(const DiskSnapshotState& value) { SetState(value); return *this;} /** *

The status of the disk snapshot operation.

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

The progress of the snapshot.

*/ inline const Aws::String& GetProgress() const{ return m_progress; } /** *

The progress of the snapshot.

*/ inline bool ProgressHasBeenSet() const { return m_progressHasBeenSet; } /** *

The progress of the snapshot.

*/ inline void SetProgress(const Aws::String& value) { m_progressHasBeenSet = true; m_progress = value; } /** *

The progress of the snapshot.

*/ inline void SetProgress(Aws::String&& value) { m_progressHasBeenSet = true; m_progress = std::move(value); } /** *

The progress of the snapshot.

*/ inline void SetProgress(const char* value) { m_progressHasBeenSet = true; m_progress.assign(value); } /** *

The progress of the snapshot.

*/ inline DiskSnapshot& WithProgress(const Aws::String& value) { SetProgress(value); return *this;} /** *

The progress of the snapshot.

*/ inline DiskSnapshot& WithProgress(Aws::String&& value) { SetProgress(std::move(value)); return *this;} /** *

The progress of the snapshot.

*/ inline DiskSnapshot& WithProgress(const char* value) { SetProgress(value); return *this;} /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline const Aws::String& GetFromDiskName() const{ return m_fromDiskName; } /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline bool FromDiskNameHasBeenSet() const { return m_fromDiskNameHasBeenSet; } /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline void SetFromDiskName(const Aws::String& value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName = value; } /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline void SetFromDiskName(Aws::String&& value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName = std::move(value); } /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline void SetFromDiskName(const char* value) { m_fromDiskNameHasBeenSet = true; m_fromDiskName.assign(value); } /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline DiskSnapshot& WithFromDiskName(const Aws::String& value) { SetFromDiskName(value); return *this;} /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline DiskSnapshot& WithFromDiskName(Aws::String&& value) { SetFromDiskName(std::move(value)); return *this;} /** *

The unique name of the source disk from which the disk snapshot was * created.

*/ inline DiskSnapshot& WithFromDiskName(const char* value) { SetFromDiskName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline const Aws::String& GetFromDiskArn() const{ return m_fromDiskArn; } /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline bool FromDiskArnHasBeenSet() const { return m_fromDiskArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline void SetFromDiskArn(const Aws::String& value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn = value; } /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline void SetFromDiskArn(Aws::String&& value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline void SetFromDiskArn(const char* value) { m_fromDiskArnHasBeenSet = true; m_fromDiskArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline DiskSnapshot& WithFromDiskArn(const Aws::String& value) { SetFromDiskArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline DiskSnapshot& WithFromDiskArn(Aws::String&& value) { SetFromDiskArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the source disk from which the disk * snapshot was created.

*/ inline DiskSnapshot& WithFromDiskArn(const char* value) { SetFromDiskArn(value); return *this;} /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline const Aws::String& GetFromInstanceName() const{ return m_fromInstanceName; } /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline bool FromInstanceNameHasBeenSet() const { return m_fromInstanceNameHasBeenSet; } /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline void SetFromInstanceName(const Aws::String& value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName = value; } /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline void SetFromInstanceName(Aws::String&& value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName = std::move(value); } /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline void SetFromInstanceName(const char* value) { m_fromInstanceNameHasBeenSet = true; m_fromInstanceName.assign(value); } /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline DiskSnapshot& WithFromInstanceName(const Aws::String& value) { SetFromInstanceName(value); return *this;} /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline DiskSnapshot& WithFromInstanceName(Aws::String&& value) { SetFromInstanceName(std::move(value)); return *this;} /** *

The unique name of the source instance from which the disk (system volume) * snapshot was created.

*/ inline DiskSnapshot& WithFromInstanceName(const char* value) { SetFromInstanceName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline const Aws::String& GetFromInstanceArn() const{ return m_fromInstanceArn; } /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline bool FromInstanceArnHasBeenSet() const { return m_fromInstanceArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline void SetFromInstanceArn(const Aws::String& value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn = value; } /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline void SetFromInstanceArn(Aws::String&& value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline void SetFromInstanceArn(const char* value) { m_fromInstanceArnHasBeenSet = true; m_fromInstanceArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline DiskSnapshot& WithFromInstanceArn(const Aws::String& value) { SetFromInstanceArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline DiskSnapshot& WithFromInstanceArn(Aws::String&& value) { SetFromInstanceArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the source instance from which the disk * (system volume) snapshot was created.

*/ inline DiskSnapshot& WithFromInstanceArn(const char* value) { SetFromInstanceArn(value); return *this;} /** *

A Boolean value indicating whether the snapshot was created from an automatic * snapshot.

*/ inline bool GetIsFromAutoSnapshot() const{ return m_isFromAutoSnapshot; } /** *

A Boolean value indicating whether the snapshot was created from an automatic * snapshot.

*/ inline bool IsFromAutoSnapshotHasBeenSet() const { return m_isFromAutoSnapshotHasBeenSet; } /** *

A Boolean value indicating whether the snapshot was created from an automatic * snapshot.

*/ inline void SetIsFromAutoSnapshot(bool value) { m_isFromAutoSnapshotHasBeenSet = true; m_isFromAutoSnapshot = value; } /** *

A Boolean value indicating whether the snapshot was created from an automatic * snapshot.

*/ inline DiskSnapshot& WithIsFromAutoSnapshot(bool value) { SetIsFromAutoSnapshot(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; int m_sizeInGb; bool m_sizeInGbHasBeenSet = false; DiskSnapshotState m_state; bool m_stateHasBeenSet = false; Aws::String m_progress; bool m_progressHasBeenSet = false; Aws::String m_fromDiskName; bool m_fromDiskNameHasBeenSet = false; Aws::String m_fromDiskArn; bool m_fromDiskArnHasBeenSet = false; Aws::String m_fromInstanceName; bool m_fromInstanceNameHasBeenSet = false; Aws::String m_fromInstanceArn; bool m_fromInstanceArnHasBeenSet = false; bool m_isFromAutoSnapshot; bool m_isFromAutoSnapshotHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws