AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
KeyValuesPair.h
1
6#pragma once
7#include <aws/batch/Batch_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 Batch {
21namespace Model {
22
32 public:
33 AWS_BATCH_API KeyValuesPair() = default;
34 AWS_BATCH_API KeyValuesPair(Aws::Utils::Json::JsonView jsonValue);
36 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
42 inline const Aws::String& GetName() const { return m_name; }
43 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
44 template <typename NameT = Aws::String>
45 void SetName(NameT&& value) {
46 m_nameHasBeenSet = true;
47 m_name = std::forward<NameT>(value);
48 }
49 template <typename NameT = Aws::String>
50 KeyValuesPair& WithName(NameT&& value) {
51 SetName(std::forward<NameT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Vector<Aws::String>& GetValues() const { return m_values; }
61 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
62 template <typename ValuesT = Aws::Vector<Aws::String>>
63 void SetValues(ValuesT&& value) {
64 m_valuesHasBeenSet = true;
65 m_values = std::forward<ValuesT>(value);
66 }
67 template <typename ValuesT = Aws::Vector<Aws::String>>
68 KeyValuesPair& WithValues(ValuesT&& value) {
69 SetValues(std::forward<ValuesT>(value));
70 return *this;
71 }
72 template <typename ValuesT = Aws::String>
73 KeyValuesPair& AddValues(ValuesT&& value) {
74 m_valuesHasBeenSet = true;
75 m_values.emplace_back(std::forward<ValuesT>(value));
76 return *this;
77 }
79 private:
80 Aws::String m_name;
81
83 bool m_nameHasBeenSet = false;
84 bool m_valuesHasBeenSet = false;
85};
86
87} // namespace Model
88} // namespace Batch
89} // namespace Aws
KeyValuesPair & AddValues(ValuesT &&value)
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
KeyValuesPair & WithValues(ValuesT &&value)
void SetValues(ValuesT &&value)
AWS_BATCH_API KeyValuesPair()=default
AWS_BATCH_API KeyValuesPair(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetValues() const
AWS_BATCH_API KeyValuesPair & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetName() const
KeyValuesPair & WithName(NameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue