/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Backup { namespace Model { /** *

A legal hold is an administrative tool that helps prevent backups from being * deleted while under a hold. While the hold is in place, backups under a hold * cannot be deleted and lifecycle policies that would alter the backup status * (such as transition to cold storage) are delayed until the legal hold is * removed. A backup can have more than one legal hold. Legal holds are applied to * one or more backups (also known as recovery points). These backups can be * filtered by resource types and by resource IDs.

See Also:

AWS * API Reference

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

This is the title of a legal hold.

*/ inline const Aws::String& GetTitle() const{ return m_title; } /** *

This is the title of a legal hold.

*/ inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; } /** *

This is the title of a legal hold.

*/ inline void SetTitle(const Aws::String& value) { m_titleHasBeenSet = true; m_title = value; } /** *

This is the title of a legal hold.

*/ inline void SetTitle(Aws::String&& value) { m_titleHasBeenSet = true; m_title = std::move(value); } /** *

This is the title of a legal hold.

*/ inline void SetTitle(const char* value) { m_titleHasBeenSet = true; m_title.assign(value); } /** *

This is the title of a legal hold.

*/ inline LegalHold& WithTitle(const Aws::String& value) { SetTitle(value); return *this;} /** *

This is the title of a legal hold.

*/ inline LegalHold& WithTitle(Aws::String&& value) { SetTitle(std::move(value)); return *this;} /** *

This is the title of a legal hold.

*/ inline LegalHold& WithTitle(const char* value) { SetTitle(value); return *this;} /** *

This is the status of the legal hold. Statuses can be ACTIVE, * CREATING, CANCELED, and CANCELING.

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

This is the status of the legal hold. Statuses can be ACTIVE, * CREATING, CANCELED, and CANCELING.

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

This is the status of the legal hold. Statuses can be ACTIVE, * CREATING, CANCELED, and CANCELING.

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

This is the status of the legal hold. Statuses can be ACTIVE, * CREATING, CANCELED, and CANCELING.

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

This is the status of the legal hold. Statuses can be ACTIVE, * CREATING, CANCELED, and CANCELING.

*/ inline LegalHold& WithStatus(const LegalHoldStatus& value) { SetStatus(value); return *this;} /** *

This is the status of the legal hold. Statuses can be ACTIVE, * CREATING, CANCELED, and CANCELING.

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

This is the description of a legal hold.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

This is the description of a legal hold.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

This is the description of a legal hold.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

This is the description of a legal hold.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

This is the description of a legal hold.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

This is the description of a legal hold.

*/ inline LegalHold& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

This is the description of a legal hold.

*/ inline LegalHold& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

This is the description of a legal hold.

*/ inline LegalHold& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

ID of specific legal hold on one or more recovery points.

*/ inline const Aws::String& GetLegalHoldId() const{ return m_legalHoldId; } /** *

ID of specific legal hold on one or more recovery points.

*/ inline bool LegalHoldIdHasBeenSet() const { return m_legalHoldIdHasBeenSet; } /** *

ID of specific legal hold on one or more recovery points.

*/ inline void SetLegalHoldId(const Aws::String& value) { m_legalHoldIdHasBeenSet = true; m_legalHoldId = value; } /** *

ID of specific legal hold on one or more recovery points.

*/ inline void SetLegalHoldId(Aws::String&& value) { m_legalHoldIdHasBeenSet = true; m_legalHoldId = std::move(value); } /** *

ID of specific legal hold on one or more recovery points.

*/ inline void SetLegalHoldId(const char* value) { m_legalHoldIdHasBeenSet = true; m_legalHoldId.assign(value); } /** *

ID of specific legal hold on one or more recovery points.

*/ inline LegalHold& WithLegalHoldId(const Aws::String& value) { SetLegalHoldId(value); return *this;} /** *

ID of specific legal hold on one or more recovery points.

*/ inline LegalHold& WithLegalHoldId(Aws::String&& value) { SetLegalHoldId(std::move(value)); return *this;} /** *

ID of specific legal hold on one or more recovery points.

*/ inline LegalHold& WithLegalHoldId(const char* value) { SetLegalHoldId(value); return *this;} /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline const Aws::String& GetLegalHoldArn() const{ return m_legalHoldArn; } /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline bool LegalHoldArnHasBeenSet() const { return m_legalHoldArnHasBeenSet; } /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline void SetLegalHoldArn(const Aws::String& value) { m_legalHoldArnHasBeenSet = true; m_legalHoldArn = value; } /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline void SetLegalHoldArn(Aws::String&& value) { m_legalHoldArnHasBeenSet = true; m_legalHoldArn = std::move(value); } /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline void SetLegalHoldArn(const char* value) { m_legalHoldArnHasBeenSet = true; m_legalHoldArn.assign(value); } /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline LegalHold& WithLegalHoldArn(const Aws::String& value) { SetLegalHoldArn(value); return *this;} /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline LegalHold& WithLegalHoldArn(Aws::String&& value) { SetLegalHoldArn(std::move(value)); return *this;} /** *

This is an Amazon Resource Number (ARN) that uniquely identifies the legal * hold; for example, * arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.

*/ inline LegalHold& WithLegalHoldArn(const char* value) { SetLegalHoldArn(value); return *this;} /** *

This is the time in number format when legal hold was created.

*/ inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; } /** *

This is the time in number format when legal hold was created.

*/ inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; } /** *

This is the time in number format when legal hold was created.

*/ inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; } /** *

This is the time in number format when legal hold was created.

*/ inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); } /** *

This is the time in number format when legal hold was created.

*/ inline LegalHold& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;} /** *

This is the time in number format when legal hold was created.

*/ inline LegalHold& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;} /** *

This is the time in number format when legal hold was cancelled.

*/ inline const Aws::Utils::DateTime& GetCancellationDate() const{ return m_cancellationDate; } /** *

This is the time in number format when legal hold was cancelled.

*/ inline bool CancellationDateHasBeenSet() const { return m_cancellationDateHasBeenSet; } /** *

This is the time in number format when legal hold was cancelled.

*/ inline void SetCancellationDate(const Aws::Utils::DateTime& value) { m_cancellationDateHasBeenSet = true; m_cancellationDate = value; } /** *

This is the time in number format when legal hold was cancelled.

*/ inline void SetCancellationDate(Aws::Utils::DateTime&& value) { m_cancellationDateHasBeenSet = true; m_cancellationDate = std::move(value); } /** *

This is the time in number format when legal hold was cancelled.

*/ inline LegalHold& WithCancellationDate(const Aws::Utils::DateTime& value) { SetCancellationDate(value); return *this;} /** *

This is the time in number format when legal hold was cancelled.

*/ inline LegalHold& WithCancellationDate(Aws::Utils::DateTime&& value) { SetCancellationDate(std::move(value)); return *this;} private: Aws::String m_title; bool m_titleHasBeenSet = false; LegalHoldStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_legalHoldId; bool m_legalHoldIdHasBeenSet = false; Aws::String m_legalHoldArn; bool m_legalHoldArnHasBeenSet = false; Aws::Utils::DateTime m_creationDate; bool m_creationDateHasBeenSet = false; Aws::Utils::DateTime m_cancellationDate; bool m_cancellationDateHasBeenSet = false; }; } // namespace Model } // namespace Backup } // namespace Aws