AWS SDK for C++  0.14.3
AWS SDK for C++
ImportKeyMaterialRequest.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>
17 #include <aws/kms/KMSRequest.h>
19 #include <aws/core/utils/Array.h>
22 
23 namespace Aws
24 {
25 namespace KMS
26 {
27 namespace Model
28 {
29 
33  {
34  public:
36  Aws::String SerializePayload() const override;
37 
38  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39 
49  inline const Aws::String& GetKeyId() const{ return m_keyId; }
50 
60  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
61 
71  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
72 
82  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
83 
93  inline ImportKeyMaterialRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
94 
104  inline ImportKeyMaterialRequest& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
105 
115  inline ImportKeyMaterialRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
116 
122  inline const Aws::Utils::ByteBuffer& GetImportToken() const{ return m_importToken; }
123 
129  inline void SetImportToken(const Aws::Utils::ByteBuffer& value) { m_importTokenHasBeenSet = true; m_importToken = value; }
130 
136  inline void SetImportToken(Aws::Utils::ByteBuffer&& value) { m_importTokenHasBeenSet = true; m_importToken = value; }
137 
143  inline ImportKeyMaterialRequest& WithImportToken(const Aws::Utils::ByteBuffer& value) { SetImportToken(value); return *this;}
144 
150  inline ImportKeyMaterialRequest& WithImportToken(Aws::Utils::ByteBuffer&& value) { SetImportToken(value); return *this;}
151 
158  inline const Aws::Utils::ByteBuffer& GetEncryptedKeyMaterial() const{ return m_encryptedKeyMaterial; }
159 
166  inline void SetEncryptedKeyMaterial(const Aws::Utils::ByteBuffer& value) { m_encryptedKeyMaterialHasBeenSet = true; m_encryptedKeyMaterial = value; }
167 
174  inline void SetEncryptedKeyMaterial(Aws::Utils::ByteBuffer&& value) { m_encryptedKeyMaterialHasBeenSet = true; m_encryptedKeyMaterial = value; }
175 
182  inline ImportKeyMaterialRequest& WithEncryptedKeyMaterial(const Aws::Utils::ByteBuffer& value) { SetEncryptedKeyMaterial(value); return *this;}
183 
190  inline ImportKeyMaterialRequest& WithEncryptedKeyMaterial(Aws::Utils::ByteBuffer&& value) { SetEncryptedKeyMaterial(value); return *this;}
191 
198  inline const Aws::Utils::DateTime& GetValidTo() const{ return m_validTo; }
199 
206  inline void SetValidTo(const Aws::Utils::DateTime& value) { m_validToHasBeenSet = true; m_validTo = value; }
207 
214  inline void SetValidTo(Aws::Utils::DateTime&& value) { m_validToHasBeenSet = true; m_validTo = value; }
215 
222  inline ImportKeyMaterialRequest& WithValidTo(const Aws::Utils::DateTime& value) { SetValidTo(value); return *this;}
223 
230  inline ImportKeyMaterialRequest& WithValidTo(Aws::Utils::DateTime&& value) { SetValidTo(value); return *this;}
231 
239  inline const ExpirationModelType& GetExpirationModel() const{ return m_expirationModel; }
240 
248  inline void SetExpirationModel(const ExpirationModelType& value) { m_expirationModelHasBeenSet = true; m_expirationModel = value; }
249 
257  inline void SetExpirationModel(ExpirationModelType&& value) { m_expirationModelHasBeenSet = true; m_expirationModel = value; }
258 
266  inline ImportKeyMaterialRequest& WithExpirationModel(const ExpirationModelType& value) { SetExpirationModel(value); return *this;}
267 
275  inline ImportKeyMaterialRequest& WithExpirationModel(ExpirationModelType&& value) { SetExpirationModel(value); return *this;}
276 
277  private:
278  Aws::String m_keyId;
279  bool m_keyIdHasBeenSet;
280  Aws::Utils::ByteBuffer m_importToken;
281  bool m_importTokenHasBeenSet;
282  Aws::Utils::ByteBuffer m_encryptedKeyMaterial;
283  bool m_encryptedKeyMaterialHasBeenSet;
284  Aws::Utils::DateTime m_validTo;
285  bool m_validToHasBeenSet;
286  ExpirationModelType m_expirationModel;
287  bool m_expirationModelHasBeenSet;
288  };
289 
290 } // namespace Model
291 } // namespace KMS
292 } // namespace Aws
void SetEncryptedKeyMaterial(const Aws::Utils::ByteBuffer &value)
ImportKeyMaterialRequest & WithExpirationModel(ExpirationModelType &&value)
void SetValidTo(Aws::Utils::DateTime &&value)
ImportKeyMaterialRequest & WithEncryptedKeyMaterial(const Aws::Utils::ByteBuffer &value)
void SetImportToken(Aws::Utils::ByteBuffer &&value)
ImportKeyMaterialRequest & WithKeyId(Aws::String &&value)
ImportKeyMaterialRequest & WithValidTo(Aws::Utils::DateTime &&value)
void SetImportToken(const Aws::Utils::ByteBuffer &value)
const Aws::Utils::ByteBuffer & GetEncryptedKeyMaterial() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
void SetExpirationModel(ExpirationModelType &&value)
ImportKeyMaterialRequest & WithEncryptedKeyMaterial(Aws::Utils::ByteBuffer &&value)
ImportKeyMaterialRequest & WithExpirationModel(const ExpirationModelType &value)
const ExpirationModelType & GetExpirationModel() const
void SetValidTo(const Aws::Utils::DateTime &value)
void SetExpirationModel(const ExpirationModelType &value)
void SetEncryptedKeyMaterial(Aws::Utils::ByteBuffer &&value)
ImportKeyMaterialRequest & WithValidTo(const Aws::Utils::DateTime &value)
const Aws::Utils::ByteBuffer & GetImportToken() const
const Aws::Utils::DateTime & GetValidTo() const
ImportKeyMaterialRequest & WithKeyId(const char *value)
ImportKeyMaterialRequest & WithImportToken(const Aws::Utils::ByteBuffer &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:37
ImportKeyMaterialRequest & WithImportToken(Aws::Utils::ByteBuffer &&value)
JSON (JavaScript Object Notation).
ImportKeyMaterialRequest & WithKeyId(const Aws::String &value)