AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
S3Retention.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/s3control/S3Control_EXPORTS.h>
9#include <aws/s3control/model/S3ObjectLockRetentionMode.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace S3Control {
20namespace Model {
21
34 public:
35 AWS_S3CONTROL_API S3Retention() = default;
36 AWS_S3CONTROL_API S3Retention(const Aws::Utils::Xml::XmlNode& xmlNode);
37 AWS_S3CONTROL_API S3Retention& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38
39 AWS_S3CONTROL_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
40
42
46 inline const Aws::Utils::DateTime& GetRetainUntilDate() const { return m_retainUntilDate; }
47 inline bool RetainUntilDateHasBeenSet() const { return m_retainUntilDateHasBeenSet; }
48 template <typename RetainUntilDateT = Aws::Utils::DateTime>
49 void SetRetainUntilDate(RetainUntilDateT&& value) {
50 m_retainUntilDateHasBeenSet = true;
51 m_retainUntilDate = std::forward<RetainUntilDateT>(value);
52 }
53 template <typename RetainUntilDateT = Aws::Utils::DateTime>
54 S3Retention& WithRetainUntilDate(RetainUntilDateT&& value) {
55 SetRetainUntilDate(std::forward<RetainUntilDateT>(value));
56 return *this;
57 }
59
61
65 inline S3ObjectLockRetentionMode GetMode() const { return m_mode; }
66 inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; }
68 m_modeHasBeenSet = true;
69 m_mode = value;
70 }
72 SetMode(value);
73 return *this;
74 }
76 private:
77 Aws::Utils::DateTime m_retainUntilDate{};
78
80 bool m_retainUntilDateHasBeenSet = false;
81 bool m_modeHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace S3Control
86} // namespace Aws
S3ObjectLockRetentionMode GetMode() const
Definition S3Retention.h:65
void SetMode(S3ObjectLockRetentionMode value)
Definition S3Retention.h:67
S3Retention & WithRetainUntilDate(RetainUntilDateT &&value)
Definition S3Retention.h:54
AWS_S3CONTROL_API S3Retention()=default
void SetRetainUntilDate(RetainUntilDateT &&value)
Definition S3Retention.h:49
const Aws::Utils::DateTime & GetRetainUntilDate() const
Definition S3Retention.h:46
AWS_S3CONTROL_API S3Retention(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_S3CONTROL_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
AWS_S3CONTROL_API S3Retention & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
S3Retention & WithMode(S3ObjectLockRetentionMode value)
Definition S3Retention.h:71