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/kms/KMS_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace KMS
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Contains information about an alias.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/AliasListEntry">AWS
30    * API Reference</a></p>
31    */
32   class AWS_KMS_API AliasListEntry
33   {
34   public:
35     AliasListEntry();
36     AliasListEntry(Aws::Utils::Json::JsonView jsonValue);
37     AliasListEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
38     Aws::Utils::Json::JsonValue Jsonize() const;
39 
40 
41     /**
42      * <p>String that contains the alias. This value begins with
43      * <code>alias/</code>.</p>
44      */
GetAliasName()45     inline const Aws::String& GetAliasName() const{ return m_aliasName; }
46 
47     /**
48      * <p>String that contains the alias. This value begins with
49      * <code>alias/</code>.</p>
50      */
AliasNameHasBeenSet()51     inline bool AliasNameHasBeenSet() const { return m_aliasNameHasBeenSet; }
52 
53     /**
54      * <p>String that contains the alias. This value begins with
55      * <code>alias/</code>.</p>
56      */
SetAliasName(const Aws::String & value)57     inline void SetAliasName(const Aws::String& value) { m_aliasNameHasBeenSet = true; m_aliasName = value; }
58 
59     /**
60      * <p>String that contains the alias. This value begins with
61      * <code>alias/</code>.</p>
62      */
SetAliasName(Aws::String && value)63     inline void SetAliasName(Aws::String&& value) { m_aliasNameHasBeenSet = true; m_aliasName = std::move(value); }
64 
65     /**
66      * <p>String that contains the alias. This value begins with
67      * <code>alias/</code>.</p>
68      */
SetAliasName(const char * value)69     inline void SetAliasName(const char* value) { m_aliasNameHasBeenSet = true; m_aliasName.assign(value); }
70 
71     /**
72      * <p>String that contains the alias. This value begins with
73      * <code>alias/</code>.</p>
74      */
WithAliasName(const Aws::String & value)75     inline AliasListEntry& WithAliasName(const Aws::String& value) { SetAliasName(value); return *this;}
76 
77     /**
78      * <p>String that contains the alias. This value begins with
79      * <code>alias/</code>.</p>
80      */
WithAliasName(Aws::String && value)81     inline AliasListEntry& WithAliasName(Aws::String&& value) { SetAliasName(std::move(value)); return *this;}
82 
83     /**
84      * <p>String that contains the alias. This value begins with
85      * <code>alias/</code>.</p>
86      */
WithAliasName(const char * value)87     inline AliasListEntry& WithAliasName(const char* value) { SetAliasName(value); return *this;}
88 
89 
90     /**
91      * <p>String that contains the key ARN.</p>
92      */
GetAliasArn()93     inline const Aws::String& GetAliasArn() const{ return m_aliasArn; }
94 
95     /**
96      * <p>String that contains the key ARN.</p>
97      */
AliasArnHasBeenSet()98     inline bool AliasArnHasBeenSet() const { return m_aliasArnHasBeenSet; }
99 
100     /**
101      * <p>String that contains the key ARN.</p>
102      */
SetAliasArn(const Aws::String & value)103     inline void SetAliasArn(const Aws::String& value) { m_aliasArnHasBeenSet = true; m_aliasArn = value; }
104 
105     /**
106      * <p>String that contains the key ARN.</p>
107      */
SetAliasArn(Aws::String && value)108     inline void SetAliasArn(Aws::String&& value) { m_aliasArnHasBeenSet = true; m_aliasArn = std::move(value); }
109 
110     /**
111      * <p>String that contains the key ARN.</p>
112      */
SetAliasArn(const char * value)113     inline void SetAliasArn(const char* value) { m_aliasArnHasBeenSet = true; m_aliasArn.assign(value); }
114 
115     /**
116      * <p>String that contains the key ARN.</p>
117      */
WithAliasArn(const Aws::String & value)118     inline AliasListEntry& WithAliasArn(const Aws::String& value) { SetAliasArn(value); return *this;}
119 
120     /**
121      * <p>String that contains the key ARN.</p>
122      */
WithAliasArn(Aws::String && value)123     inline AliasListEntry& WithAliasArn(Aws::String&& value) { SetAliasArn(std::move(value)); return *this;}
124 
125     /**
126      * <p>String that contains the key ARN.</p>
127      */
WithAliasArn(const char * value)128     inline AliasListEntry& WithAliasArn(const char* value) { SetAliasArn(value); return *this;}
129 
130 
131     /**
132      * <p>String that contains the key identifier of the KMS key associated with the
133      * alias.</p>
134      */
GetTargetKeyId()135     inline const Aws::String& GetTargetKeyId() const{ return m_targetKeyId; }
136 
137     /**
138      * <p>String that contains the key identifier of the KMS key associated with the
139      * alias.</p>
140      */
TargetKeyIdHasBeenSet()141     inline bool TargetKeyIdHasBeenSet() const { return m_targetKeyIdHasBeenSet; }
142 
143     /**
144      * <p>String that contains the key identifier of the KMS key associated with the
145      * alias.</p>
146      */
SetTargetKeyId(const Aws::String & value)147     inline void SetTargetKeyId(const Aws::String& value) { m_targetKeyIdHasBeenSet = true; m_targetKeyId = value; }
148 
149     /**
150      * <p>String that contains the key identifier of the KMS key associated with the
151      * alias.</p>
152      */
SetTargetKeyId(Aws::String && value)153     inline void SetTargetKeyId(Aws::String&& value) { m_targetKeyIdHasBeenSet = true; m_targetKeyId = std::move(value); }
154 
155     /**
156      * <p>String that contains the key identifier of the KMS key associated with the
157      * alias.</p>
158      */
SetTargetKeyId(const char * value)159     inline void SetTargetKeyId(const char* value) { m_targetKeyIdHasBeenSet = true; m_targetKeyId.assign(value); }
160 
161     /**
162      * <p>String that contains the key identifier of the KMS key associated with the
163      * alias.</p>
164      */
WithTargetKeyId(const Aws::String & value)165     inline AliasListEntry& WithTargetKeyId(const Aws::String& value) { SetTargetKeyId(value); return *this;}
166 
167     /**
168      * <p>String that contains the key identifier of the KMS key associated with the
169      * alias.</p>
170      */
WithTargetKeyId(Aws::String && value)171     inline AliasListEntry& WithTargetKeyId(Aws::String&& value) { SetTargetKeyId(std::move(value)); return *this;}
172 
173     /**
174      * <p>String that contains the key identifier of the KMS key associated with the
175      * alias.</p>
176      */
WithTargetKeyId(const char * value)177     inline AliasListEntry& WithTargetKeyId(const char* value) { SetTargetKeyId(value); return *this;}
178 
179 
180     /**
181      * <p>Date and time that the alias was most recently created in the account and
182      * Region. Formatted as Unix time.</p>
183      */
GetCreationDate()184     inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; }
185 
186     /**
187      * <p>Date and time that the alias was most recently created in the account and
188      * Region. Formatted as Unix time.</p>
189      */
CreationDateHasBeenSet()190     inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
191 
192     /**
193      * <p>Date and time that the alias was most recently created in the account and
194      * Region. Formatted as Unix time.</p>
195      */
SetCreationDate(const Aws::Utils::DateTime & value)196     inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
197 
198     /**
199      * <p>Date and time that the alias was most recently created in the account and
200      * Region. Formatted as Unix time.</p>
201      */
SetCreationDate(Aws::Utils::DateTime && value)202     inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); }
203 
204     /**
205      * <p>Date and time that the alias was most recently created in the account and
206      * Region. Formatted as Unix time.</p>
207      */
WithCreationDate(const Aws::Utils::DateTime & value)208     inline AliasListEntry& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;}
209 
210     /**
211      * <p>Date and time that the alias was most recently created in the account and
212      * Region. Formatted as Unix time.</p>
213      */
WithCreationDate(Aws::Utils::DateTime && value)214     inline AliasListEntry& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;}
215 
216 
217     /**
218      * <p>Date and time that the alias was most recently associated with a KMS key in
219      * the account and Region. Formatted as Unix time.</p>
220      */
GetLastUpdatedDate()221     inline const Aws::Utils::DateTime& GetLastUpdatedDate() const{ return m_lastUpdatedDate; }
222 
223     /**
224      * <p>Date and time that the alias was most recently associated with a KMS key in
225      * the account and Region. Formatted as Unix time.</p>
226      */
LastUpdatedDateHasBeenSet()227     inline bool LastUpdatedDateHasBeenSet() const { return m_lastUpdatedDateHasBeenSet; }
228 
229     /**
230      * <p>Date and time that the alias was most recently associated with a KMS key in
231      * the account and Region. Formatted as Unix time.</p>
232      */
SetLastUpdatedDate(const Aws::Utils::DateTime & value)233     inline void SetLastUpdatedDate(const Aws::Utils::DateTime& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = value; }
234 
235     /**
236      * <p>Date and time that the alias was most recently associated with a KMS key in
237      * the account and Region. Formatted as Unix time.</p>
238      */
SetLastUpdatedDate(Aws::Utils::DateTime && value)239     inline void SetLastUpdatedDate(Aws::Utils::DateTime&& value) { m_lastUpdatedDateHasBeenSet = true; m_lastUpdatedDate = std::move(value); }
240 
241     /**
242      * <p>Date and time that the alias was most recently associated with a KMS key in
243      * the account and Region. Formatted as Unix time.</p>
244      */
WithLastUpdatedDate(const Aws::Utils::DateTime & value)245     inline AliasListEntry& WithLastUpdatedDate(const Aws::Utils::DateTime& value) { SetLastUpdatedDate(value); return *this;}
246 
247     /**
248      * <p>Date and time that the alias was most recently associated with a KMS key in
249      * the account and Region. Formatted as Unix time.</p>
250      */
WithLastUpdatedDate(Aws::Utils::DateTime && value)251     inline AliasListEntry& WithLastUpdatedDate(Aws::Utils::DateTime&& value) { SetLastUpdatedDate(std::move(value)); return *this;}
252 
253   private:
254 
255     Aws::String m_aliasName;
256     bool m_aliasNameHasBeenSet;
257 
258     Aws::String m_aliasArn;
259     bool m_aliasArnHasBeenSet;
260 
261     Aws::String m_targetKeyId;
262     bool m_targetKeyIdHasBeenSet;
263 
264     Aws::Utils::DateTime m_creationDate;
265     bool m_creationDateHasBeenSet;
266 
267     Aws::Utils::DateTime m_lastUpdatedDate;
268     bool m_lastUpdatedDateHasBeenSet;
269   };
270 
271 } // namespace Model
272 } // namespace KMS
273 } // namespace Aws
274