AWS SDK for C++

AWS SDK for C++ Version 1.11.718

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
51 public:
52 AWS_KMS_API GrantConstraints() = default;
56
58
66 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContextSubset() const { return m_encryptionContextSubset; }
67 inline bool EncryptionContextSubsetHasBeenSet() const { return m_encryptionContextSubsetHasBeenSet; }
68 template <typename EncryptionContextSubsetT = Aws::Map<Aws::String, Aws::String>>
69 void SetEncryptionContextSubset(EncryptionContextSubsetT&& value) {
70 m_encryptionContextSubsetHasBeenSet = true;
71 m_encryptionContextSubset = std::forward<EncryptionContextSubsetT>(value);
72 }
73 template <typename EncryptionContextSubsetT = Aws::Map<Aws::String, Aws::String>>
74 GrantConstraints& WithEncryptionContextSubset(EncryptionContextSubsetT&& value) {
75 SetEncryptionContextSubset(std::forward<EncryptionContextSubsetT>(value));
76 return *this;
77 }
78 template <typename EncryptionContextSubsetKeyT = Aws::String, typename EncryptionContextSubsetValueT = Aws::String>
79 GrantConstraints& AddEncryptionContextSubset(EncryptionContextSubsetKeyT&& key, EncryptionContextSubsetValueT&& value) {
80 m_encryptionContextSubsetHasBeenSet = true;
81 m_encryptionContextSubset.emplace(std::forward<EncryptionContextSubsetKeyT>(key), std::forward<EncryptionContextSubsetValueT>(value));
82 return *this;
83 }
85
87
94 inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContextEquals() const { return m_encryptionContextEquals; }
95 inline bool EncryptionContextEqualsHasBeenSet() const { return m_encryptionContextEqualsHasBeenSet; }
96 template <typename EncryptionContextEqualsT = Aws::Map<Aws::String, Aws::String>>
97 void SetEncryptionContextEquals(EncryptionContextEqualsT&& value) {
98 m_encryptionContextEqualsHasBeenSet = true;
99 m_encryptionContextEquals = std::forward<EncryptionContextEqualsT>(value);
100 }
101 template <typename EncryptionContextEqualsT = Aws::Map<Aws::String, Aws::String>>
102 GrantConstraints& WithEncryptionContextEquals(EncryptionContextEqualsT&& value) {
103 SetEncryptionContextEquals(std::forward<EncryptionContextEqualsT>(value));
104 return *this;
105 }
106 template <typename EncryptionContextEqualsKeyT = Aws::String, typename EncryptionContextEqualsValueT = Aws::String>
107 GrantConstraints& AddEncryptionContextEquals(EncryptionContextEqualsKeyT&& key, EncryptionContextEqualsValueT&& value) {
108 m_encryptionContextEqualsHasBeenSet = true;
109 m_encryptionContextEquals.emplace(std::forward<EncryptionContextEqualsKeyT>(key), std::forward<EncryptionContextEqualsValueT>(value));
110 return *this;
111 }
113 private:
114 Aws::Map<Aws::String, Aws::String> m_encryptionContextSubset;
115
116 Aws::Map<Aws::String, Aws::String> m_encryptionContextEquals;
117 bool m_encryptionContextSubsetHasBeenSet = false;
118 bool m_encryptionContextEqualsHasBeenSet = false;
119};
120
121} // namespace Model
122} // namespace KMS
123} // 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
void SetEncryptionContextEquals(EncryptionContextEqualsT &&value)
GrantConstraints & AddEncryptionContextEquals(EncryptionContextEqualsKeyT &&key, EncryptionContextEqualsValueT &&value)
void SetEncryptionContextSubset(EncryptionContextSubsetT &&value)
GrantConstraints & WithEncryptionContextEquals(EncryptionContextEqualsT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue