AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
CreateKeyRequest.h
1
6#pragma once
7#include <aws/location/LocationService_EXPORTS.h>
8#include <aws/location/LocationServiceRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/location/model/ApiKeyRestrictions.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <utility>
14
15namespace Aws
16{
17namespace LocationService
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_LOCATIONSERVICE_API CreateKeyRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateKey"; }
34
35 AWS_LOCATIONSERVICE_API Aws::String SerializePayload() const override;
36
37
39
46 inline const Aws::String& GetKeyName() const { return m_keyName; }
47 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
48 template<typename KeyNameT = Aws::String>
49 void SetKeyName(KeyNameT&& value) { m_keyNameHasBeenSet = true; m_keyName = std::forward<KeyNameT>(value); }
50 template<typename KeyNameT = Aws::String>
51 CreateKeyRequest& WithKeyName(KeyNameT&& value) { SetKeyName(std::forward<KeyNameT>(value)); return *this;}
53
55
58 inline const ApiKeyRestrictions& GetRestrictions() const { return m_restrictions; }
59 inline bool RestrictionsHasBeenSet() const { return m_restrictionsHasBeenSet; }
60 template<typename RestrictionsT = ApiKeyRestrictions>
61 void SetRestrictions(RestrictionsT&& value) { m_restrictionsHasBeenSet = true; m_restrictions = std::forward<RestrictionsT>(value); }
62 template<typename RestrictionsT = ApiKeyRestrictions>
63 CreateKeyRequest& WithRestrictions(RestrictionsT&& value) { SetRestrictions(std::forward<RestrictionsT>(value)); return *this;}
65
67
70 inline const Aws::String& GetDescription() const { return m_description; }
71 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
72 template<typename DescriptionT = Aws::String>
73 void SetDescription(DescriptionT&& value) { m_descriptionHasBeenSet = true; m_description = std::forward<DescriptionT>(value); }
74 template<typename DescriptionT = Aws::String>
75 CreateKeyRequest& WithDescription(DescriptionT&& value) { SetDescription(std::forward<DescriptionT>(value)); return *this;}
77
79
85 inline const Aws::Utils::DateTime& GetExpireTime() const { return m_expireTime; }
86 inline bool ExpireTimeHasBeenSet() const { return m_expireTimeHasBeenSet; }
87 template<typename ExpireTimeT = Aws::Utils::DateTime>
88 void SetExpireTime(ExpireTimeT&& value) { m_expireTimeHasBeenSet = true; m_expireTime = std::forward<ExpireTimeT>(value); }
89 template<typename ExpireTimeT = Aws::Utils::DateTime>
90 CreateKeyRequest& WithExpireTime(ExpireTimeT&& value) { SetExpireTime(std::forward<ExpireTimeT>(value)); return *this;}
92
94
98 inline bool GetNoExpiry() const { return m_noExpiry; }
99 inline bool NoExpiryHasBeenSet() const { return m_noExpiryHasBeenSet; }
100 inline void SetNoExpiry(bool value) { m_noExpiryHasBeenSet = true; m_noExpiry = value; }
101 inline CreateKeyRequest& WithNoExpiry(bool value) { SetNoExpiry(value); return *this;}
103
105
116 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
117 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
118 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
119 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
120 template<typename TagsT = Aws::Map<Aws::String, Aws::String>>
121 CreateKeyRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
122 template<typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
123 CreateKeyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
124 m_tagsHasBeenSet = true; m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value)); return *this;
125 }
127 private:
128
129 Aws::String m_keyName;
130 bool m_keyNameHasBeenSet = false;
131
132 ApiKeyRestrictions m_restrictions;
133 bool m_restrictionsHasBeenSet = false;
134
135 Aws::String m_description;
136 bool m_descriptionHasBeenSet = false;
137
138 Aws::Utils::DateTime m_expireTime{};
139 bool m_expireTimeHasBeenSet = false;
140
141 bool m_noExpiry{false};
142 bool m_noExpiryHasBeenSet = false;
143
145 bool m_tagsHasBeenSet = false;
146 };
147
148} // namespace Model
149} // namespace LocationService
150} // 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