AWS SDK for C++

AWS SDK for C++ Version 1.11.938

Loading...
Searching...
No Matches
Attribute.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/crt/cbor/Cbor.h>
9#include <aws/elb-proxy/ELBProxy_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Cbor {
16class CborValue;
17} // namespace Cbor
18} // namespace Utils
19namespace ELBProxy {
20namespace Model {
21
27class Attribute {
28 public:
29 AWS_ELBPROXY_API Attribute() = default;
30 AWS_ELBPROXY_API Attribute(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
31 AWS_ELBPROXY_API Attribute& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
32 AWS_ELBPROXY_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
33
35
38 inline const Aws::String& GetKey() const { return m_key; }
39 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
40 template <typename KeyT = Aws::String>
41 void SetKey(KeyT&& value) {
42 m_keyHasBeenSet = true;
43 m_key = std::forward<KeyT>(value);
44 }
45 template <typename KeyT = Aws::String>
46 Attribute& WithKey(KeyT&& value) {
47 SetKey(std::forward<KeyT>(value));
48 return *this;
49 }
51
53
56 inline const Aws::String& GetValue() const { return m_value; }
57 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
58 template <typename ValueT = Aws::String>
59 void SetValue(ValueT&& value) {
60 m_valueHasBeenSet = true;
61 m_value = std::forward<ValueT>(value);
62 }
63 template <typename ValueT = Aws::String>
64 Attribute& WithValue(ValueT&& value) {
65 SetValue(std::forward<ValueT>(value));
66 return *this;
67 }
69 private:
70 Aws::String m_key;
71
72 Aws::String m_value;
73 bool m_keyHasBeenSet = false;
74 bool m_valueHasBeenSet = false;
75};
76
77} // namespace Model
78} // namespace ELBProxy
79} // namespace Aws
AWS_ELBPROXY_API Attribute(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
void SetValue(ValueT &&value)
Definition Attribute.h:59
const Aws::String & GetValue() const
Definition Attribute.h:56
void SetKey(KeyT &&value)
Definition Attribute.h:41
AWS_ELBPROXY_API Attribute & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_ELBPROXY_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
Attribute & WithKey(KeyT &&value)
Definition Attribute.h:46
Attribute & WithValue(ValueT &&value)
Definition Attribute.h:64
AWS_ELBPROXY_API Attribute()=default
const Aws::String & GetKey() const
Definition Attribute.h:38
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String