AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
AccessControlPolicy.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/s3/model/Owner.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:
36 AWS_S3_API AccessControlPolicy();
39
40 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
41
42
44
47 inline const Aws::Vector<Grant>& GetGrants() const{ return m_grants; }
48 inline bool GrantsHasBeenSet() const { return m_grantsHasBeenSet; }
49 inline void SetGrants(const Aws::Vector<Grant>& value) { m_grantsHasBeenSet = true; m_grants = value; }
50 inline void SetGrants(Aws::Vector<Grant>&& value) { m_grantsHasBeenSet = true; m_grants = std::move(value); }
51 inline AccessControlPolicy& WithGrants(const Aws::Vector<Grant>& value) { SetGrants(value); return *this;}
52 inline AccessControlPolicy& WithGrants(Aws::Vector<Grant>&& value) { SetGrants(std::move(value)); return *this;}
53 inline AccessControlPolicy& AddGrants(const Grant& value) { m_grantsHasBeenSet = true; m_grants.push_back(value); return *this; }
54 inline AccessControlPolicy& AddGrants(Grant&& value) { m_grantsHasBeenSet = true; m_grants.push_back(std::move(value)); return *this; }
56
58
61 inline const Owner& GetOwner() const{ return m_owner; }
62 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
63 inline void SetOwner(const Owner& value) { m_ownerHasBeenSet = true; m_owner = value; }
64 inline void SetOwner(Owner&& value) { m_ownerHasBeenSet = true; m_owner = std::move(value); }
65 inline AccessControlPolicy& WithOwner(const Owner& value) { SetOwner(value); return *this;}
66 inline AccessControlPolicy& WithOwner(Owner&& value) { SetOwner(std::move(value)); return *this;}
68 private:
69
70 Aws::Vector<Grant> m_grants;
71 bool m_grantsHasBeenSet = false;
72
73 Owner m_owner;
74 bool m_ownerHasBeenSet = false;
75 };
76
77} // namespace Model
78} // namespace S3
79} // namespace Aws
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