AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Xml {
16class XmlNode;
17} // namespace Xml
18} // namespace Utils
19namespace S3 {
20namespace Model {
21
27class Grant {
28 public:
29 AWS_S3_API Grant() = default;
30 AWS_S3_API Grant(const Aws::Utils::Xml::XmlNode& xmlNode);
31 AWS_S3_API Grant& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
32
33 AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
34
36
39 inline const Grantee& GetGrantee() const { return m_grantee; }
40 inline bool GranteeHasBeenSet() const { return m_granteeHasBeenSet; }
41 template <typename GranteeT = Grantee>
42 void SetGrantee(GranteeT&& value) {
43 m_granteeHasBeenSet = true;
44 m_grantee = std::forward<GranteeT>(value);
45 }
46 template <typename GranteeT = Grantee>
47 Grant& WithGrantee(GranteeT&& value) {
48 SetGrantee(std::forward<GranteeT>(value));
49 return *this;
50 }
52
54
57 inline Permission GetPermission() const { return m_permission; }
58 inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; }
59 inline void SetPermission(Permission value) {
60 m_permissionHasBeenSet = true;
61 m_permission = value;
62 }
64 SetPermission(value);
65 return *this;
66 }
68 private:
69 Grantee m_grantee;
70
71 Permission m_permission{Permission::NOT_SET};
72 bool m_granteeHasBeenSet = false;
73 bool m_permissionHasBeenSet = false;
74};
75
76} // namespace Model
77} // namespace S3
78} // namespace Aws
bool PermissionHasBeenSet() const
Definition Grant.h:58
Grant & WithGrantee(GranteeT &&value)
Definition Grant.h:47
bool GranteeHasBeenSet() const
Definition Grant.h:40
Grant & WithPermission(Permission value)
Definition Grant.h:63
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:42
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:39