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

Contains information about a backup of an AWS CloudHSM cluster. All backup * objects contain the BackupId, BackupState, * ClusterId, and CreateTimestamp parameters. Backups * that were copied into a destination region additionally contain the * CopyTimestamp, SourceBackup, * SourceCluster, and SourceRegion parameters. A backup * that is pending deletion will include the DeleteTimestamp * parameter.

See Also:

AWS * API Reference

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

The identifier (ID) of the backup.

*/ inline const Aws::String& GetBackupId() const{ return m_backupId; } /** *

The identifier (ID) of the backup.

*/ inline bool BackupIdHasBeenSet() const { return m_backupIdHasBeenSet; } /** *

The identifier (ID) of the backup.

*/ inline void SetBackupId(const Aws::String& value) { m_backupIdHasBeenSet = true; m_backupId = value; } /** *

The identifier (ID) of the backup.

*/ inline void SetBackupId(Aws::String&& value) { m_backupIdHasBeenSet = true; m_backupId = std::move(value); } /** *

The identifier (ID) of the backup.

*/ inline void SetBackupId(const char* value) { m_backupIdHasBeenSet = true; m_backupId.assign(value); } /** *

The identifier (ID) of the backup.

*/ inline Backup& WithBackupId(const Aws::String& value) { SetBackupId(value); return *this;} /** *

The identifier (ID) of the backup.

*/ inline Backup& WithBackupId(Aws::String&& value) { SetBackupId(std::move(value)); return *this;} /** *

The identifier (ID) of the backup.

*/ inline Backup& WithBackupId(const char* value) { SetBackupId(value); return *this;} /** *

The state of the backup.

*/ inline const BackupState& GetBackupState() const{ return m_backupState; } /** *

The state of the backup.

*/ inline bool BackupStateHasBeenSet() const { return m_backupStateHasBeenSet; } /** *

The state of the backup.

*/ inline void SetBackupState(const BackupState& value) { m_backupStateHasBeenSet = true; m_backupState = value; } /** *

The state of the backup.

*/ inline void SetBackupState(BackupState&& value) { m_backupStateHasBeenSet = true; m_backupState = std::move(value); } /** *

The state of the backup.

*/ inline Backup& WithBackupState(const BackupState& value) { SetBackupState(value); return *this;} /** *

The state of the backup.

*/ inline Backup& WithBackupState(BackupState&& value) { SetBackupState(std::move(value)); return *this;} /** *

The identifier (ID) of the cluster that was backed up.

*/ inline const Aws::String& GetClusterId() const{ return m_clusterId; } /** *

The identifier (ID) of the cluster that was backed up.

*/ inline bool ClusterIdHasBeenSet() const { return m_clusterIdHasBeenSet; } /** *

The identifier (ID) of the cluster that was backed up.

*/ inline void SetClusterId(const Aws::String& value) { m_clusterIdHasBeenSet = true; m_clusterId = value; } /** *

The identifier (ID) of the cluster that was backed up.

*/ inline void SetClusterId(Aws::String&& value) { m_clusterIdHasBeenSet = true; m_clusterId = std::move(value); } /** *

The identifier (ID) of the cluster that was backed up.

*/ inline void SetClusterId(const char* value) { m_clusterIdHasBeenSet = true; m_clusterId.assign(value); } /** *

The identifier (ID) of the cluster that was backed up.

*/ inline Backup& WithClusterId(const Aws::String& value) { SetClusterId(value); return *this;} /** *

The identifier (ID) of the cluster that was backed up.

*/ inline Backup& WithClusterId(Aws::String&& value) { SetClusterId(std::move(value)); return *this;} /** *

The identifier (ID) of the cluster that was backed up.

*/ inline Backup& WithClusterId(const char* value) { SetClusterId(value); return *this;} /** *

The date and time when the backup was created.

*/ inline const Aws::Utils::DateTime& GetCreateTimestamp() const{ return m_createTimestamp; } /** *

The date and time when the backup was created.

*/ inline bool CreateTimestampHasBeenSet() const { return m_createTimestampHasBeenSet; } /** *

The date and time when the backup was created.

*/ inline void SetCreateTimestamp(const Aws::Utils::DateTime& value) { m_createTimestampHasBeenSet = true; m_createTimestamp = value; } /** *

The date and time when the backup was created.

*/ inline void SetCreateTimestamp(Aws::Utils::DateTime&& value) { m_createTimestampHasBeenSet = true; m_createTimestamp = std::move(value); } /** *

The date and time when the backup was created.

*/ inline Backup& WithCreateTimestamp(const Aws::Utils::DateTime& value) { SetCreateTimestamp(value); return *this;} /** *

The date and time when the backup was created.

*/ inline Backup& WithCreateTimestamp(Aws::Utils::DateTime&& value) { SetCreateTimestamp(std::move(value)); return *this;} /** *

The date and time when the backup was copied from a source backup.

*/ inline const Aws::Utils::DateTime& GetCopyTimestamp() const{ return m_copyTimestamp; } /** *

The date and time when the backup was copied from a source backup.

*/ inline bool CopyTimestampHasBeenSet() const { return m_copyTimestampHasBeenSet; } /** *

The date and time when the backup was copied from a source backup.

*/ inline void SetCopyTimestamp(const Aws::Utils::DateTime& value) { m_copyTimestampHasBeenSet = true; m_copyTimestamp = value; } /** *

The date and time when the backup was copied from a source backup.

*/ inline void SetCopyTimestamp(Aws::Utils::DateTime&& value) { m_copyTimestampHasBeenSet = true; m_copyTimestamp = std::move(value); } /** *

The date and time when the backup was copied from a source backup.

*/ inline Backup& WithCopyTimestamp(const Aws::Utils::DateTime& value) { SetCopyTimestamp(value); return *this;} /** *

The date and time when the backup was copied from a source backup.

*/ inline Backup& WithCopyTimestamp(Aws::Utils::DateTime&& value) { SetCopyTimestamp(std::move(value)); return *this;} /** *

Specifies whether the service should exempt a backup from the retention * policy for the cluster. True exempts a backup from the retention * policy. False means the service applies the backup retention policy * defined at the cluster.

*/ inline bool GetNeverExpires() const{ return m_neverExpires; } /** *

Specifies whether the service should exempt a backup from the retention * policy for the cluster. True exempts a backup from the retention * policy. False means the service applies the backup retention policy * defined at the cluster.

*/ inline bool NeverExpiresHasBeenSet() const { return m_neverExpiresHasBeenSet; } /** *

Specifies whether the service should exempt a backup from the retention * policy for the cluster. True exempts a backup from the retention * policy. False means the service applies the backup retention policy * defined at the cluster.

*/ inline void SetNeverExpires(bool value) { m_neverExpiresHasBeenSet = true; m_neverExpires = value; } /** *

Specifies whether the service should exempt a backup from the retention * policy for the cluster. True exempts a backup from the retention * policy. False means the service applies the backup retention policy * defined at the cluster.

*/ inline Backup& WithNeverExpires(bool value) { SetNeverExpires(value); return *this;} /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline const Aws::String& GetSourceRegion() const{ return m_sourceRegion; } /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline bool SourceRegionHasBeenSet() const { return m_sourceRegionHasBeenSet; } /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline void SetSourceRegion(const Aws::String& value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = value; } /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline void SetSourceRegion(Aws::String&& value) { m_sourceRegionHasBeenSet = true; m_sourceRegion = std::move(value); } /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline void SetSourceRegion(const char* value) { m_sourceRegionHasBeenSet = true; m_sourceRegion.assign(value); } /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline Backup& WithSourceRegion(const Aws::String& value) { SetSourceRegion(value); return *this;} /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline Backup& WithSourceRegion(Aws::String&& value) { SetSourceRegion(std::move(value)); return *this;} /** *

The AWS Region that contains the source backup from which the new backup was * copied.

*/ inline Backup& WithSourceRegion(const char* value) { SetSourceRegion(value); return *this;} /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline const Aws::String& GetSourceBackup() const{ return m_sourceBackup; } /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline bool SourceBackupHasBeenSet() const { return m_sourceBackupHasBeenSet; } /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline void SetSourceBackup(const Aws::String& value) { m_sourceBackupHasBeenSet = true; m_sourceBackup = value; } /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline void SetSourceBackup(Aws::String&& value) { m_sourceBackupHasBeenSet = true; m_sourceBackup = std::move(value); } /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline void SetSourceBackup(const char* value) { m_sourceBackupHasBeenSet = true; m_sourceBackup.assign(value); } /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline Backup& WithSourceBackup(const Aws::String& value) { SetSourceBackup(value); return *this;} /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline Backup& WithSourceBackup(Aws::String&& value) { SetSourceBackup(std::move(value)); return *this;} /** *

The identifier (ID) of the source backup from which the new backup was * copied.

*/ inline Backup& WithSourceBackup(const char* value) { SetSourceBackup(value); return *this;} /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline const Aws::String& GetSourceCluster() const{ return m_sourceCluster; } /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline bool SourceClusterHasBeenSet() const { return m_sourceClusterHasBeenSet; } /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline void SetSourceCluster(const Aws::String& value) { m_sourceClusterHasBeenSet = true; m_sourceCluster = value; } /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline void SetSourceCluster(Aws::String&& value) { m_sourceClusterHasBeenSet = true; m_sourceCluster = std::move(value); } /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline void SetSourceCluster(const char* value) { m_sourceClusterHasBeenSet = true; m_sourceCluster.assign(value); } /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline Backup& WithSourceCluster(const Aws::String& value) { SetSourceCluster(value); return *this;} /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline Backup& WithSourceCluster(Aws::String&& value) { SetSourceCluster(std::move(value)); return *this;} /** *

The identifier (ID) of the cluster containing the source backup from which * the new backup was copied.

*/ inline Backup& WithSourceCluster(const char* value) { SetSourceCluster(value); return *this;} /** *

The date and time when the backup will be permanently deleted.

*/ inline const Aws::Utils::DateTime& GetDeleteTimestamp() const{ return m_deleteTimestamp; } /** *

The date and time when the backup will be permanently deleted.

*/ inline bool DeleteTimestampHasBeenSet() const { return m_deleteTimestampHasBeenSet; } /** *

The date and time when the backup will be permanently deleted.

*/ inline void SetDeleteTimestamp(const Aws::Utils::DateTime& value) { m_deleteTimestampHasBeenSet = true; m_deleteTimestamp = value; } /** *

The date and time when the backup will be permanently deleted.

*/ inline void SetDeleteTimestamp(Aws::Utils::DateTime&& value) { m_deleteTimestampHasBeenSet = true; m_deleteTimestamp = std::move(value); } /** *

The date and time when the backup will be permanently deleted.

*/ inline Backup& WithDeleteTimestamp(const Aws::Utils::DateTime& value) { SetDeleteTimestamp(value); return *this;} /** *

The date and time when the backup will be permanently deleted.

*/ inline Backup& WithDeleteTimestamp(Aws::Utils::DateTime&& value) { SetDeleteTimestamp(std::move(value)); return *this;} /** *

The list of tags for the backup.

*/ inline const Aws::Vector& GetTagList() const{ return m_tagList; } /** *

The list of tags for the backup.

*/ inline bool TagListHasBeenSet() const { return m_tagListHasBeenSet; } /** *

The list of tags for the backup.

*/ inline void SetTagList(const Aws::Vector& value) { m_tagListHasBeenSet = true; m_tagList = value; } /** *

The list of tags for the backup.

*/ inline void SetTagList(Aws::Vector&& value) { m_tagListHasBeenSet = true; m_tagList = std::move(value); } /** *

The list of tags for the backup.

*/ inline Backup& WithTagList(const Aws::Vector& value) { SetTagList(value); return *this;} /** *

The list of tags for the backup.

*/ inline Backup& WithTagList(Aws::Vector&& value) { SetTagList(std::move(value)); return *this;} /** *

The list of tags for the backup.

*/ inline Backup& AddTagList(const Tag& value) { m_tagListHasBeenSet = true; m_tagList.push_back(value); return *this; } /** *

The list of tags for the backup.

*/ inline Backup& AddTagList(Tag&& value) { m_tagListHasBeenSet = true; m_tagList.push_back(std::move(value)); return *this; } private: Aws::String m_backupId; bool m_backupIdHasBeenSet = false; BackupState m_backupState; bool m_backupStateHasBeenSet = false; Aws::String m_clusterId; bool m_clusterIdHasBeenSet = false; Aws::Utils::DateTime m_createTimestamp; bool m_createTimestampHasBeenSet = false; Aws::Utils::DateTime m_copyTimestamp; bool m_copyTimestampHasBeenSet = false; bool m_neverExpires; bool m_neverExpiresHasBeenSet = false; Aws::String m_sourceRegion; bool m_sourceRegionHasBeenSet = false; Aws::String m_sourceBackup; bool m_sourceBackupHasBeenSet = false; Aws::String m_sourceCluster; bool m_sourceClusterHasBeenSet = false; Aws::Utils::DateTime m_deleteTimestamp; bool m_deleteTimestampHasBeenSet = false; Aws::Vector m_tagList; bool m_tagListHasBeenSet = false; }; } // namespace Model } // namespace CloudHSMV2 } // namespace Aws