AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CachingConfig.h
1
6#pragma once
7#include <aws/appsync/AppSync_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace AppSync {
21namespace Model {
22
30 public:
31 AWS_APPSYNC_API CachingConfig() = default;
32 AWS_APPSYNC_API CachingConfig(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
41 inline long long GetTtl() const { return m_ttl; }
42 inline bool TtlHasBeenSet() const { return m_ttlHasBeenSet; }
43 inline void SetTtl(long long value) {
44 m_ttlHasBeenSet = true;
45 m_ttl = value;
46 }
47 inline CachingConfig& WithTtl(long long value) {
48 SetTtl(value);
49 return *this;
50 }
52
54
59 inline const Aws::Vector<Aws::String>& GetCachingKeys() const { return m_cachingKeys; }
60 inline bool CachingKeysHasBeenSet() const { return m_cachingKeysHasBeenSet; }
61 template <typename CachingKeysT = Aws::Vector<Aws::String>>
62 void SetCachingKeys(CachingKeysT&& value) {
63 m_cachingKeysHasBeenSet = true;
64 m_cachingKeys = std::forward<CachingKeysT>(value);
65 }
66 template <typename CachingKeysT = Aws::Vector<Aws::String>>
67 CachingConfig& WithCachingKeys(CachingKeysT&& value) {
68 SetCachingKeys(std::forward<CachingKeysT>(value));
69 return *this;
70 }
71 template <typename CachingKeysT = Aws::String>
72 CachingConfig& AddCachingKeys(CachingKeysT&& value) {
73 m_cachingKeysHasBeenSet = true;
74 m_cachingKeys.emplace_back(std::forward<CachingKeysT>(value));
75 return *this;
76 }
78 private:
79 long long m_ttl{0};
80
81 Aws::Vector<Aws::String> m_cachingKeys;
82 bool m_ttlHasBeenSet = false;
83 bool m_cachingKeysHasBeenSet = false;
84};
85
86} // namespace Model
87} // namespace AppSync
88} // namespace Aws
AWS_APPSYNC_API CachingConfig()=default
CachingConfig & WithCachingKeys(CachingKeysT &&value)
AWS_APPSYNC_API CachingConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetCachingKeys() const
void SetCachingKeys(CachingKeysT &&value)
AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const
CachingConfig & WithTtl(long long value)
AWS_APPSYNC_API CachingConfig(Aws::Utils::Json::JsonView jsonValue)
CachingConfig & AddCachingKeys(CachingKeysT &&value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue