AWS SDK for C++

AWS SDK for C++ Version 1.11.695

Loading...
Searching...
No Matches
AccessControlPolicy.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/s3/S3_EXPORTS.h>
9#include <aws/s3/model/Grant.h>
10#include <aws/s3/model/Owner.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace S3 {
21namespace Model {
22
30 public:
31 AWS_S3_API AccessControlPolicy() = default;
34
35 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
36
38
41 inline const Aws::Vector<Grant>& GetGrants() const { return m_grants; }
42 inline bool GrantsHasBeenSet() const { return m_grantsHasBeenSet; }
43 template <typename GrantsT = Aws::Vector<Grant>>
44 void SetGrants(GrantsT&& value) {
45 m_grantsHasBeenSet = true;
46 m_grants = std::forward<GrantsT>(value);
47 }
48 template <typename GrantsT = Aws::Vector<Grant>>
49 AccessControlPolicy& WithGrants(GrantsT&& value) {
50 SetGrants(std::forward<GrantsT>(value));
51 return *this;
52 }
53 template <typename GrantsT = Grant>
54 AccessControlPolicy& AddGrants(GrantsT&& value) {
55 m_grantsHasBeenSet = true;
56 m_grants.emplace_back(std::forward<GrantsT>(value));
57 return *this;
58 }
60
62
65 inline const Owner& GetOwner() const { return m_owner; }
66 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
67 template <typename OwnerT = Owner>
68 void SetOwner(OwnerT&& value) {
69 m_ownerHasBeenSet = true;
70 m_owner = std::forward<OwnerT>(value);
71 }
72 template <typename OwnerT = Owner>
73 AccessControlPolicy& WithOwner(OwnerT&& value) {
74 SetOwner(std::forward<OwnerT>(value));
75 return *this;
76 }
78 private:
79 Aws::Vector<Grant> m_grants;
80 bool m_grantsHasBeenSet = false;
81
82 Owner m_owner;
83 bool m_ownerHasBeenSet = false;
84};
85
86} // namespace Model
87} // namespace S3
88} // namespace Aws
AccessControlPolicy & WithGrants(GrantsT &&value)
AWS_S3_API AccessControlPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
AccessControlPolicy & AddGrants(GrantsT &&value)
AccessControlPolicy & WithOwner(OwnerT &&value)
AWS_S3_API AccessControlPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
AWS_S3_API AccessControlPolicy()=default
const Aws::Vector< Grant > & GetGrants() const
std::vector< T, Aws::Allocator< T > > Vector