AWS SDK for C++  0.12.9
AWS SDK for C++
GenerateDataKeyRequest.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 GenerateDataKeyRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
99 
110  inline GenerateDataKeyRequest& WithKeyId(Aws::String&& value) { SetKeyId(value); return *this;}
111 
122  inline GenerateDataKeyRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
123 
129  inline const Aws::Map<Aws::String, Aws::String>& GetEncryptionContext() const{ return m_encryptionContext; }
130 
136  inline void SetEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
137 
143  inline void SetEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext = value; }
144 
150  inline GenerateDataKeyRequest& WithEncryptionContext(const Aws::Map<Aws::String, Aws::String>& value) { SetEncryptionContext(value); return *this;}
151 
157  inline GenerateDataKeyRequest& WithEncryptionContext(Aws::Map<Aws::String, Aws::String>&& value) { SetEncryptionContext(value); return *this;}
158 
164  inline GenerateDataKeyRequest& AddEncryptionContext(const Aws::String& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
165 
171  inline GenerateDataKeyRequest& AddEncryptionContext(Aws::String&& key, const Aws::String& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
172 
178  inline GenerateDataKeyRequest& AddEncryptionContext(const Aws::String& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
179 
185  inline GenerateDataKeyRequest& AddEncryptionContext(Aws::String&& key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
186 
192  inline GenerateDataKeyRequest& AddEncryptionContext(const char* key, Aws::String&& value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
193 
199  inline GenerateDataKeyRequest& AddEncryptionContext(Aws::String&& key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
200 
206  inline GenerateDataKeyRequest& AddEncryptionContext(const char* key, const char* value) { m_encryptionContextHasBeenSet = true; m_encryptionContext[key] = value; return *this; }
207 
213  inline long GetNumberOfBytes() const{ return m_numberOfBytes; }
214 
220  inline void SetNumberOfBytes(long value) { m_numberOfBytesHasBeenSet = true; m_numberOfBytes = value; }
221 
227  inline GenerateDataKeyRequest& WithNumberOfBytes(long value) { SetNumberOfBytes(value); return *this;}
228 
233  inline const DataKeySpec& GetKeySpec() const{ return m_keySpec; }
234 
239  inline void SetKeySpec(const DataKeySpec& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
240 
245  inline void SetKeySpec(DataKeySpec&& value) { m_keySpecHasBeenSet = true; m_keySpec = value; }
246 
251  inline GenerateDataKeyRequest& WithKeySpec(const DataKeySpec& value) { SetKeySpec(value); return *this;}
252 
257  inline GenerateDataKeyRequest& WithKeySpec(DataKeySpec&& value) { SetKeySpec(value); return *this;}
258 
264  inline const Aws::Vector<Aws::String>& GetGrantTokens() const{ return m_grantTokens; }
265 
271  inline void SetGrantTokens(const Aws::Vector<Aws::String>& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
272 
278  inline void SetGrantTokens(Aws::Vector<Aws::String>&& value) { m_grantTokensHasBeenSet = true; m_grantTokens = value; }
279 
285  inline GenerateDataKeyRequest& WithGrantTokens(const Aws::Vector<Aws::String>& value) { SetGrantTokens(value); return *this;}
286 
292  inline GenerateDataKeyRequest& WithGrantTokens(Aws::Vector<Aws::String>&& value) { SetGrantTokens(value); return *this;}
293 
299  inline GenerateDataKeyRequest& AddGrantTokens(const Aws::String& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
300 
306  inline GenerateDataKeyRequest& AddGrantTokens(Aws::String&& value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
307 
313  inline GenerateDataKeyRequest& AddGrantTokens(const char* value) { m_grantTokensHasBeenSet = true; m_grantTokens.push_back(value); return *this; }
314 
315  private:
316  Aws::String m_keyId;
317  bool m_keyIdHasBeenSet;
318  Aws::Map<Aws::String, Aws::String> m_encryptionContext;
319  bool m_encryptionContextHasBeenSet;
320  long m_numberOfBytes;
321  bool m_numberOfBytesHasBeenSet;
322  DataKeySpec m_keySpec;
323  bool m_keySpecHasBeenSet;
324  Aws::Vector<Aws::String> m_grantTokens;
325  bool m_grantTokensHasBeenSet;
326  };
327 
328 } // namespace Model
329 } // namespace KMS
330 } // namespace Aws
GenerateDataKeyRequest & AddGrantTokens(Aws::String &&value)
GenerateDataKeyRequest & WithGrantTokens(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetGrantTokens() const
void SetEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
GenerateDataKeyRequest & WithKeySpec(const DataKeySpec &value)
GenerateDataKeyRequest & AddEncryptionContext(const char *key, Aws::String &&value)
GenerateDataKeyRequest & AddEncryptionContext(const Aws::String &key, Aws::String &&value)
GenerateDataKeyRequest & AddEncryptionContext(const Aws::String &key, const Aws::String &value)
GenerateDataKeyRequest & WithNumberOfBytes(long value)
GenerateDataKeyRequest & WithEncryptionContext(const Aws::Map< Aws::String, Aws::String > &value)
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
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
GenerateDataKeyRequest & AddGrantTokens(const char *value)
void SetEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
GenerateDataKeyRequest & WithGrantTokens(Aws::Vector< Aws::String > &&value)
GenerateDataKeyRequest & WithKeySpec(DataKeySpec &&value)
GenerateDataKeyRequest & WithKeyId(const Aws::String &value)
GenerateDataKeyRequest & AddEncryptionContext(Aws::String &&key, const Aws::String &value)
GenerateDataKeyRequest & WithEncryptionContext(Aws::Map< Aws::String, Aws::String > &&value)
void SetGrantTokens(Aws::Vector< Aws::String > &&value)
GenerateDataKeyRequest & AddEncryptionContext(const char *key, const char *value)
void SetKeySpec(const DataKeySpec &value)
void SetGrantTokens(const Aws::Vector< Aws::String > &value)
GenerateDataKeyRequest & AddEncryptionContext(Aws::String &&key, Aws::String &&value)
GenerateDataKeyRequest & WithKeyId(Aws::String &&value)
GenerateDataKeyRequest & AddGrantTokens(const Aws::String &value)
GenerateDataKeyRequest & WithKeyId(const char *value)
void SetKeyId(const Aws::String &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:34
GenerateDataKeyRequest & AddEncryptionContext(Aws::String &&key, const char *value)
JSON (JavaScript Object Notation).