1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/iam/IAM_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/core/utils/DateTime.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace IAM
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Contains information about a server certificate without its certificate body,
29    * certificate chain, and private key.</p> <p> This data type is used as a response
30    * element in the <a>UploadServerCertificate</a> and <a>ListServerCertificates</a>
31    * operations. </p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/ServerCertificateMetadata">AWS
33    * API Reference</a></p>
34    */
35   class AWS_IAM_API ServerCertificateMetadata
36   {
37   public:
38     ServerCertificateMetadata();
39     ServerCertificateMetadata(const Aws::Utils::Xml::XmlNode& xmlNode);
40     ServerCertificateMetadata& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
41 
42     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
43     void OutputToStream(Aws::OStream& oStream, const char* location) const;
44 
45 
46     /**
47      * <p> The path to the server certificate. For more information about paths, see <a
48      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
49      * identifiers</a> in the <i>IAM User Guide</i>. </p>
50      */
GetPath()51     inline const Aws::String& GetPath() const{ return m_path; }
52 
53     /**
54      * <p> The path to the server certificate. For more information about paths, see <a
55      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
56      * identifiers</a> in the <i>IAM User Guide</i>. </p>
57      */
PathHasBeenSet()58     inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
59 
60     /**
61      * <p> The path to the server certificate. For more information about paths, see <a
62      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
63      * identifiers</a> in the <i>IAM User Guide</i>. </p>
64      */
SetPath(const Aws::String & value)65     inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; }
66 
67     /**
68      * <p> The path to the server certificate. For more information about paths, see <a
69      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
70      * identifiers</a> in the <i>IAM User Guide</i>. </p>
71      */
SetPath(Aws::String && value)72     inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); }
73 
74     /**
75      * <p> The path to the server certificate. For more information about paths, see <a
76      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
77      * identifiers</a> in the <i>IAM User Guide</i>. </p>
78      */
SetPath(const char * value)79     inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); }
80 
81     /**
82      * <p> The path to the server certificate. For more information about paths, see <a
83      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
84      * identifiers</a> in the <i>IAM User Guide</i>. </p>
85      */
WithPath(const Aws::String & value)86     inline ServerCertificateMetadata& WithPath(const Aws::String& value) { SetPath(value); return *this;}
87 
88     /**
89      * <p> The path to the server certificate. For more information about paths, see <a
90      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
91      * identifiers</a> in the <i>IAM User Guide</i>. </p>
92      */
WithPath(Aws::String && value)93     inline ServerCertificateMetadata& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;}
94 
95     /**
96      * <p> The path to the server certificate. For more information about paths, see <a
97      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
98      * identifiers</a> in the <i>IAM User Guide</i>. </p>
99      */
WithPath(const char * value)100     inline ServerCertificateMetadata& WithPath(const char* value) { SetPath(value); return *this;}
101 
102 
103     /**
104      * <p>The name that identifies the server certificate.</p>
105      */
GetServerCertificateName()106     inline const Aws::String& GetServerCertificateName() const{ return m_serverCertificateName; }
107 
108     /**
109      * <p>The name that identifies the server certificate.</p>
110      */
ServerCertificateNameHasBeenSet()111     inline bool ServerCertificateNameHasBeenSet() const { return m_serverCertificateNameHasBeenSet; }
112 
113     /**
114      * <p>The name that identifies the server certificate.</p>
115      */
SetServerCertificateName(const Aws::String & value)116     inline void SetServerCertificateName(const Aws::String& value) { m_serverCertificateNameHasBeenSet = true; m_serverCertificateName = value; }
117 
118     /**
119      * <p>The name that identifies the server certificate.</p>
120      */
SetServerCertificateName(Aws::String && value)121     inline void SetServerCertificateName(Aws::String&& value) { m_serverCertificateNameHasBeenSet = true; m_serverCertificateName = std::move(value); }
122 
123     /**
124      * <p>The name that identifies the server certificate.</p>
125      */
SetServerCertificateName(const char * value)126     inline void SetServerCertificateName(const char* value) { m_serverCertificateNameHasBeenSet = true; m_serverCertificateName.assign(value); }
127 
128     /**
129      * <p>The name that identifies the server certificate.</p>
130      */
WithServerCertificateName(const Aws::String & value)131     inline ServerCertificateMetadata& WithServerCertificateName(const Aws::String& value) { SetServerCertificateName(value); return *this;}
132 
133     /**
134      * <p>The name that identifies the server certificate.</p>
135      */
WithServerCertificateName(Aws::String && value)136     inline ServerCertificateMetadata& WithServerCertificateName(Aws::String&& value) { SetServerCertificateName(std::move(value)); return *this;}
137 
138     /**
139      * <p>The name that identifies the server certificate.</p>
140      */
WithServerCertificateName(const char * value)141     inline ServerCertificateMetadata& WithServerCertificateName(const char* value) { SetServerCertificateName(value); return *this;}
142 
143 
144     /**
145      * <p> The stable and unique string identifying the server certificate. For more
146      * information about IDs, see <a
147      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
148      * identifiers</a> in the <i>IAM User Guide</i>. </p>
149      */
GetServerCertificateId()150     inline const Aws::String& GetServerCertificateId() const{ return m_serverCertificateId; }
151 
152     /**
153      * <p> The stable and unique string identifying the server certificate. For more
154      * information about IDs, see <a
155      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
156      * identifiers</a> in the <i>IAM User Guide</i>. </p>
157      */
ServerCertificateIdHasBeenSet()158     inline bool ServerCertificateIdHasBeenSet() const { return m_serverCertificateIdHasBeenSet; }
159 
160     /**
161      * <p> The stable and unique string identifying the server certificate. For more
162      * information about IDs, see <a
163      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
164      * identifiers</a> in the <i>IAM User Guide</i>. </p>
165      */
SetServerCertificateId(const Aws::String & value)166     inline void SetServerCertificateId(const Aws::String& value) { m_serverCertificateIdHasBeenSet = true; m_serverCertificateId = value; }
167 
168     /**
169      * <p> The stable and unique string identifying the server certificate. For more
170      * information about IDs, see <a
171      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
172      * identifiers</a> in the <i>IAM User Guide</i>. </p>
173      */
SetServerCertificateId(Aws::String && value)174     inline void SetServerCertificateId(Aws::String&& value) { m_serverCertificateIdHasBeenSet = true; m_serverCertificateId = std::move(value); }
175 
176     /**
177      * <p> The stable and unique string identifying the server certificate. For more
178      * information about IDs, see <a
179      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
180      * identifiers</a> in the <i>IAM User Guide</i>. </p>
181      */
SetServerCertificateId(const char * value)182     inline void SetServerCertificateId(const char* value) { m_serverCertificateIdHasBeenSet = true; m_serverCertificateId.assign(value); }
183 
184     /**
185      * <p> The stable and unique string identifying the server certificate. For more
186      * information about IDs, see <a
187      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
188      * identifiers</a> in the <i>IAM User Guide</i>. </p>
189      */
WithServerCertificateId(const Aws::String & value)190     inline ServerCertificateMetadata& WithServerCertificateId(const Aws::String& value) { SetServerCertificateId(value); return *this;}
191 
192     /**
193      * <p> The stable and unique string identifying the server certificate. For more
194      * information about IDs, see <a
195      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
196      * identifiers</a> in the <i>IAM User Guide</i>. </p>
197      */
WithServerCertificateId(Aws::String && value)198     inline ServerCertificateMetadata& WithServerCertificateId(Aws::String&& value) { SetServerCertificateId(std::move(value)); return *this;}
199 
200     /**
201      * <p> The stable and unique string identifying the server certificate. For more
202      * information about IDs, see <a
203      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
204      * identifiers</a> in the <i>IAM User Guide</i>. </p>
205      */
WithServerCertificateId(const char * value)206     inline ServerCertificateMetadata& WithServerCertificateId(const char* value) { SetServerCertificateId(value); return *this;}
207 
208 
209     /**
210      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
211      * information about ARNs and how to use them in policies, see <a
212      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
213      * identifiers</a> in the <i>IAM User Guide</i>. </p>
214      */
GetArn()215     inline const Aws::String& GetArn() const{ return m_arn; }
216 
217     /**
218      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
219      * information about ARNs and how to use them in policies, see <a
220      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
221      * identifiers</a> in the <i>IAM User Guide</i>. </p>
222      */
ArnHasBeenSet()223     inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
224 
225     /**
226      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
227      * information about ARNs and how to use them in policies, see <a
228      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
229      * identifiers</a> in the <i>IAM User Guide</i>. </p>
230      */
SetArn(const Aws::String & value)231     inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
232 
233     /**
234      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
235      * information about ARNs and how to use them in policies, see <a
236      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
237      * identifiers</a> in the <i>IAM User Guide</i>. </p>
238      */
SetArn(Aws::String && value)239     inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
240 
241     /**
242      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
243      * information about ARNs and how to use them in policies, see <a
244      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
245      * identifiers</a> in the <i>IAM User Guide</i>. </p>
246      */
SetArn(const char * value)247     inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
248 
249     /**
250      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
251      * information about ARNs and how to use them in policies, see <a
252      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
253      * identifiers</a> in the <i>IAM User Guide</i>. </p>
254      */
WithArn(const Aws::String & value)255     inline ServerCertificateMetadata& WithArn(const Aws::String& value) { SetArn(value); return *this;}
256 
257     /**
258      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
259      * information about ARNs and how to use them in policies, see <a
260      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
261      * identifiers</a> in the <i>IAM User Guide</i>. </p>
262      */
WithArn(Aws::String && value)263     inline ServerCertificateMetadata& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
264 
265     /**
266      * <p> The Amazon Resource Name (ARN) specifying the server certificate. For more
267      * information about ARNs and how to use them in policies, see <a
268      * href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM
269      * identifiers</a> in the <i>IAM User Guide</i>. </p>
270      */
WithArn(const char * value)271     inline ServerCertificateMetadata& WithArn(const char* value) { SetArn(value); return *this;}
272 
273 
274     /**
275      * <p>The date when the server certificate was uploaded.</p>
276      */
GetUploadDate()277     inline const Aws::Utils::DateTime& GetUploadDate() const{ return m_uploadDate; }
278 
279     /**
280      * <p>The date when the server certificate was uploaded.</p>
281      */
UploadDateHasBeenSet()282     inline bool UploadDateHasBeenSet() const { return m_uploadDateHasBeenSet; }
283 
284     /**
285      * <p>The date when the server certificate was uploaded.</p>
286      */
SetUploadDate(const Aws::Utils::DateTime & value)287     inline void SetUploadDate(const Aws::Utils::DateTime& value) { m_uploadDateHasBeenSet = true; m_uploadDate = value; }
288 
289     /**
290      * <p>The date when the server certificate was uploaded.</p>
291      */
SetUploadDate(Aws::Utils::DateTime && value)292     inline void SetUploadDate(Aws::Utils::DateTime&& value) { m_uploadDateHasBeenSet = true; m_uploadDate = std::move(value); }
293 
294     /**
295      * <p>The date when the server certificate was uploaded.</p>
296      */
WithUploadDate(const Aws::Utils::DateTime & value)297     inline ServerCertificateMetadata& WithUploadDate(const Aws::Utils::DateTime& value) { SetUploadDate(value); return *this;}
298 
299     /**
300      * <p>The date when the server certificate was uploaded.</p>
301      */
WithUploadDate(Aws::Utils::DateTime && value)302     inline ServerCertificateMetadata& WithUploadDate(Aws::Utils::DateTime&& value) { SetUploadDate(std::move(value)); return *this;}
303 
304 
305     /**
306      * <p>The date on which the certificate is set to expire.</p>
307      */
GetExpiration()308     inline const Aws::Utils::DateTime& GetExpiration() const{ return m_expiration; }
309 
310     /**
311      * <p>The date on which the certificate is set to expire.</p>
312      */
ExpirationHasBeenSet()313     inline bool ExpirationHasBeenSet() const { return m_expirationHasBeenSet; }
314 
315     /**
316      * <p>The date on which the certificate is set to expire.</p>
317      */
SetExpiration(const Aws::Utils::DateTime & value)318     inline void SetExpiration(const Aws::Utils::DateTime& value) { m_expirationHasBeenSet = true; m_expiration = value; }
319 
320     /**
321      * <p>The date on which the certificate is set to expire.</p>
322      */
SetExpiration(Aws::Utils::DateTime && value)323     inline void SetExpiration(Aws::Utils::DateTime&& value) { m_expirationHasBeenSet = true; m_expiration = std::move(value); }
324 
325     /**
326      * <p>The date on which the certificate is set to expire.</p>
327      */
WithExpiration(const Aws::Utils::DateTime & value)328     inline ServerCertificateMetadata& WithExpiration(const Aws::Utils::DateTime& value) { SetExpiration(value); return *this;}
329 
330     /**
331      * <p>The date on which the certificate is set to expire.</p>
332      */
WithExpiration(Aws::Utils::DateTime && value)333     inline ServerCertificateMetadata& WithExpiration(Aws::Utils::DateTime&& value) { SetExpiration(std::move(value)); return *this;}
334 
335   private:
336 
337     Aws::String m_path;
338     bool m_pathHasBeenSet;
339 
340     Aws::String m_serverCertificateName;
341     bool m_serverCertificateNameHasBeenSet;
342 
343     Aws::String m_serverCertificateId;
344     bool m_serverCertificateIdHasBeenSet;
345 
346     Aws::String m_arn;
347     bool m_arnHasBeenSet;
348 
349     Aws::Utils::DateTime m_uploadDate;
350     bool m_uploadDateHasBeenSet;
351 
352     Aws::Utils::DateTime m_expiration;
353     bool m_expirationHasBeenSet;
354   };
355 
356 } // namespace Model
357 } // namespace IAM
358 } // namespace Aws
359