1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/kms/KMS_EXPORTS.h>
8 #include <aws/kms/KMSRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace KMS
15 {
16 namespace Model
17 {
18 
19   /**
20    */
21   class AWS_KMS_API GenerateRandomRequest : public KMSRequest
22   {
23   public:
24     GenerateRandomRequest();
25 
26     // Service request name is the Operation name which will send this request out,
27     // each operation should has unique request name, so that we can get operation's name from this request.
28     // Note: this is not true for response, multiple operations may have the same response name,
29     // so we can not get operation's name from response.
GetServiceRequestName()30     inline virtual const char* GetServiceRequestName() const override { return "GenerateRandom"; }
31 
32     Aws::String SerializePayload() const override;
33 
34     Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
35 
36 
37     /**
38      * <p>The length of the byte string.</p>
39      */
GetNumberOfBytes()40     inline int GetNumberOfBytes() const{ return m_numberOfBytes; }
41 
42     /**
43      * <p>The length of the byte string.</p>
44      */
NumberOfBytesHasBeenSet()45     inline bool NumberOfBytesHasBeenSet() const { return m_numberOfBytesHasBeenSet; }
46 
47     /**
48      * <p>The length of the byte string.</p>
49      */
SetNumberOfBytes(int value)50     inline void SetNumberOfBytes(int value) { m_numberOfBytesHasBeenSet = true; m_numberOfBytes = value; }
51 
52     /**
53      * <p>The length of the byte string.</p>
54      */
WithNumberOfBytes(int value)55     inline GenerateRandomRequest& WithNumberOfBytes(int value) { SetNumberOfBytes(value); return *this;}
56 
57 
58     /**
59      * <p>Generates the random byte string in the CloudHSM cluster that is associated
60      * with the specified <a
61      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
62      * key store</a>. To find the ID of a custom key store, use the
63      * <a>DescribeCustomKeyStores</a> operation.</p>
64      */
GetCustomKeyStoreId()65     inline const Aws::String& GetCustomKeyStoreId() const{ return m_customKeyStoreId; }
66 
67     /**
68      * <p>Generates the random byte string in the CloudHSM cluster that is associated
69      * with the specified <a
70      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
71      * key store</a>. To find the ID of a custom key store, use the
72      * <a>DescribeCustomKeyStores</a> operation.</p>
73      */
CustomKeyStoreIdHasBeenSet()74     inline bool CustomKeyStoreIdHasBeenSet() const { return m_customKeyStoreIdHasBeenSet; }
75 
76     /**
77      * <p>Generates the random byte string in the CloudHSM cluster that is associated
78      * with the specified <a
79      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
80      * key store</a>. To find the ID of a custom key store, use the
81      * <a>DescribeCustomKeyStores</a> operation.</p>
82      */
SetCustomKeyStoreId(const Aws::String & value)83     inline void SetCustomKeyStoreId(const Aws::String& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = value; }
84 
85     /**
86      * <p>Generates the random byte string in the CloudHSM cluster that is associated
87      * with the specified <a
88      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
89      * key store</a>. To find the ID of a custom key store, use the
90      * <a>DescribeCustomKeyStores</a> operation.</p>
91      */
SetCustomKeyStoreId(Aws::String && value)92     inline void SetCustomKeyStoreId(Aws::String&& value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId = std::move(value); }
93 
94     /**
95      * <p>Generates the random byte string in the CloudHSM cluster that is associated
96      * with the specified <a
97      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
98      * key store</a>. To find the ID of a custom key store, use the
99      * <a>DescribeCustomKeyStores</a> operation.</p>
100      */
SetCustomKeyStoreId(const char * value)101     inline void SetCustomKeyStoreId(const char* value) { m_customKeyStoreIdHasBeenSet = true; m_customKeyStoreId.assign(value); }
102 
103     /**
104      * <p>Generates the random byte string in the CloudHSM cluster that is associated
105      * with the specified <a
106      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
107      * key store</a>. To find the ID of a custom key store, use the
108      * <a>DescribeCustomKeyStores</a> operation.</p>
109      */
WithCustomKeyStoreId(const Aws::String & value)110     inline GenerateRandomRequest& WithCustomKeyStoreId(const Aws::String& value) { SetCustomKeyStoreId(value); return *this;}
111 
112     /**
113      * <p>Generates the random byte string in the CloudHSM cluster that is associated
114      * with the specified <a
115      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
116      * key store</a>. To find the ID of a custom key store, use the
117      * <a>DescribeCustomKeyStores</a> operation.</p>
118      */
WithCustomKeyStoreId(Aws::String && value)119     inline GenerateRandomRequest& WithCustomKeyStoreId(Aws::String&& value) { SetCustomKeyStoreId(std::move(value)); return *this;}
120 
121     /**
122      * <p>Generates the random byte string in the CloudHSM cluster that is associated
123      * with the specified <a
124      * href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom
125      * key store</a>. To find the ID of a custom key store, use the
126      * <a>DescribeCustomKeyStores</a> operation.</p>
127      */
WithCustomKeyStoreId(const char * value)128     inline GenerateRandomRequest& WithCustomKeyStoreId(const char* value) { SetCustomKeyStoreId(value); return *this;}
129 
130   private:
131 
132     int m_numberOfBytes;
133     bool m_numberOfBytesHasBeenSet;
134 
135     Aws::String m_customKeyStoreId;
136     bool m_customKeyStoreIdHasBeenSet;
137   };
138 
139 } // namespace Model
140 } // namespace KMS
141 } // namespace Aws
142