AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
KmsKeyConfiguration.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/KmsGrantConfiguration.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace AccessAnalyzer {
23namespace Model {
24
42 public:
43 AWS_ACCESSANALYZER_API KmsKeyConfiguration() = default;
44 AWS_ACCESSANALYZER_API KmsKeyConfiguration(Aws::Utils::Json::JsonView jsonValue);
45 AWS_ACCESSANALYZER_API KmsKeyConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
46 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
47
49
55 inline const Aws::Map<Aws::String, Aws::String>& GetKeyPolicies() const { return m_keyPolicies; }
56 inline bool KeyPoliciesHasBeenSet() const { return m_keyPoliciesHasBeenSet; }
57 template <typename KeyPoliciesT = Aws::Map<Aws::String, Aws::String>>
58 void SetKeyPolicies(KeyPoliciesT&& value) {
59 m_keyPoliciesHasBeenSet = true;
60 m_keyPolicies = std::forward<KeyPoliciesT>(value);
61 }
62 template <typename KeyPoliciesT = Aws::Map<Aws::String, Aws::String>>
63 KmsKeyConfiguration& WithKeyPolicies(KeyPoliciesT&& value) {
64 SetKeyPolicies(std::forward<KeyPoliciesT>(value));
65 return *this;
66 }
67 template <typename KeyPoliciesKeyT = Aws::String, typename KeyPoliciesValueT = Aws::String>
68 KmsKeyConfiguration& AddKeyPolicies(KeyPoliciesKeyT&& key, KeyPoliciesValueT&& value) {
69 m_keyPoliciesHasBeenSet = true;
70 m_keyPolicies.emplace(std::forward<KeyPoliciesKeyT>(key), std::forward<KeyPoliciesValueT>(value));
71 return *this;
72 }
74
76
82 inline const Aws::Vector<KmsGrantConfiguration>& GetGrants() const { return m_grants; }
83 inline bool GrantsHasBeenSet() const { return m_grantsHasBeenSet; }
84 template <typename GrantsT = Aws::Vector<KmsGrantConfiguration>>
85 void SetGrants(GrantsT&& value) {
86 m_grantsHasBeenSet = true;
87 m_grants = std::forward<GrantsT>(value);
88 }
89 template <typename GrantsT = Aws::Vector<KmsGrantConfiguration>>
90 KmsKeyConfiguration& WithGrants(GrantsT&& value) {
91 SetGrants(std::forward<GrantsT>(value));
92 return *this;
93 }
94 template <typename GrantsT = KmsGrantConfiguration>
95 KmsKeyConfiguration& AddGrants(GrantsT&& value) {
96 m_grantsHasBeenSet = true;
97 m_grants.emplace_back(std::forward<GrantsT>(value));
98 return *this;
99 }
101 private:
103
105 bool m_keyPoliciesHasBeenSet = false;
106 bool m_grantsHasBeenSet = false;
107};
108
109} // namespace Model
110} // namespace AccessAnalyzer
111} // namespace Aws
const Aws::Vector< KmsGrantConfiguration > & GetGrants() const
KmsKeyConfiguration & WithGrants(GrantsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetKeyPolicies() const
AWS_ACCESSANALYZER_API KmsKeyConfiguration(Aws::Utils::Json::JsonView jsonValue)
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
KmsKeyConfiguration & AddGrants(GrantsT &&value)
KmsKeyConfiguration & AddKeyPolicies(KeyPoliciesKeyT &&key, KeyPoliciesValueT &&value)
AWS_ACCESSANALYZER_API KmsKeyConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_ACCESSANALYZER_API KmsKeyConfiguration()=default
KmsKeyConfiguration & WithKeyPolicies(KeyPoliciesT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue