AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
Grant.h
1
6#pragma once
7#include <aws/s3/S3_EXPORTS.h>
8#include <aws/s3/model/Grantee.h>
9#include <aws/s3/model/Permission.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Xml
17{
18 class XmlNode;
19} // namespace Xml
20} // namespace Utils
21namespace S3
22{
23namespace Model
24{
25
31 class Grant
32 {
33 public:
34 AWS_S3_API Grant() = default;
35 AWS_S3_API Grant(const Aws::Utils::Xml::XmlNode& xmlNode);
36 AWS_S3_API Grant& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
39
40
42
45 inline const Grantee& GetGrantee() const { return m_grantee; }
46 inline bool GranteeHasBeenSet() const { return m_granteeHasBeenSet; }
47 template<typename GranteeT = Grantee>
48 void SetGrantee(GranteeT&& value) { m_granteeHasBeenSet = true; m_grantee = std::forward<GranteeT>(value); }
49 template<typename GranteeT = Grantee>
50 Grant& WithGrantee(GranteeT&& value) { SetGrantee(std::forward<GranteeT>(value)); return *this;}
52
54
57 inline Permission GetPermission() const { return m_permission; }
58 inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; }
59 inline void SetPermission(Permission value) { m_permissionHasBeenSet = true; m_permission = value; }
60 inline Grant& WithPermission(Permission value) { SetPermission(value); return *this;}
62 private:
63
64 Grantee m_grantee;
65 bool m_granteeHasBeenSet = false;
66
67 Permission m_permission{Permission::NOT_SET};
68 bool m_permissionHasBeenSet = false;
69 };
70
71} // namespace Model
72} // namespace S3
73} // namespace Aws
bool PermissionHasBeenSet() const
Definition Grant.h:58
Grant & WithGrantee(GranteeT &&value)
Definition Grant.h:50
bool GranteeHasBeenSet() const
Definition Grant.h:46
Grant & WithPermission(Permission value)
Definition Grant.h:60
AWS_S3_API Grant()=default
AWS_S3_API Grant(const Aws::Utils::Xml::XmlNode &xmlNode)
Permission GetPermission() const
Definition Grant.h:57
void SetGrantee(GranteeT &&value)
Definition Grant.h:48
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
AWS_S3_API Grant & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetPermission(Permission value)
Definition Grant.h:59
const Grantee & GetGrantee() const
Definition Grant.h:45