/** * 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 Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace S3 { namespace Model { /** *

A Retention configuration for an object.

See Also:

AWS * API Reference

*/ class AWS_S3_API ObjectLockRetention { public: ObjectLockRetention(); ObjectLockRetention(const Aws::Utils::Xml::XmlNode& xmlNode); ObjectLockRetention& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

Indicates the Retention mode for the specified object.

*/ inline const ObjectLockRetentionMode& GetMode() const{ return m_mode; } /** *

Indicates the Retention mode for the specified object.

*/ inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; } /** *

Indicates the Retention mode for the specified object.

*/ inline void SetMode(const ObjectLockRetentionMode& value) { m_modeHasBeenSet = true; m_mode = value; } /** *

Indicates the Retention mode for the specified object.

*/ inline void SetMode(ObjectLockRetentionMode&& value) { m_modeHasBeenSet = true; m_mode = std::move(value); } /** *

Indicates the Retention mode for the specified object.

*/ inline ObjectLockRetention& WithMode(const ObjectLockRetentionMode& value) { SetMode(value); return *this;} /** *

Indicates the Retention mode for the specified object.

*/ inline ObjectLockRetention& WithMode(ObjectLockRetentionMode&& value) { SetMode(std::move(value)); return *this;} /** *

The date on which this Object Lock Retention will expire.

*/ inline const Aws::Utils::DateTime& GetRetainUntilDate() const{ return m_retainUntilDate; } /** *

The date on which this Object Lock Retention will expire.

*/ inline bool RetainUntilDateHasBeenSet() const { return m_retainUntilDateHasBeenSet; } /** *

The date on which this Object Lock Retention will expire.

*/ inline void SetRetainUntilDate(const Aws::Utils::DateTime& value) { m_retainUntilDateHasBeenSet = true; m_retainUntilDate = value; } /** *

The date on which this Object Lock Retention will expire.

*/ inline void SetRetainUntilDate(Aws::Utils::DateTime&& value) { m_retainUntilDateHasBeenSet = true; m_retainUntilDate = std::move(value); } /** *

The date on which this Object Lock Retention will expire.

*/ inline ObjectLockRetention& WithRetainUntilDate(const Aws::Utils::DateTime& value) { SetRetainUntilDate(value); return *this;} /** *

The date on which this Object Lock Retention will expire.

*/ inline ObjectLockRetention& WithRetainUntilDate(Aws::Utils::DateTime&& value) { SetRetainUntilDate(std::move(value)); return *this;} private: ObjectLockRetentionMode m_mode; bool m_modeHasBeenSet; Aws::Utils::DateTime m_retainUntilDate; bool m_retainUntilDateHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws