AWS SDK for C++  0.12.9
AWS SDK for C++
KeyMetadata.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/kms/KMS_EXPORTS.h>
20 #include <aws/kms/model/KeyState.h>
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Json
27 {
28  class JsonValue;
29 } // namespace Json
30 } // namespace Utils
31 namespace KMS
32 {
33 namespace Model
34 {
35 
42  {
43  public:
44  KeyMetadata();
45  KeyMetadata(const Aws::Utils::Json::JsonValue& jsonValue);
46  KeyMetadata& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
47  Aws::Utils::Json::JsonValue Jsonize() const;
48 
52  inline const Aws::String& GetAWSAccountId() const{ return m_aWSAccountId; }
53 
57  inline void SetAWSAccountId(const Aws::String& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = value; }
58 
62  inline void SetAWSAccountId(Aws::String&& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = value; }
63 
67  inline void SetAWSAccountId(const char* value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId.assign(value); }
68 
72  inline KeyMetadata& WithAWSAccountId(const Aws::String& value) { SetAWSAccountId(value); return *this;}
73 
77  inline KeyMetadata& WithAWSAccountId(Aws::String&& value) { SetAWSAccountId(value); return *this;}
78 
82  inline KeyMetadata& WithAWSAccountId(const char* value) { SetAWSAccountId(value); return *this;}
83 
87  inline const Aws::String& GetKeyId() const{ return m_keyId; }
88 
92  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
93 
97  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
98 
102  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
103 
107  inline KeyMetadata& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
108 
112  inline KeyMetadata& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
113 
117  inline KeyMetadata& WithKeyId(const char* value) { SetKeyId(value); return *this;}
118 
125  inline const Aws::String& GetArn() const{ return m_arn; }
126 
133  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
134 
141  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = value; }
142 
149  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
150 
157  inline KeyMetadata& WithArn(const Aws::String& value) { SetArn(value); return *this;}
158 
165  inline KeyMetadata& WithArn(Aws::String&& value) { SetArn(value); return *this;}
166 
173  inline KeyMetadata& WithArn(const char* value) { SetArn(value); return *this;}
174 
178  inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; }
179 
183  inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
184 
188  inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
189 
193  inline KeyMetadata& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;}
194 
198  inline KeyMetadata& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(value); return *this;}
199 
204  inline bool GetEnabled() const{ return m_enabled; }
205 
210  inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
211 
216  inline KeyMetadata& WithEnabled(bool value) { SetEnabled(value); return *this;}
217 
221  inline const Aws::String& GetDescription() const{ return m_description; }
222 
226  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
227 
231  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
232 
236  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
237 
241  inline KeyMetadata& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
242 
246  inline KeyMetadata& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
247 
251  inline KeyMetadata& WithDescription(const char* value) { SetDescription(value); return *this;}
252 
258  inline const KeyUsageType& GetKeyUsage() const{ return m_keyUsage; }
259 
265  inline void SetKeyUsage(const KeyUsageType& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; }
266 
272  inline void SetKeyUsage(KeyUsageType&& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; }
273 
279  inline KeyMetadata& WithKeyUsage(const KeyUsageType& value) { SetKeyUsage(value); return *this;}
280 
286  inline KeyMetadata& WithKeyUsage(KeyUsageType&& value) { SetKeyUsage(value); return *this;}
287 
295  inline const KeyState& GetKeyState() const{ return m_keyState; }
296 
304  inline void SetKeyState(const KeyState& value) { m_keyStateHasBeenSet = true; m_keyState = value; }
305 
313  inline void SetKeyState(KeyState&& value) { m_keyStateHasBeenSet = true; m_keyState = value; }
314 
322  inline KeyMetadata& WithKeyState(const KeyState& value) { SetKeyState(value); return *this;}
323 
331  inline KeyMetadata& WithKeyState(KeyState&& value) { SetKeyState(value); return *this;}
332 
338  inline const Aws::Utils::DateTime& GetDeletionDate() const{ return m_deletionDate; }
339 
345  inline void SetDeletionDate(const Aws::Utils::DateTime& value) { m_deletionDateHasBeenSet = true; m_deletionDate = value; }
346 
352  inline void SetDeletionDate(Aws::Utils::DateTime&& value) { m_deletionDateHasBeenSet = true; m_deletionDate = value; }
353 
359  inline KeyMetadata& WithDeletionDate(const Aws::Utils::DateTime& value) { SetDeletionDate(value); return *this;}
360 
366  inline KeyMetadata& WithDeletionDate(Aws::Utils::DateTime&& value) { SetDeletionDate(value); return *this;}
367 
368  private:
369  Aws::String m_aWSAccountId;
370  bool m_aWSAccountIdHasBeenSet;
371  Aws::String m_keyId;
372  bool m_keyIdHasBeenSet;
373  Aws::String m_arn;
374  bool m_arnHasBeenSet;
375  Aws::Utils::DateTime m_creationDate;
376  bool m_creationDateHasBeenSet;
377  bool m_enabled;
378  bool m_enabledHasBeenSet;
379  Aws::String m_description;
380  bool m_descriptionHasBeenSet;
381  KeyUsageType m_keyUsage;
382  bool m_keyUsageHasBeenSet;
383  KeyState m_keyState;
384  bool m_keyStateHasBeenSet;
385  Aws::Utils::DateTime m_deletionDate;
386  bool m_deletionDateHasBeenSet;
387  };
388 
389 } // namespace Model
390 } // namespace KMS
391 } // namespace Aws
KeyMetadata & WithDeletionDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:366
const KeyState & GetKeyState() const
Definition: KeyMetadata.h:295
KeyMetadata & WithAWSAccountId(const Aws::String &value)
Definition: KeyMetadata.h:72
KeyMetadata & WithAWSAccountId(Aws::String &&value)
Definition: KeyMetadata.h:77
KeyMetadata & WithArn(const Aws::String &value)
Definition: KeyMetadata.h:157
void SetArn(const char *value)
Definition: KeyMetadata.h:149
void SetKeyUsage(KeyUsageType &&value)
Definition: KeyMetadata.h:272
void SetKeyId(const Aws::String &value)
Definition: KeyMetadata.h:92
void SetKeyUsage(const KeyUsageType &value)
Definition: KeyMetadata.h:265
void SetDescription(const char *value)
Definition: KeyMetadata.h:236
const Aws::String & GetAWSAccountId() const
Definition: KeyMetadata.h:52
void SetKeyState(const KeyState &value)
Definition: KeyMetadata.h:304
KeyMetadata & WithKeyUsage(KeyUsageType &&value)
Definition: KeyMetadata.h:286
void SetAWSAccountId(const char *value)
Definition: KeyMetadata.h:67
KeyMetadata & WithEnabled(bool value)
Definition: KeyMetadata.h:216
void SetKeyId(const char *value)
Definition: KeyMetadata.h:102
KeyMetadata & WithKeyId(const char *value)
Definition: KeyMetadata.h:117
void SetKeyId(Aws::String &&value)
Definition: KeyMetadata.h:97
void SetArn(Aws::String &&value)
Definition: KeyMetadata.h:141
void SetAWSAccountId(const Aws::String &value)
Definition: KeyMetadata.h:57
KeyMetadata & WithKeyState(KeyState &&value)
Definition: KeyMetadata.h:331
KeyMetadata & WithDescription(const char *value)
Definition: KeyMetadata.h:251
KeyMetadata & WithAWSAccountId(const char *value)
Definition: KeyMetadata.h:82
void SetKeyState(KeyState &&value)
Definition: KeyMetadata.h:313
void SetCreationDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:188
const Aws::Utils::DateTime & GetDeletionDate() const
Definition: KeyMetadata.h:338
KeyMetadata & WithArn(Aws::String &&value)
Definition: KeyMetadata.h:165
KeyMetadata & WithDescription(const Aws::String &value)
Definition: KeyMetadata.h:241
void SetDeletionDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:352
const KeyUsageType & GetKeyUsage() const
Definition: KeyMetadata.h:258
void SetEnabled(bool value)
Definition: KeyMetadata.h:210
KeyMetadata & WithDescription(Aws::String &&value)
Definition: KeyMetadata.h:246
const Aws::String & GetDescription() const
Definition: KeyMetadata.h:221
void SetDescription(Aws::String &&value)
Definition: KeyMetadata.h:231
KeyMetadata & WithKeyId(Aws::String &&value)
Definition: KeyMetadata.h:112
KeyMetadata & WithCreationDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:193
KeyMetadata & WithKeyState(const KeyState &value)
Definition: KeyMetadata.h:322
KeyMetadata & WithCreationDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:198
const Aws::Utils::DateTime & GetCreationDate() const
Definition: KeyMetadata.h:178
void SetCreationDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:183
void SetArn(const Aws::String &value)
Definition: KeyMetadata.h:133
void SetDescription(const Aws::String &value)
Definition: KeyMetadata.h:226
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetDeletionDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:345
void SetAWSAccountId(Aws::String &&value)
Definition: KeyMetadata.h:62
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:34
KeyMetadata & WithKeyUsage(const KeyUsageType &value)
Definition: KeyMetadata.h:279
KeyMetadata & WithDeletionDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:359
const Aws::String & GetArn() const
Definition: KeyMetadata.h:125
const Aws::String & GetKeyId() const
Definition: KeyMetadata.h:87
KeyMetadata & WithArn(const char *value)
Definition: KeyMetadata.h:173
KeyMetadata & WithKeyId(const Aws::String &value)
Definition: KeyMetadata.h:107
JSON (JavaScript Object Notation).