AWS SDK for C++  0.14.3
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>
23 
24 namespace Aws
25 {
26 namespace Utils
27 {
28 namespace Json
29 {
30  class JsonValue;
31 } // namespace Json
32 } // namespace Utils
33 namespace KMS
34 {
35 namespace Model
36 {
37 
44  {
45  public:
46  KeyMetadata();
47  KeyMetadata(const Aws::Utils::Json::JsonValue& jsonValue);
48  KeyMetadata& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
49  Aws::Utils::Json::JsonValue Jsonize() const;
50 
54  inline const Aws::String& GetAWSAccountId() const{ return m_aWSAccountId; }
55 
59  inline void SetAWSAccountId(const Aws::String& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = value; }
60 
64  inline void SetAWSAccountId(Aws::String&& value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId = value; }
65 
69  inline void SetAWSAccountId(const char* value) { m_aWSAccountIdHasBeenSet = true; m_aWSAccountId.assign(value); }
70 
74  inline KeyMetadata& WithAWSAccountId(const Aws::String& value) { SetAWSAccountId(value); return *this;}
75 
79  inline KeyMetadata& WithAWSAccountId(Aws::String&& value) { SetAWSAccountId(value); return *this;}
80 
84  inline KeyMetadata& WithAWSAccountId(const char* value) { SetAWSAccountId(value); return *this;}
85 
89  inline const Aws::String& GetKeyId() const{ return m_keyId; }
90 
94  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
95 
99  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
100 
104  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
105 
109  inline KeyMetadata& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
110 
114  inline KeyMetadata& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
115 
119  inline KeyMetadata& WithKeyId(const char* value) { SetKeyId(value); return *this;}
120 
127  inline const Aws::String& GetArn() const{ return m_arn; }
128 
135  inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
136 
143  inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = value; }
144 
151  inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
152 
159  inline KeyMetadata& WithArn(const Aws::String& value) { SetArn(value); return *this;}
160 
167  inline KeyMetadata& WithArn(Aws::String&& value) { SetArn(value); return *this;}
168 
175  inline KeyMetadata& WithArn(const char* value) { SetArn(value); return *this;}
176 
180  inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; }
181 
185  inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
186 
190  inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
191 
195  inline KeyMetadata& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;}
196 
200  inline KeyMetadata& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(value); return *this;}
201 
206  inline bool GetEnabled() const{ return m_enabled; }
207 
212  inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
213 
218  inline KeyMetadata& WithEnabled(bool value) { SetEnabled(value); return *this;}
219 
223  inline const Aws::String& GetDescription() const{ return m_description; }
224 
228  inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
229 
233  inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = value; }
234 
238  inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
239 
243  inline KeyMetadata& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
244 
248  inline KeyMetadata& WithDescription(Aws::String&& value) { SetDescription(value); return *this;}
249 
253  inline KeyMetadata& WithDescription(const char* value) { SetDescription(value); return *this;}
254 
260  inline const KeyUsageType& GetKeyUsage() const{ return m_keyUsage; }
261 
267  inline void SetKeyUsage(const KeyUsageType& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; }
268 
274  inline void SetKeyUsage(KeyUsageType&& value) { m_keyUsageHasBeenSet = true; m_keyUsage = value; }
275 
281  inline KeyMetadata& WithKeyUsage(const KeyUsageType& value) { SetKeyUsage(value); return *this;}
282 
288  inline KeyMetadata& WithKeyUsage(KeyUsageType&& value) { SetKeyUsage(value); return *this;}
289 
297  inline const KeyState& GetKeyState() const{ return m_keyState; }
298 
306  inline void SetKeyState(const KeyState& value) { m_keyStateHasBeenSet = true; m_keyState = value; }
307 
315  inline void SetKeyState(KeyState&& value) { m_keyStateHasBeenSet = true; m_keyState = value; }
316 
324  inline KeyMetadata& WithKeyState(const KeyState& value) { SetKeyState(value); return *this;}
325 
333  inline KeyMetadata& WithKeyState(KeyState&& value) { SetKeyState(value); return *this;}
334 
340  inline const Aws::Utils::DateTime& GetDeletionDate() const{ return m_deletionDate; }
341 
347  inline void SetDeletionDate(const Aws::Utils::DateTime& value) { m_deletionDateHasBeenSet = true; m_deletionDate = value; }
348 
354  inline void SetDeletionDate(Aws::Utils::DateTime&& value) { m_deletionDateHasBeenSet = true; m_deletionDate = value; }
355 
361  inline KeyMetadata& WithDeletionDate(const Aws::Utils::DateTime& value) { SetDeletionDate(value); return *this;}
362 
368  inline KeyMetadata& WithDeletionDate(Aws::Utils::DateTime&& value) { SetDeletionDate(value); return *this;}
369 
377  inline const Aws::Utils::DateTime& GetValidTo() const{ return m_validTo; }
378 
386  inline void SetValidTo(const Aws::Utils::DateTime& value) { m_validToHasBeenSet = true; m_validTo = value; }
387 
395  inline void SetValidTo(Aws::Utils::DateTime&& value) { m_validToHasBeenSet = true; m_validTo = value; }
396 
404  inline KeyMetadata& WithValidTo(const Aws::Utils::DateTime& value) { SetValidTo(value); return *this;}
405 
413  inline KeyMetadata& WithValidTo(Aws::Utils::DateTime&& value) { SetValidTo(value); return *this;}
414 
421  inline const OriginType& GetOrigin() const{ return m_origin; }
422 
429  inline void SetOrigin(const OriginType& value) { m_originHasBeenSet = true; m_origin = value; }
430 
437  inline void SetOrigin(OriginType&& value) { m_originHasBeenSet = true; m_origin = value; }
438 
445  inline KeyMetadata& WithOrigin(const OriginType& value) { SetOrigin(value); return *this;}
446 
453  inline KeyMetadata& WithOrigin(OriginType&& value) { SetOrigin(value); return *this;}
454 
460  inline const ExpirationModelType& GetExpirationModel() const{ return m_expirationModel; }
461 
467  inline void SetExpirationModel(const ExpirationModelType& value) { m_expirationModelHasBeenSet = true; m_expirationModel = value; }
468 
474  inline void SetExpirationModel(ExpirationModelType&& value) { m_expirationModelHasBeenSet = true; m_expirationModel = value; }
475 
481  inline KeyMetadata& WithExpirationModel(const ExpirationModelType& value) { SetExpirationModel(value); return *this;}
482 
488  inline KeyMetadata& WithExpirationModel(ExpirationModelType&& value) { SetExpirationModel(value); return *this;}
489 
490  private:
491  Aws::String m_aWSAccountId;
492  bool m_aWSAccountIdHasBeenSet;
493  Aws::String m_keyId;
494  bool m_keyIdHasBeenSet;
495  Aws::String m_arn;
496  bool m_arnHasBeenSet;
497  Aws::Utils::DateTime m_creationDate;
498  bool m_creationDateHasBeenSet;
499  bool m_enabled;
500  bool m_enabledHasBeenSet;
501  Aws::String m_description;
502  bool m_descriptionHasBeenSet;
503  KeyUsageType m_keyUsage;
504  bool m_keyUsageHasBeenSet;
505  KeyState m_keyState;
506  bool m_keyStateHasBeenSet;
507  Aws::Utils::DateTime m_deletionDate;
508  bool m_deletionDateHasBeenSet;
509  Aws::Utils::DateTime m_validTo;
510  bool m_validToHasBeenSet;
511  OriginType m_origin;
512  bool m_originHasBeenSet;
513  ExpirationModelType m_expirationModel;
514  bool m_expirationModelHasBeenSet;
515  };
516 
517 } // namespace Model
518 } // namespace KMS
519 } // namespace Aws
KeyMetadata & WithDeletionDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:368
const KeyState & GetKeyState() const
Definition: KeyMetadata.h:297
KeyMetadata & WithOrigin(OriginType &&value)
Definition: KeyMetadata.h:453
KeyMetadata & WithAWSAccountId(const Aws::String &value)
Definition: KeyMetadata.h:74
KeyMetadata & WithAWSAccountId(Aws::String &&value)
Definition: KeyMetadata.h:79
KeyMetadata & WithArn(const Aws::String &value)
Definition: KeyMetadata.h:159
void SetArn(const char *value)
Definition: KeyMetadata.h:151
void SetKeyUsage(KeyUsageType &&value)
Definition: KeyMetadata.h:274
void SetKeyId(const Aws::String &value)
Definition: KeyMetadata.h:94
void SetKeyUsage(const KeyUsageType &value)
Definition: KeyMetadata.h:267
void SetDescription(const char *value)
Definition: KeyMetadata.h:238
const Aws::String & GetAWSAccountId() const
Definition: KeyMetadata.h:54
void SetKeyState(const KeyState &value)
Definition: KeyMetadata.h:306
KeyMetadata & WithKeyUsage(KeyUsageType &&value)
Definition: KeyMetadata.h:288
void SetAWSAccountId(const char *value)
Definition: KeyMetadata.h:69
KeyMetadata & WithEnabled(bool value)
Definition: KeyMetadata.h:218
void SetKeyId(const char *value)
Definition: KeyMetadata.h:104
KeyMetadata & WithKeyId(const char *value)
Definition: KeyMetadata.h:119
void SetKeyId(Aws::String &&value)
Definition: KeyMetadata.h:99
void SetArn(Aws::String &&value)
Definition: KeyMetadata.h:143
void SetAWSAccountId(const Aws::String &value)
Definition: KeyMetadata.h:59
KeyMetadata & WithKeyState(KeyState &&value)
Definition: KeyMetadata.h:333
KeyMetadata & WithDescription(const char *value)
Definition: KeyMetadata.h:253
KeyMetadata & WithAWSAccountId(const char *value)
Definition: KeyMetadata.h:84
void SetKeyState(KeyState &&value)
Definition: KeyMetadata.h:315
void SetExpirationModel(ExpirationModelType &&value)
Definition: KeyMetadata.h:474
void SetCreationDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:190
const Aws::Utils::DateTime & GetDeletionDate() const
Definition: KeyMetadata.h:340
KeyMetadata & WithOrigin(const OriginType &value)
Definition: KeyMetadata.h:445
KeyMetadata & WithArn(Aws::String &&value)
Definition: KeyMetadata.h:167
KeyMetadata & WithDescription(const Aws::String &value)
Definition: KeyMetadata.h:243
const Aws::Utils::DateTime & GetValidTo() const
Definition: KeyMetadata.h:377
void SetOrigin(const OriginType &value)
Definition: KeyMetadata.h:429
void SetDeletionDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:354
const KeyUsageType & GetKeyUsage() const
Definition: KeyMetadata.h:260
void SetEnabled(bool value)
Definition: KeyMetadata.h:212
KeyMetadata & WithDescription(Aws::String &&value)
Definition: KeyMetadata.h:248
const Aws::String & GetDescription() const
Definition: KeyMetadata.h:223
void SetDescription(Aws::String &&value)
Definition: KeyMetadata.h:233
KeyMetadata & WithKeyId(Aws::String &&value)
Definition: KeyMetadata.h:114
KeyMetadata & WithCreationDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:195
KeyMetadata & WithKeyState(const KeyState &value)
Definition: KeyMetadata.h:324
void SetOrigin(OriginType &&value)
Definition: KeyMetadata.h:437
void SetValidTo(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:386
KeyMetadata & WithValidTo(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:413
KeyMetadata & WithCreationDate(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:200
KeyMetadata & WithExpirationModel(ExpirationModelType &&value)
Definition: KeyMetadata.h:488
const Aws::Utils::DateTime & GetCreationDate() const
Definition: KeyMetadata.h:180
void SetCreationDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:185
void SetArn(const Aws::String &value)
Definition: KeyMetadata.h:135
void SetDescription(const Aws::String &value)
Definition: KeyMetadata.h:228
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
KeyMetadata & WithValidTo(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:404
void SetDeletionDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:347
void SetAWSAccountId(Aws::String &&value)
Definition: KeyMetadata.h:64
const OriginType & GetOrigin() const
Definition: KeyMetadata.h:421
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:37
const ExpirationModelType & GetExpirationModel() const
Definition: KeyMetadata.h:460
KeyMetadata & WithKeyUsage(const KeyUsageType &value)
Definition: KeyMetadata.h:281
void SetExpirationModel(const ExpirationModelType &value)
Definition: KeyMetadata.h:467
KeyMetadata & WithDeletionDate(const Aws::Utils::DateTime &value)
Definition: KeyMetadata.h:361
void SetValidTo(Aws::Utils::DateTime &&value)
Definition: KeyMetadata.h:395
const Aws::String & GetArn() const
Definition: KeyMetadata.h:127
const Aws::String & GetKeyId() const
Definition: KeyMetadata.h:89
KeyMetadata & WithExpirationModel(const ExpirationModelType &value)
Definition: KeyMetadata.h:481
KeyMetadata & WithArn(const char *value)
Definition: KeyMetadata.h:175
KeyMetadata & WithKeyId(const Aws::String &value)
Definition: KeyMetadata.h:109
JSON (JavaScript Object Notation).