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

A policy that defines the number of days to retain backups.

See * Also:

AWS * API Reference

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

The type of backup retention policy. For the DAYS type, the * value is the number of days to retain backups.

*/ inline const BackupRetentionType& GetType() const{ return m_type; } /** *

The type of backup retention policy. For the DAYS type, the * value is the number of days to retain backups.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of backup retention policy. For the DAYS type, the * value is the number of days to retain backups.

*/ inline void SetType(const BackupRetentionType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of backup retention policy. For the DAYS type, the * value is the number of days to retain backups.

*/ inline void SetType(BackupRetentionType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of backup retention policy. For the DAYS type, the * value is the number of days to retain backups.

*/ inline BackupRetentionPolicy& WithType(const BackupRetentionType& value) { SetType(value); return *this;} /** *

The type of backup retention policy. For the DAYS type, the * value is the number of days to retain backups.

*/ inline BackupRetentionPolicy& WithType(BackupRetentionType&& value) { SetType(std::move(value)); return *this;} /** *

Use a value between 7 - 379.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

Use a value between 7 - 379.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

Use a value between 7 - 379.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

Use a value between 7 - 379.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

Use a value between 7 - 379.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

Use a value between 7 - 379.

*/ inline BackupRetentionPolicy& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

Use a value between 7 - 379.

*/ inline BackupRetentionPolicy& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

Use a value between 7 - 379.

*/ inline BackupRetentionPolicy& WithValue(const char* value) { SetValue(value); return *this;} private: BackupRetentionType m_type; bool m_typeHasBeenSet = false; Aws::String m_value; bool m_valueHasBeenSet = false; }; } // namespace Model } // namespace CloudHSMV2 } // namespace Aws