AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateKeyRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/location/LocationServiceRequest.h>
11#include <aws/location/LocationService_EXPORTS.h>
12#include <aws/location/model/ApiKeyRestrictions.h>
13
14#include <utility>
15
16namespace Aws {
17namespace LocationService {
18namespace Model {
19
23 public:
24 AWS_LOCATIONSERVICE_API CreateKeyRequest() = default;
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.
30 inline virtual const char* GetServiceRequestName() const override { return "CreateKey"; }
31
32 AWS_LOCATIONSERVICE_API Aws::String SerializePayload() const override;
33
35
42 inline const Aws::String& GetKeyName() const { return m_keyName; }
43 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
44 template <typename KeyNameT = Aws::String>
45 void SetKeyName(KeyNameT&& value) {
46 m_keyNameHasBeenSet = true;
47 m_keyName = std::forward<KeyNameT>(value);
48 }
49 template <typename KeyNameT = Aws::String>
50 CreateKeyRequest& WithKeyName(KeyNameT&& value) {
51 SetKeyName(std::forward<KeyNameT>(value));
52 return *this;
53 }
55
57
60 inline const ApiKeyRestrictions& GetRestrictions() const { return m_restrictions; }
61 inline bool RestrictionsHasBeenSet() const { return m_restrictionsHasBeenSet; }
62 template <typename RestrictionsT = ApiKeyRestrictions>
63 void SetRestrictions(RestrictionsT&& value) {
64 m_restrictionsHasBeenSet = true;
65 m_restrictions = std::forward<RestrictionsT>(value);
66 }
67 template <typename RestrictionsT = ApiKeyRestrictions>
68 CreateKeyRequest& WithRestrictions(RestrictionsT&& value) {
69 SetRestrictions(std::forward<RestrictionsT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::String& GetDescription() const { return m_description; }
79 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
80 template <typename DescriptionT = Aws::String>
81 void SetDescription(DescriptionT&& value) {
82 m_descriptionHasBeenSet = true;
83 m_description = std::forward<DescriptionT>(value);
84 }
85 template <typename DescriptionT = Aws::String>
86 CreateKeyRequest& WithDescription(DescriptionT&& value) {
87 SetDescription(std::forward<DescriptionT>(value));
88 return *this;
89 }
91
93
99 inline const Aws::Utils::DateTime& GetExpireTime() const { return m_expireTime; }
100 inline bool ExpireTimeHasBeenSet() const { return m_expireTimeHasBeenSet; }
101 template <typename ExpireTimeT = Aws::Utils::DateTime>
102 void SetExpireTime(ExpireTimeT&& value) {
103 m_expireTimeHasBeenSet = true;
104 m_expireTime = std::forward<ExpireTimeT>(value);
105 }
106 template <typename ExpireTimeT = Aws::Utils::DateTime>
107 CreateKeyRequest& WithExpireTime(ExpireTimeT&& value) {
108 SetExpireTime(std::forward<ExpireTimeT>(value));
109 return *this;
110 }
112
114
118 inline bool GetNoExpiry() const { return m_noExpiry; }
119 inline bool NoExpiryHasBeenSet() const { return m_noExpiryHasBeenSet; }
120 inline void SetNoExpiry(bool value) {
121 m_noExpiryHasBeenSet = true;
122 m_noExpiry = value;
123 }
124 inline CreateKeyRequest& WithNoExpiry(bool value) {
125 SetNoExpiry(value);
126 return *this;
127 }
129
131
142 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
143 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
144 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
145 void SetTags(TagsT&& value) {
146 m_tagsHasBeenSet = true;
147 m_tags = std::forward<TagsT>(value);
148 }
149 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
150 CreateKeyRequest& WithTags(TagsT&& value) {
151 SetTags(std::forward<TagsT>(value));
152 return *this;
153 }
154 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
155 CreateKeyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
156 m_tagsHasBeenSet = true;
157 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
158 return *this;
159 }
161 private:
162 Aws::String m_keyName;
163
164 ApiKeyRestrictions m_restrictions;
165
166 Aws::String m_description;
167
168 Aws::Utils::DateTime m_expireTime{};
169
170 bool m_noExpiry{false};
171
173 bool m_keyNameHasBeenSet = false;
174 bool m_restrictionsHasBeenSet = false;
175 bool m_descriptionHasBeenSet = false;
176 bool m_expireTimeHasBeenSet = false;
177 bool m_noExpiryHasBeenSet = false;
178 bool m_tagsHasBeenSet = false;
179};
180
181} // namespace Model
182} // namespace LocationService
183} // namespace Aws
CreateKeyRequest & WithTags(TagsT &&value)
AWS_LOCATIONSERVICE_API Aws::String SerializePayload() const override
CreateKeyRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateKeyRequest & WithExpireTime(ExpireTimeT &&value)
CreateKeyRequest & WithKeyName(KeyNameT &&value)
CreateKeyRequest & WithRestrictions(RestrictionsT &&value)
CreateKeyRequest & WithDescription(DescriptionT &&value)
const ApiKeyRestrictions & GetRestrictions() const
const Aws::Utils::DateTime & GetExpireTime() const
CreateKeyRequest & WithNoExpiry(bool value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
AWS_LOCATIONSERVICE_API CreateKeyRequest()=default
virtual const char * GetServiceRequestName() const override
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String