AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
KeyValue.h
1
6#pragma once
7#include <aws/backup/Backup_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace Backup {
20namespace Model {
21
29class KeyValue {
30 public:
31 AWS_BACKUP_API KeyValue() = default;
32 AWS_BACKUP_API KeyValue(Aws::Utils::Json::JsonView jsonValue);
33 AWS_BACKUP_API KeyValue& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
43 inline const Aws::String& GetKey() const { return m_key; }
44 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
45 template <typename KeyT = Aws::String>
46 void SetKey(KeyT&& value) {
47 m_keyHasBeenSet = true;
48 m_key = std::forward<KeyT>(value);
49 }
50 template <typename KeyT = Aws::String>
51 KeyValue& WithKey(KeyT&& value) {
52 SetKey(std::forward<KeyT>(value));
53 return *this;
54 }
56
58
62 inline const Aws::String& GetValue() const { return m_value; }
63 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
64 template <typename ValueT = Aws::String>
65 void SetValue(ValueT&& value) {
66 m_valueHasBeenSet = true;
67 m_value = std::forward<ValueT>(value);
68 }
69 template <typename ValueT = Aws::String>
70 KeyValue& WithValue(ValueT&& value) {
71 SetValue(std::forward<ValueT>(value));
72 return *this;
73 }
75 private:
76 Aws::String m_key;
77
78 Aws::String m_value;
79 bool m_keyHasBeenSet = false;
80 bool m_valueHasBeenSet = false;
81};
82
83} // namespace Model
84} // namespace Backup
85} // namespace Aws
KeyValue & WithValue(ValueT &&value)
Definition KeyValue.h:70
AWS_BACKUP_API KeyValue()=default
void SetKey(KeyT &&value)
Definition KeyValue.h:46
const Aws::String & GetKey() const
Definition KeyValue.h:43
AWS_BACKUP_API KeyValue(Aws::Utils::Json::JsonView jsonValue)
KeyValue & WithKey(KeyT &&value)
Definition KeyValue.h:51
bool ValueHasBeenSet() const
Definition KeyValue.h:63
void SetValue(ValueT &&value)
Definition KeyValue.h:65
const Aws::String & GetValue() const
Definition KeyValue.h:62
AWS_BACKUP_API KeyValue & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue