AWS SDK for C++  0.14.3
AWS SDK for C++
GenerateDataKeyWithoutPlaintextRequest.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>
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 
50  inline const Aws::String& GetKeyId() const{ return m_keyId; }
51 
62  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
63 
74  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
75 
86  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
87 
98  inline GenerateDataKeyWithoutPlaintextRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
99 
110  inline GenerateDataKeyWithoutPlaintextRequest& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
111 
122  inline GenerateDataKeyWithoutPlaintextRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
123 
128  inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
129 
134  inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
135 
140  inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
141 
146  inline GenerateDataKeyWithoutPlaintextRequest& WithEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetEncryptionContext(value); return *this;}
147 
152  inline GenerateDataKeyWithoutPlaintextRequest& WithEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetEncryptionContext(value); return *this;}
153 
158  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
159 
164  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
165 
170  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
171 
176  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
177 
182  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
183 
188  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
189 
194  inline GenerateDataKeyWithoutPlaintextRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
195 
200  inline const DataKeySpec& GetKeySpec() const{ return m_keySpec; }
201 
206  inline void SetKeySpec(const DataKeySpec& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
207 
212  inline void SetKeySpec(DataKeySpec&& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
213 
218  inline GenerateDataKeyWithoutPlaintextRequest& WithKeySpec(const DataKeySpec& value) { SetKeySpec(value); return *this;}
219 
224  inline GenerateDataKeyWithoutPlaintextRequest& WithKeySpec(DataKeySpec&& value) { SetKeySpec(value); return *this;}
225 
231  inline int GetNumberOfBytes() const{ return m_numberOfBytes; }
232 
238  inline void SetNumberOfBytes(int value) { m_numberOfBytesHasBeenSet = true; m_numberOfBytes = value; }
239 
245  inline GenerateDataKeyWithoutPlaintextRequest& WithNumberOfBytes(int value) { SetNumberOfBytes(value); return *this;}
246 
252  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
253 
259  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
260 
266  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
267 
273  inline GenerateDataKeyWithoutPlaintextRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
274 
280  inline GenerateDataKeyWithoutPlaintextRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(value); return *this;}
281 
287  inline GenerateDataKeyWithoutPlaintextRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
288 
294  inline GenerateDataKeyWithoutPlaintextRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
295 
301  inline GenerateDataKeyWithoutPlaintextRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
302 
303  private:
304  Aws::String m_keyId;
305  bool m_keyIdHasBeenSet;
306  Aws::Map<Aws::String, Aws::String> m_encryptionContext;
307  bool m_encryptionContextHasBeenSet;
308  DataKeySpec m_keySpec;
309  bool m_keySpecHasBeenSet;
310  int m_numberOfBytes;
311  bool m_numberOfBytesHasBeenSet;
312  Aws::Vector<Aws::String> m_grantTokens;
313  bool m_grantTokensHasBeenSet;
314  };
315 
316 } // namespace Model
317 } // namespace KMS
318 } // namespace Aws
GenerateDataKeyWithoutPlaintextRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyWithoutPlaintextRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
GenerateDataKeyWithoutPlaintextRequest & AddGrantTokens(const Aws::String &value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:63
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const char *key, Aws::String &&value)
GenerateDataKeyWithoutPlaintextRequest & WithKeyId(const char *value)
GenerateDataKeyWithoutPlaintextRequest & WithKeySpec(DataKeySpec &&value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
GenerateDataKeyWithoutPlaintextRequest & WithKeySpec(const DataKeySpec &value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(Aws::String &&key, const char *value)
GenerateDataKeyWithoutPlaintextRequest & WithKeyId(const Aws::String &value)
GenerateDataKeyWithoutPlaintextRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const char *key, const char *value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
GenerateDataKeyWithoutPlaintextRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
GenerateDataKeyWithoutPlaintextRequest & WithKeyId(Aws::String &&value)
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:37
GenerateDataKeyWithoutPlaintextRequest & WithNumberOfBytes(int value)
GenerateDataKeyWithoutPlaintextRequest & AddGrantTokens(Aws::String &&value)
GenerateDataKeyWithoutPlaintextRequest & AddGrantTokens(const char *value)
JSON (JavaScript Object Notation).
GenerateDataKeyWithoutPlaintextRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)