AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateApiCacheRequest.h
1
6#pragma once
7#include <aws/appsync/AppSyncRequest.h>
8#include <aws/appsync/AppSync_EXPORTS.h>
9#include <aws/appsync/model/ApiCacheType.h>
10#include <aws/appsync/model/ApiCachingBehavior.h>
11#include <aws/appsync/model/CacheHealthMetricsConfig.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13
14#include <utility>
15
16namespace Aws {
17namespace AppSync {
18namespace Model {
19
27 public:
28 AWS_APPSYNC_API CreateApiCacheRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateApiCache"; }
35
36 AWS_APPSYNC_API Aws::String SerializePayload() const override;
37
39
42 inline const Aws::String& GetApiId() const { return m_apiId; }
43 inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; }
44 template <typename ApiIdT = Aws::String>
45 void SetApiId(ApiIdT&& value) {
46 m_apiIdHasBeenSet = true;
47 m_apiId = std::forward<ApiIdT>(value);
48 }
49 template <typename ApiIdT = Aws::String>
51 SetApiId(std::forward<ApiIdT>(value));
52 return *this;
53 }
55
57
61 inline long long GetTtl() const { return m_ttl; }
62 inline bool TtlHasBeenSet() const { return m_ttlHasBeenSet; }
63 inline void SetTtl(long long value) {
64 m_ttlHasBeenSet = true;
65 m_ttl = value;
66 }
67 inline CreateApiCacheRequest& WithTtl(long long value) {
68 SetTtl(value);
69 return *this;
70 }
72
74
82 inline ApiCachingBehavior GetApiCachingBehavior() const { return m_apiCachingBehavior; }
83 inline bool ApiCachingBehaviorHasBeenSet() const { return m_apiCachingBehaviorHasBeenSet; }
85 m_apiCachingBehaviorHasBeenSet = true;
86 m_apiCachingBehavior = value;
87 }
90 return *this;
91 }
93
95
112 inline ApiCacheType GetType() const { return m_type; }
113 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
114 inline void SetType(ApiCacheType value) {
115 m_typeHasBeenSet = true;
116 m_type = value;
117 }
119 SetType(value);
120 return *this;
121 }
123
125
135 inline CacheHealthMetricsConfig GetHealthMetricsConfig() const { return m_healthMetricsConfig; }
136 inline bool HealthMetricsConfigHasBeenSet() const { return m_healthMetricsConfigHasBeenSet; }
138 m_healthMetricsConfigHasBeenSet = true;
139 m_healthMetricsConfig = value;
140 }
143 return *this;
144 }
146 private:
147 Aws::String m_apiId;
148
149 long long m_ttl{0};
150
152
154
156 bool m_apiIdHasBeenSet = false;
157 bool m_ttlHasBeenSet = false;
158 bool m_apiCachingBehaviorHasBeenSet = false;
159 bool m_typeHasBeenSet = false;
160 bool m_healthMetricsConfigHasBeenSet = false;
161};
162
163} // namespace Model
164} // namespace AppSync
165} // namespace Aws
CreateApiCacheRequest & WithHealthMetricsConfig(CacheHealthMetricsConfig value)
CreateApiCacheRequest & WithApiId(ApiIdT &&value)
void SetHealthMetricsConfig(CacheHealthMetricsConfig value)
virtual const char * GetServiceRequestName() const override
CreateApiCacheRequest & WithApiCachingBehavior(ApiCachingBehavior value)
AWS_APPSYNC_API CreateApiCacheRequest()=default
CreateApiCacheRequest & WithTtl(long long value)
AWS_APPSYNC_API Aws::String SerializePayload() const override
CacheHealthMetricsConfig GetHealthMetricsConfig() const
CreateApiCacheRequest & WithType(ApiCacheType value)
void SetApiCachingBehavior(ApiCachingBehavior value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String