AWS SDK for C++

AWS SDK for C++ Version 1.11.786

Loading...
Searching...
No Matches
CreateSnapshotRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/elasticache/ElastiCacheRequest.h>
10#include <aws/elasticache/ElastiCache_EXPORTS.h>
11#include <aws/elasticache/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace ElastiCache {
17namespace Model {
18
26 public:
27 AWS_ELASTICACHE_API CreateSnapshotRequest() = 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 "CreateSnapshot"; }
34
35 AWS_ELASTICACHE_API Aws::String SerializePayload() const override;
36
37 protected:
38 AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
39
40 public:
42
46 inline const Aws::String& GetReplicationGroupId() const { return m_replicationGroupId; }
47 inline bool ReplicationGroupIdHasBeenSet() const { return m_replicationGroupIdHasBeenSet; }
48 template <typename ReplicationGroupIdT = Aws::String>
49 void SetReplicationGroupId(ReplicationGroupIdT&& value) {
50 m_replicationGroupIdHasBeenSet = true;
51 m_replicationGroupId = std::forward<ReplicationGroupIdT>(value);
52 }
53 template <typename ReplicationGroupIdT = Aws::String>
54 CreateSnapshotRequest& WithReplicationGroupId(ReplicationGroupIdT&& value) {
55 SetReplicationGroupId(std::forward<ReplicationGroupIdT>(value));
56 return *this;
57 }
59
61
65 inline const Aws::String& GetCacheClusterId() const { return m_cacheClusterId; }
66 inline bool CacheClusterIdHasBeenSet() const { return m_cacheClusterIdHasBeenSet; }
67 template <typename CacheClusterIdT = Aws::String>
68 void SetCacheClusterId(CacheClusterIdT&& value) {
69 m_cacheClusterIdHasBeenSet = true;
70 m_cacheClusterId = std::forward<CacheClusterIdT>(value);
71 }
72 template <typename CacheClusterIdT = Aws::String>
73 CreateSnapshotRequest& WithCacheClusterId(CacheClusterIdT&& value) {
74 SetCacheClusterId(std::forward<CacheClusterIdT>(value));
75 return *this;
76 }
78
80
84 inline const Aws::String& GetSnapshotName() const { return m_snapshotName; }
85 inline bool SnapshotNameHasBeenSet() const { return m_snapshotNameHasBeenSet; }
86 template <typename SnapshotNameT = Aws::String>
87 void SetSnapshotName(SnapshotNameT&& value) {
88 m_snapshotNameHasBeenSet = true;
89 m_snapshotName = std::forward<SnapshotNameT>(value);
90 }
91 template <typename SnapshotNameT = Aws::String>
92 CreateSnapshotRequest& WithSnapshotName(SnapshotNameT&& value) {
93 SetSnapshotName(std::forward<SnapshotNameT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::String& GetKmsKeyId() const { return m_kmsKeyId; }
103 inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
104 template <typename KmsKeyIdT = Aws::String>
105 void SetKmsKeyId(KmsKeyIdT&& value) {
106 m_kmsKeyIdHasBeenSet = true;
107 m_kmsKeyId = std::forward<KmsKeyIdT>(value);
108 }
109 template <typename KmsKeyIdT = Aws::String>
111 SetKmsKeyId(std::forward<KmsKeyIdT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
122 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
123 template <typename TagsT = Aws::Vector<Tag>>
124 void SetTags(TagsT&& value) {
125 m_tagsHasBeenSet = true;
126 m_tags = std::forward<TagsT>(value);
127 }
128 template <typename TagsT = Aws::Vector<Tag>>
130 SetTags(std::forward<TagsT>(value));
131 return *this;
132 }
133 template <typename TagsT = Tag>
135 m_tagsHasBeenSet = true;
136 m_tags.emplace_back(std::forward<TagsT>(value));
137 return *this;
138 }
140 private:
141 Aws::String m_replicationGroupId;
142
143 Aws::String m_cacheClusterId;
144
145 Aws::String m_snapshotName;
146
147 Aws::String m_kmsKeyId;
148
149 Aws::Vector<Tag> m_tags;
150 bool m_replicationGroupIdHasBeenSet = false;
151 bool m_cacheClusterIdHasBeenSet = false;
152 bool m_snapshotNameHasBeenSet = false;
153 bool m_kmsKeyIdHasBeenSet = false;
154 bool m_tagsHasBeenSet = false;
155};
156
157} // namespace Model
158} // namespace ElastiCache
159} // namespace Aws
CreateSnapshotRequest & WithTags(TagsT &&value)
AWS_ELASTICACHE_API CreateSnapshotRequest()=default
CreateSnapshotRequest & WithSnapshotName(SnapshotNameT &&value)
CreateSnapshotRequest & WithReplicationGroupId(ReplicationGroupIdT &&value)
virtual const char * GetServiceRequestName() const override
CreateSnapshotRequest & WithCacheClusterId(CacheClusterIdT &&value)
CreateSnapshotRequest & WithKmsKeyId(KmsKeyIdT &&value)
CreateSnapshotRequest & AddTags(TagsT &&value)
void SetReplicationGroupId(ReplicationGroupIdT &&value)
AWS_ELASTICACHE_API Aws::String SerializePayload() const override
AWS_ELASTICACHE_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector