AWS SDK for C++

AWS SDK for C++ Version 1.11.812

Loading...
Searching...
No Matches
GrantConstraints.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/kms/KMS_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace KMS {
21namespace Model {
22
60 public:
61 AWS_KMS_API GrantConstraints() = default;
65
67
75 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContextSubset() const { return m_encryptionContextSubset; }
76 inline bool EncryptionContextSubsetHasBeenSet() const { return m_encryptionContextSubsetHasBeenSet; }
77 template <typename EncryptionContextSubsetT = Aws::Map<Aws::String, Aws::String>>
78 void SetEncryptionContextSubset(EncryptionContextSubsetT&& value) {
79 m_encryptionContextSubsetHasBeenSet = true;
80 m_encryptionContextSubset = std::forward<EncryptionContextSubsetT>(value);
81 }
82 template <typename EncryptionContextSubsetT = Aws::Map<Aws::String, Aws::String>>
83 GrantConstraints& WithEncryptionContextSubset(EncryptionContextSubsetT&& value) {
84 SetEncryptionContextSubset(std::forward<EncryptionContextSubsetT>(value));
85 return *this;
86 }
87 template <typename EncryptionContextSubsetKeyT = Aws::String, typename EncryptionContextSubsetValueT = Aws::String>
88 GrantConstraints& AddEncryptionContextSubset(EncryptionContextSubsetKeyT&& key, EncryptionContextSubsetValueT&& value) {
89 m_encryptionContextSubsetHasBeenSet = true;
90 m_encryptionContextSubset.emplace(std::forward<EncryptionContextSubsetKeyT>(key), std::forward<EncryptionContextSubsetValueT>(value));
91 return *this;
92 }
94
96
103 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContextEquals() const { return m_encryptionContextEquals; }
104 inline bool EncryptionContextEqualsHasBeenSet() const { return m_encryptionContextEqualsHasBeenSet; }
105 template <typename EncryptionContextEqualsT = Aws::Map<Aws::String, Aws::String>>
106 void SetEncryptionContextEquals(EncryptionContextEqualsT&& value) {
107 m_encryptionContextEqualsHasBeenSet = true;
108 m_encryptionContextEquals = std::forward<EncryptionContextEqualsT>(value);
109 }
110 template <typename EncryptionContextEqualsT = Aws::Map<Aws::String, Aws::String>>
111 GrantConstraints& WithEncryptionContextEquals(EncryptionContextEqualsT&& value) {
112 SetEncryptionContextEquals(std::forward<EncryptionContextEqualsT>(value));
113 return *this;
114 }
115 template <typename EncryptionContextEqualsKeyT = Aws::String, typename EncryptionContextEqualsValueT = Aws::String>
116 GrantConstraints& AddEncryptionContextEquals(EncryptionContextEqualsKeyT&& key, EncryptionContextEqualsValueT&& value) {
117 m_encryptionContextEqualsHasBeenSet = true;
118 m_encryptionContextEquals.emplace(std::forward<EncryptionContextEqualsKeyT>(key), std::forward<EncryptionContextEqualsValueT>(value));
119 return *this;
120 }
122
124
134 inline const Aws::String& GetSourceArn() const { return m_sourceArn; }
135 inline bool SourceArnHasBeenSet() const { return m_sourceArnHasBeenSet; }
136 template <typename SourceArnT = Aws::String>
137 void SetSourceArn(SourceArnT&& value) {
138 m_sourceArnHasBeenSet = true;
139 m_sourceArn = std::forward<SourceArnT>(value);
140 }
141 template <typename SourceArnT = Aws::String>
142 GrantConstraints& WithSourceArn(SourceArnT&& value) {
143 SetSourceArn(std::forward<SourceArnT>(value));
144 return *this;
145 }
147 private:
148 Aws::Map<Aws::String, Aws::String> m_encryptionContextSubset;
149
150 Aws::Map<Aws::String, Aws::String> m_encryptionContextEquals;
151
152 Aws::String m_sourceArn;
153 bool m_encryptionContextSubsetHasBeenSet = false;
154 bool m_encryptionContextEqualsHasBeenSet = false;
155 bool m_sourceArnHasBeenSet = false;
156};
157
158} // namespace Model
159} // namespace KMS
160} // namespace Aws
GrantConstraints & WithEncryptionContextSubset(EncryptionContextSubsetT &&value)
GrantConstraints & AddEncryptionContextSubset(EncryptionContextSubsetKeyT &&key, EncryptionContextSubsetValueT &&value)
AWS_KMS_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_KMS_API GrantConstraints(Aws::Utils::Json::JsonView jsonValue)
AWS_KMS_API GrantConstraints()=default
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContextSubset() const
AWS_KMS_API GrantConstraints & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContextEquals() const
const Aws::String & GetSourceArn() const
GrantConstraints & WithSourceArn(SourceArnT &&value)
void SetEncryptionContextEquals(EncryptionContextEqualsT &&value)
GrantConstraints & AddEncryptionContextEquals(EncryptionContextEqualsKeyT &&key, EncryptionContextEqualsValueT &&value)
void SetEncryptionContextSubset(EncryptionContextSubsetT &&value)
GrantConstraints & WithEncryptionContextEquals(EncryptionContextEqualsT &&value)
void SetSourceArn(SourceArnT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue