AWS SDK for C++

AWS SDK for C++ Version 1.11.921

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/S3ObjectLockRetentionEventHold.h>
10#include <aws/s3control/model/S3ObjectLockRetentionEventHoldDuration.h>
11#include <aws/s3control/model/S3ObjectLockRetentionMode.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Xml {
18class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace S3Control {
22namespace Model {
23
36 public:
37 AWS_S3CONTROL_API S3Retention() = default;
38 AWS_S3CONTROL_API S3Retention(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_S3CONTROL_API S3Retention& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_S3CONTROL_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
42
44
48 inline const Aws::Utils::DateTime& GetRetainUntilDate() const { return m_retainUntilDate; }
49 inline bool RetainUntilDateHasBeenSet() const { return m_retainUntilDateHasBeenSet; }
50 template <typename RetainUntilDateT = Aws::Utils::DateTime>
51 void SetRetainUntilDate(RetainUntilDateT&& value) {
52 m_retainUntilDateHasBeenSet = true;
53 m_retainUntilDate = std::forward<RetainUntilDateT>(value);
54 }
55 template <typename RetainUntilDateT = Aws::Utils::DateTime>
56 S3Retention& WithRetainUntilDate(RetainUntilDateT&& value) {
57 SetRetainUntilDate(std::forward<RetainUntilDateT>(value));
58 return *this;
59 }
61
63
67 inline S3ObjectLockRetentionMode GetMode() const { return m_mode; }
68 inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; }
70 m_modeHasBeenSet = true;
71 m_mode = value;
72 }
74 SetMode(value);
75 return *this;
76 }
78
80
85 inline S3ObjectLockRetentionEventHold GetEventHold() const { return m_eventHold; }
86 inline bool EventHoldHasBeenSet() const { return m_eventHoldHasBeenSet; }
88 m_eventHoldHasBeenSet = true;
89 m_eventHold = value;
90 }
92 SetEventHold(value);
93 return *this;
94 }
96
98
103 inline const S3ObjectLockRetentionEventHoldDuration& GetEventHoldDuration() const { return m_eventHoldDuration; }
104 inline bool EventHoldDurationHasBeenSet() const { return m_eventHoldDurationHasBeenSet; }
105 template <typename EventHoldDurationT = S3ObjectLockRetentionEventHoldDuration>
106 void SetEventHoldDuration(EventHoldDurationT&& value) {
107 m_eventHoldDurationHasBeenSet = true;
108 m_eventHoldDuration = std::forward<EventHoldDurationT>(value);
109 }
110 template <typename EventHoldDurationT = S3ObjectLockRetentionEventHoldDuration>
111 S3Retention& WithEventHoldDuration(EventHoldDurationT&& value) {
112 SetEventHoldDuration(std::forward<EventHoldDurationT>(value));
113 return *this;
114 }
116 private:
117 Aws::Utils::DateTime m_retainUntilDate{};
118
120
122
123 S3ObjectLockRetentionEventHoldDuration m_eventHoldDuration;
124 bool m_retainUntilDateHasBeenSet = false;
125 bool m_modeHasBeenSet = false;
126 bool m_eventHoldHasBeenSet = false;
127 bool m_eventHoldDurationHasBeenSet = false;
128};
129
130} // namespace Model
131} // namespace S3Control
132} // namespace Aws
const S3ObjectLockRetentionEventHoldDuration & GetEventHoldDuration() const
S3ObjectLockRetentionMode GetMode() const
Definition S3Retention.h:67
void SetEventHold(S3ObjectLockRetentionEventHold value)
Definition S3Retention.h:87
S3ObjectLockRetentionEventHold GetEventHold() const
Definition S3Retention.h:85
void SetMode(S3ObjectLockRetentionMode value)
Definition S3Retention.h:69
S3Retention & WithRetainUntilDate(RetainUntilDateT &&value)
Definition S3Retention.h:56
void SetEventHoldDuration(EventHoldDurationT &&value)
AWS_S3CONTROL_API S3Retention()=default
void SetRetainUntilDate(RetainUntilDateT &&value)
Definition S3Retention.h:51
S3Retention & WithEventHold(S3ObjectLockRetentionEventHold value)
Definition S3Retention.h:91
const Aws::Utils::DateTime & GetRetainUntilDate() const
Definition S3Retention.h:48
AWS_S3CONTROL_API S3Retention(const Aws::Utils::Xml::XmlNode &xmlNode)
S3Retention & WithEventHoldDuration(EventHoldDurationT &&value)
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:73