AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
X509Attributes.h
1
6#pragma once
7#include <aws/acm/ACM_EXPORTS.h>
8#include <aws/acm/model/DistinguishedName.h>
9#include <aws/acm/model/ExtendedKeyUsageName.h>
10#include <aws/acm/model/GeneralName.h>
11#include <aws/acm/model/KeyAlgorithm.h>
12#include <aws/acm/model/KeyUsageName.h>
13#include <aws/core/utils/DateTime.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace ACM {
27namespace Model {
28
36 public:
37 AWS_ACM_API X509Attributes() = default;
41
43
46 inline const DistinguishedName& GetIssuer() const { return m_issuer; }
47 inline bool IssuerHasBeenSet() const { return m_issuerHasBeenSet; }
48 template <typename IssuerT = DistinguishedName>
49 void SetIssuer(IssuerT&& value) {
50 m_issuerHasBeenSet = true;
51 m_issuer = std::forward<IssuerT>(value);
52 }
53 template <typename IssuerT = DistinguishedName>
54 X509Attributes& WithIssuer(IssuerT&& value) {
55 SetIssuer(std::forward<IssuerT>(value));
56 return *this;
57 }
59
61
64 inline const DistinguishedName& GetSubject() const { return m_subject; }
65 inline bool SubjectHasBeenSet() const { return m_subjectHasBeenSet; }
66 template <typename SubjectT = DistinguishedName>
67 void SetSubject(SubjectT&& value) {
68 m_subjectHasBeenSet = true;
69 m_subject = std::forward<SubjectT>(value);
70 }
71 template <typename SubjectT = DistinguishedName>
72 X509Attributes& WithSubject(SubjectT&& value) {
73 SetSubject(std::forward<SubjectT>(value));
74 return *this;
75 }
77
79
86 inline const Aws::Vector<GeneralName>& GetSubjectAlternativeNames() const { return m_subjectAlternativeNames; }
87 inline bool SubjectAlternativeNamesHasBeenSet() const { return m_subjectAlternativeNamesHasBeenSet; }
88 template <typename SubjectAlternativeNamesT = Aws::Vector<GeneralName>>
89 void SetSubjectAlternativeNames(SubjectAlternativeNamesT&& value) {
90 m_subjectAlternativeNamesHasBeenSet = true;
91 m_subjectAlternativeNames = std::forward<SubjectAlternativeNamesT>(value);
92 }
93 template <typename SubjectAlternativeNamesT = Aws::Vector<GeneralName>>
94 X509Attributes& WithSubjectAlternativeNames(SubjectAlternativeNamesT&& value) {
95 SetSubjectAlternativeNames(std::forward<SubjectAlternativeNamesT>(value));
96 return *this;
97 }
98 template <typename SubjectAlternativeNamesT = GeneralName>
99 X509Attributes& AddSubjectAlternativeNames(SubjectAlternativeNamesT&& value) {
100 m_subjectAlternativeNamesHasBeenSet = true;
101 m_subjectAlternativeNames.emplace_back(std::forward<SubjectAlternativeNamesT>(value));
102 return *this;
103 }
105
107
112 inline const Aws::Vector<ExtendedKeyUsageName>& GetExtendedKeyUsages() const { return m_extendedKeyUsages; }
113 inline bool ExtendedKeyUsagesHasBeenSet() const { return m_extendedKeyUsagesHasBeenSet; }
114 template <typename ExtendedKeyUsagesT = Aws::Vector<ExtendedKeyUsageName>>
115 void SetExtendedKeyUsages(ExtendedKeyUsagesT&& value) {
116 m_extendedKeyUsagesHasBeenSet = true;
117 m_extendedKeyUsages = std::forward<ExtendedKeyUsagesT>(value);
118 }
119 template <typename ExtendedKeyUsagesT = Aws::Vector<ExtendedKeyUsageName>>
120 X509Attributes& WithExtendedKeyUsages(ExtendedKeyUsagesT&& value) {
121 SetExtendedKeyUsages(std::forward<ExtendedKeyUsagesT>(value));
122 return *this;
123 }
125 m_extendedKeyUsagesHasBeenSet = true;
126 m_extendedKeyUsages.push_back(value);
127 return *this;
128 }
130
132
135 inline KeyAlgorithm GetKeyAlgorithm() const { return m_keyAlgorithm; }
136 inline bool KeyAlgorithmHasBeenSet() const { return m_keyAlgorithmHasBeenSet; }
137 inline void SetKeyAlgorithm(KeyAlgorithm value) {
138 m_keyAlgorithmHasBeenSet = true;
139 m_keyAlgorithm = value;
140 }
142 SetKeyAlgorithm(value);
143 return *this;
144 }
146
148
154 inline const Aws::Vector<KeyUsageName>& GetKeyUsages() const { return m_keyUsages; }
155 inline bool KeyUsagesHasBeenSet() const { return m_keyUsagesHasBeenSet; }
156 template <typename KeyUsagesT = Aws::Vector<KeyUsageName>>
157 void SetKeyUsages(KeyUsagesT&& value) {
158 m_keyUsagesHasBeenSet = true;
159 m_keyUsages = std::forward<KeyUsagesT>(value);
160 }
161 template <typename KeyUsagesT = Aws::Vector<KeyUsageName>>
162 X509Attributes& WithKeyUsages(KeyUsagesT&& value) {
163 SetKeyUsages(std::forward<KeyUsagesT>(value));
164 return *this;
165 }
167 m_keyUsagesHasBeenSet = true;
168 m_keyUsages.push_back(value);
169 return *this;
170 }
172
174
177 inline const Aws::String& GetSerialNumber() const { return m_serialNumber; }
178 inline bool SerialNumberHasBeenSet() const { return m_serialNumberHasBeenSet; }
179 template <typename SerialNumberT = Aws::String>
180 void SetSerialNumber(SerialNumberT&& value) {
181 m_serialNumberHasBeenSet = true;
182 m_serialNumber = std::forward<SerialNumberT>(value);
183 }
184 template <typename SerialNumberT = Aws::String>
185 X509Attributes& WithSerialNumber(SerialNumberT&& value) {
186 SetSerialNumber(std::forward<SerialNumberT>(value));
187 return *this;
188 }
190
192
195 inline const Aws::Utils::DateTime& GetNotAfter() const { return m_notAfter; }
196 inline bool NotAfterHasBeenSet() const { return m_notAfterHasBeenSet; }
197 template <typename NotAfterT = Aws::Utils::DateTime>
198 void SetNotAfter(NotAfterT&& value) {
199 m_notAfterHasBeenSet = true;
200 m_notAfter = std::forward<NotAfterT>(value);
201 }
202 template <typename NotAfterT = Aws::Utils::DateTime>
203 X509Attributes& WithNotAfter(NotAfterT&& value) {
204 SetNotAfter(std::forward<NotAfterT>(value));
205 return *this;
206 }
208
210
213 inline const Aws::Utils::DateTime& GetNotBefore() const { return m_notBefore; }
214 inline bool NotBeforeHasBeenSet() const { return m_notBeforeHasBeenSet; }
215 template <typename NotBeforeT = Aws::Utils::DateTime>
216 void SetNotBefore(NotBeforeT&& value) {
217 m_notBeforeHasBeenSet = true;
218 m_notBefore = std::forward<NotBeforeT>(value);
219 }
220 template <typename NotBeforeT = Aws::Utils::DateTime>
221 X509Attributes& WithNotBefore(NotBeforeT&& value) {
222 SetNotBefore(std::forward<NotBeforeT>(value));
223 return *this;
224 }
226 private:
227 DistinguishedName m_issuer;
228
229 DistinguishedName m_subject;
230
231 Aws::Vector<GeneralName> m_subjectAlternativeNames;
232
233 Aws::Vector<ExtendedKeyUsageName> m_extendedKeyUsages;
234
235 KeyAlgorithm m_keyAlgorithm{KeyAlgorithm::NOT_SET};
236
237 Aws::Vector<KeyUsageName> m_keyUsages;
238
239 Aws::String m_serialNumber;
240
241 Aws::Utils::DateTime m_notAfter{};
242
243 Aws::Utils::DateTime m_notBefore{};
244 bool m_issuerHasBeenSet = false;
245 bool m_subjectHasBeenSet = false;
246 bool m_subjectAlternativeNamesHasBeenSet = false;
247 bool m_extendedKeyUsagesHasBeenSet = false;
248 bool m_keyAlgorithmHasBeenSet = false;
249 bool m_keyUsagesHasBeenSet = false;
250 bool m_serialNumberHasBeenSet = false;
251 bool m_notAfterHasBeenSet = false;
252 bool m_notBeforeHasBeenSet = false;
253};
254
255} // namespace Model
256} // namespace ACM
257} // namespace Aws
AWS_ACM_API X509Attributes(Aws::Utils::Json::JsonView jsonValue)
void SetIssuer(IssuerT &&value)
X509Attributes & WithExtendedKeyUsages(ExtendedKeyUsagesT &&value)
X509Attributes & WithKeyAlgorithm(KeyAlgorithm value)
X509Attributes & WithNotBefore(NotBeforeT &&value)
const Aws::Vector< ExtendedKeyUsageName > & GetExtendedKeyUsages() const
AWS_ACM_API X509Attributes()=default
const Aws::Utils::DateTime & GetNotBefore() const
void SetKeyAlgorithm(KeyAlgorithm value)
X509Attributes & WithSubjectAlternativeNames(SubjectAlternativeNamesT &&value)
const DistinguishedName & GetIssuer() const
const Aws::String & GetSerialNumber() const
void SetNotAfter(NotAfterT &&value)
X509Attributes & AddSubjectAlternativeNames(SubjectAlternativeNamesT &&value)
KeyAlgorithm GetKeyAlgorithm() const
const Aws::Utils::DateTime & GetNotAfter() const
X509Attributes & WithSubject(SubjectT &&value)
void SetSerialNumber(SerialNumberT &&value)
X509Attributes & WithNotAfter(NotAfterT &&value)
bool SubjectAlternativeNamesHasBeenSet() const
const DistinguishedName & GetSubject() const
X509Attributes & AddExtendedKeyUsages(ExtendedKeyUsageName value)
AWS_ACM_API X509Attributes & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< GeneralName > & GetSubjectAlternativeNames() const
const Aws::Vector< KeyUsageName > & GetKeyUsages() const
void SetSubjectAlternativeNames(SubjectAlternativeNamesT &&value)
void SetNotBefore(NotBeforeT &&value)
void SetSubject(SubjectT &&value)
X509Attributes & WithIssuer(IssuerT &&value)
void SetExtendedKeyUsages(ExtendedKeyUsagesT &&value)
AWS_ACM_API Aws::Utils::Json::JsonValue Jsonize() const
X509Attributes & WithSerialNumber(SerialNumberT &&value)
X509Attributes & AddKeyUsages(KeyUsageName value)
void SetKeyUsages(KeyUsagesT &&value)
X509Attributes & WithKeyUsages(KeyUsagesT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue