AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
KmsGrantConfiguration.h
1
6#pragma once
7#include <aws/accessanalyzer/AccessAnalyzer_EXPORTS.h>
8#include <aws/accessanalyzer/model/KmsGrantConstraints.h>
9#include <aws/accessanalyzer/model/KmsGrantOperation.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
33 public:
34 AWS_ACCESSANALYZER_API KmsGrantConfiguration() = default;
35 AWS_ACCESSANALYZER_API KmsGrantConfiguration(Aws::Utils::Json::JsonView jsonValue);
37 AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::Vector<KmsGrantOperation>& GetOperations() const { return m_operations; }
44 inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; }
45 template <typename OperationsT = Aws::Vector<KmsGrantOperation>>
46 void SetOperations(OperationsT&& value) {
47 m_operationsHasBeenSet = true;
48 m_operations = std::forward<OperationsT>(value);
49 }
50 template <typename OperationsT = Aws::Vector<KmsGrantOperation>>
51 KmsGrantConfiguration& WithOperations(OperationsT&& value) {
52 SetOperations(std::forward<OperationsT>(value));
53 return *this;
54 }
56 m_operationsHasBeenSet = true;
57 m_operations.push_back(value);
58 return *this;
59 }
61
63
67 inline const Aws::String& GetGranteePrincipal() const { return m_granteePrincipal; }
68 inline bool GranteePrincipalHasBeenSet() const { return m_granteePrincipalHasBeenSet; }
69 template <typename GranteePrincipalT = Aws::String>
70 void SetGranteePrincipal(GranteePrincipalT&& value) {
71 m_granteePrincipalHasBeenSet = true;
72 m_granteePrincipal = std::forward<GranteePrincipalT>(value);
73 }
74 template <typename GranteePrincipalT = Aws::String>
75 KmsGrantConfiguration& WithGranteePrincipal(GranteePrincipalT&& value) {
76 SetGranteePrincipal(std::forward<GranteePrincipalT>(value));
77 return *this;
78 }
80
82
87 inline const Aws::String& GetRetiringPrincipal() const { return m_retiringPrincipal; }
88 inline bool RetiringPrincipalHasBeenSet() const { return m_retiringPrincipalHasBeenSet; }
89 template <typename RetiringPrincipalT = Aws::String>
90 void SetRetiringPrincipal(RetiringPrincipalT&& value) {
91 m_retiringPrincipalHasBeenSet = true;
92 m_retiringPrincipal = std::forward<RetiringPrincipalT>(value);
93 }
94 template <typename RetiringPrincipalT = Aws::String>
95 KmsGrantConfiguration& WithRetiringPrincipal(RetiringPrincipalT&& value) {
96 SetRetiringPrincipal(std::forward<RetiringPrincipalT>(value));
97 return *this;
98 }
100
102
110 inline const KmsGrantConstraints& GetConstraints() const { return m_constraints; }
111 inline bool ConstraintsHasBeenSet() const { return m_constraintsHasBeenSet; }
112 template <typename ConstraintsT = KmsGrantConstraints>
113 void SetConstraints(ConstraintsT&& value) {
114 m_constraintsHasBeenSet = true;
115 m_constraints = std::forward<ConstraintsT>(value);
116 }
117 template <typename ConstraintsT = KmsGrantConstraints>
118 KmsGrantConfiguration& WithConstraints(ConstraintsT&& value) {
119 SetConstraints(std::forward<ConstraintsT>(value));
120 return *this;
121 }
123
125
130 inline const Aws::String& GetIssuingAccount() const { return m_issuingAccount; }
131 inline bool IssuingAccountHasBeenSet() const { return m_issuingAccountHasBeenSet; }
132 template <typename IssuingAccountT = Aws::String>
133 void SetIssuingAccount(IssuingAccountT&& value) {
134 m_issuingAccountHasBeenSet = true;
135 m_issuingAccount = std::forward<IssuingAccountT>(value);
136 }
137 template <typename IssuingAccountT = Aws::String>
138 KmsGrantConfiguration& WithIssuingAccount(IssuingAccountT&& value) {
139 SetIssuingAccount(std::forward<IssuingAccountT>(value));
140 return *this;
141 }
143 private:
145
146 Aws::String m_granteePrincipal;
147
148 Aws::String m_retiringPrincipal;
149
150 KmsGrantConstraints m_constraints;
151
152 Aws::String m_issuingAccount;
153 bool m_operationsHasBeenSet = false;
154 bool m_granteePrincipalHasBeenSet = false;
155 bool m_retiringPrincipalHasBeenSet = false;
156 bool m_constraintsHasBeenSet = false;
157 bool m_issuingAccountHasBeenSet = false;
158};
159
160} // namespace Model
161} // namespace AccessAnalyzer
162} // namespace Aws
AWS_ACCESSANALYZER_API KmsGrantConfiguration()=default
KmsGrantConfiguration & WithGranteePrincipal(GranteePrincipalT &&value)
const Aws::Vector< KmsGrantOperation > & GetOperations() const
AWS_ACCESSANALYZER_API Aws::Utils::Json::JsonValue Jsonize() const
KmsGrantConfiguration & AddOperations(KmsGrantOperation value)
KmsGrantConfiguration & WithRetiringPrincipal(RetiringPrincipalT &&value)
AWS_ACCESSANALYZER_API KmsGrantConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
KmsGrantConfiguration & WithIssuingAccount(IssuingAccountT &&value)
KmsGrantConfiguration & WithConstraints(ConstraintsT &&value)
KmsGrantConfiguration & WithOperations(OperationsT &&value)
AWS_ACCESSANALYZER_API KmsGrantConfiguration(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue