AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
AccessControlPolicy.h
Go to the documentation of this file.
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
10#include <aws/s3/model/Grant.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Xml
18{
19 class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace S3
23{
24namespace Model
25{
26
34 {
35 public:
39
41
42
46 inline const Aws::Vector<Grant>& GetGrants() const{ return m_grants; }
47
51 inline bool GrantsHasBeenSet() const { return m_grantsHasBeenSet; }
52
56 inline void SetGrants(const Aws::Vector<Grant>& value) { m_grantsHasBeenSet = true; m_grants = value; }
57
61 inline void SetGrants(Aws::Vector<Grant>&& value) { m_grantsHasBeenSet = true; m_grants = std::move(value); }
62
66 inline AccessControlPolicy& WithGrants(const Aws::Vector<Grant>& value) { SetGrants(value); return *this;}
67
71 inline AccessControlPolicy& WithGrants(Aws::Vector<Grant>&& value) { SetGrants(std::move(value)); return *this;}
72
76 inline AccessControlPolicy& AddGrants(const Grant& value) { m_grantsHasBeenSet = true; m_grants.push_back(value); return *this; }
77
81 inline AccessControlPolicy& AddGrants(Grant&& value) { m_grantsHasBeenSet = true; m_grants.push_back(std::move(value)); return *this; }
82
83
87 inline const Owner& GetOwner() const{ return m_owner; }
88
92 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
93
97 inline void SetOwner(const Owner& value) { m_ownerHasBeenSet = true; m_owner = value; }
98
102 inline void SetOwner(Owner&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); }
103
107 inline AccessControlPolicy& WithOwner(const Owner& value) { SetOwner(value); return *this;}
108
112 inline AccessControlPolicy& WithOwner(Owner&& value) { SetOwner(std::move(value)); return *this;}
113
114 private:
115
116 Aws::Vector<Grant> m_grants;
117 bool m_grantsHasBeenSet = false;
118
119 Owner m_owner;
120 bool m_ownerHasBeenSet = false;
121 };
122
123} // namespace Model
124} // namespace S3
125} // namespace Aws
#define AWS_S3_API
Definition: S3_EXPORTS.h:28
void SetGrants(Aws::Vector< Grant > &&value)
AccessControlPolicy & AddGrants(Grant &&value)
AccessControlPolicy & WithGrants(Aws::Vector< Grant > &&value)
AWS_S3_API AccessControlPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
AccessControlPolicy & WithOwner(Owner &&value)
AWS_S3_API AccessControlPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AccessControlPolicy & AddGrants(const Grant &value)
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
void SetGrants(const Aws::Vector< Grant > &value)
const Aws::Vector< Grant > & GetGrants() const
AccessControlPolicy & WithGrants(const Aws::Vector< Grant > &value)
AccessControlPolicy & WithOwner(const Owner &value)
std::vector< T, Aws::Allocator< T > > Vector