AWS SDK for C++

AWS SDK for C++ Version 1.11.763

Loading...
Searching...
No Matches
ThingAttribute.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/iot/IoT_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace IoT {
21namespace Model {
22
30 public:
31 AWS_IOT_API ThingAttribute() = default;
35
37
40 inline const Aws::String& GetThingName() const { return m_thingName; }
41 inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
42 template <typename ThingNameT = Aws::String>
43 void SetThingName(ThingNameT&& value) {
44 m_thingNameHasBeenSet = true;
45 m_thingName = std::forward<ThingNameT>(value);
46 }
47 template <typename ThingNameT = Aws::String>
48 ThingAttribute& WithThingName(ThingNameT&& value) {
49 SetThingName(std::forward<ThingNameT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetThingTypeName() const { return m_thingTypeName; }
59 inline bool ThingTypeNameHasBeenSet() const { return m_thingTypeNameHasBeenSet; }
60 template <typename ThingTypeNameT = Aws::String>
61 void SetThingTypeName(ThingTypeNameT&& value) {
62 m_thingTypeNameHasBeenSet = true;
63 m_thingTypeName = std::forward<ThingTypeNameT>(value);
64 }
65 template <typename ThingTypeNameT = Aws::String>
66 ThingAttribute& WithThingTypeName(ThingTypeNameT&& value) {
67 SetThingTypeName(std::forward<ThingTypeNameT>(value));
68 return *this;
69 }
71
73
76 inline const Aws::String& GetThingArn() const { return m_thingArn; }
77 inline bool ThingArnHasBeenSet() const { return m_thingArnHasBeenSet; }
78 template <typename ThingArnT = Aws::String>
79 void SetThingArn(ThingArnT&& value) {
80 m_thingArnHasBeenSet = true;
81 m_thingArn = std::forward<ThingArnT>(value);
82 }
83 template <typename ThingArnT = Aws::String>
84 ThingAttribute& WithThingArn(ThingArnT&& value) {
85 SetThingArn(std::forward<ThingArnT>(value));
86 return *this;
87 }
89
91
94 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
95 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
96 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
97 void SetAttributes(AttributesT&& value) {
98 m_attributesHasBeenSet = true;
99 m_attributes = std::forward<AttributesT>(value);
100 }
101 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
102 ThingAttribute& WithAttributes(AttributesT&& value) {
103 SetAttributes(std::forward<AttributesT>(value));
104 return *this;
105 }
106 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
107 ThingAttribute& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
108 m_attributesHasBeenSet = true;
109 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
110 return *this;
111 }
113
115
118 inline long long GetVersion() const { return m_version; }
119 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
120 inline void SetVersion(long long value) {
121 m_versionHasBeenSet = true;
122 m_version = value;
123 }
124 inline ThingAttribute& WithVersion(long long value) {
125 SetVersion(value);
126 return *this;
127 }
129 private:
130 Aws::String m_thingName;
131
132 Aws::String m_thingTypeName;
133
134 Aws::String m_thingArn;
135
137
138 long long m_version{0};
139 bool m_thingNameHasBeenSet = false;
140 bool m_thingTypeNameHasBeenSet = false;
141 bool m_thingArnHasBeenSet = false;
142 bool m_attributesHasBeenSet = false;
143 bool m_versionHasBeenSet = false;
144};
145
146} // namespace Model
147} // namespace IoT
148} // namespace Aws
ThingAttribute & WithThingName(ThingNameT &&value)
ThingAttribute & WithAttributes(AttributesT &&value)
ThingAttribute & WithThingArn(ThingArnT &&value)
void SetAttributes(AttributesT &&value)
AWS_IOT_API ThingAttribute(Aws::Utils::Json::JsonView jsonValue)
void SetThingName(ThingNameT &&value)
const Aws::String & GetThingName() const
const Aws::String & GetThingArn() const
void SetThingArn(ThingArnT &&value)
void SetThingTypeName(ThingTypeNameT &&value)
ThingAttribute & WithThingTypeName(ThingTypeNameT &&value)
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
AWS_IOT_API ThingAttribute & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_IOT_API ThingAttribute()=default
const Aws::String & GetThingTypeName() const
ThingAttribute & WithVersion(long long value)
void SetVersion(long long value)
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
ThingAttribute & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue