AWS SDK for C++  0.14.3
AWS SDK for C++
ThingAttribute.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/iot/IoT_EXPORTS.h>
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Json
25 {
26  class JsonValue;
27 } // namespace Json
28 } // namespace Utils
29 namespace IoT
30 {
31 namespace Model
32 {
33 
39  {
40  public:
43  ThingAttribute& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetThingName() const{ return m_thingName; }
50 
54  inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
55 
59  inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
60 
64  inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); }
65 
69  inline ThingAttribute& WithThingName(const Aws::String& value) { SetThingName(value); return *this;}
70 
74  inline ThingAttribute& WithThingName(Aws::String&& value) { SetThingName(value); return *this;}
75 
79  inline ThingAttribute& WithThingName(const char* value) { SetThingName(value); return *this;}
80 
84  inline const Aws::String& GetThingTypeName() const{ return m_thingTypeName; }
85 
89  inline void SetThingTypeName(const Aws::String& value) { m_thingTypeNameHasBeenSet = true; m_thingTypeName = value; }
90 
94  inline void SetThingTypeName(Aws::String&& value) { m_thingTypeNameHasBeenSet = true; m_thingTypeName = value; }
95 
99  inline void SetThingTypeName(const char* value) { m_thingTypeNameHasBeenSet = true; m_thingTypeName.assign(value); }
100 
104  inline ThingAttribute& WithThingTypeName(const Aws::String& value) { SetThingTypeName(value); return *this;}
105 
109  inline ThingAttribute& WithThingTypeName(Aws::String&& value) { SetThingTypeName(value); return *this;}
110 
114  inline ThingAttribute& WithThingTypeName(const char* value) { SetThingTypeName(value); return *this;}
115 
119  inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; }
120 
124  inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
125 
129  inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = value; }
130 
134  inline ThingAttribute& WithAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetAttributes(value); return *this;}
135 
139  inline ThingAttribute& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(value); return *this;}
140 
144  inline ThingAttribute& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
145 
149  inline ThingAttribute& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
150 
154  inline ThingAttribute& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
155 
159  inline ThingAttribute& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
160 
164  inline ThingAttribute& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
165 
169  inline ThingAttribute& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
170 
174  inline ThingAttribute& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
175 
179  inline long long GetVersion() const{ return m_version; }
180 
184  inline void SetVersion(long long value) { m_versionHasBeenSet = true; m_version = value; }
185 
189  inline ThingAttribute& WithVersion(long long value) { SetVersion(value); return *this;}
190 
191  private:
192  Aws::String m_thingName;
193  bool m_thingNameHasBeenSet;
194  Aws::String m_thingTypeName;
195  bool m_thingTypeNameHasBeenSet;
197  bool m_attributesHasBeenSet;
198  long long m_version;
199  bool m_versionHasBeenSet;
200  };
201 
202 } // namespace Model
203 } // namespace IoT
204 } // namespace Aws
ThingAttribute & WithThingTypeName(Aws::String &&value)
ThingAttribute & WithThingTypeName(const Aws::String &value)
const Aws::String & GetThingName() const
ThingAttribute & AddAttributes(Aws::String &&key, const Aws::String &value)
void SetThingName(const Aws::String &value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
ThingAttribute & WithAttributes(const Aws::Map< Aws::String, Aws::String > &value)
ThingAttribute & AddAttributes(Aws::String &&key, Aws::String &&value)
ThingAttribute & WithThingName(const Aws::String &value)
void SetVersion(long long value)
void SetThingName(Aws::String &&value)
#define AWS_IOT_API
Definition: IoT_EXPORTS.h:37
void SetAttributes(Aws::Map< Aws::String, Aws::String > &&value)
const Aws::String & GetThingTypeName() const
ThingAttribute & WithAttributes(Aws::Map< Aws::String, Aws::String > &&value)
void SetThingTypeName(const char *value)
ThingAttribute & AddAttributes(Aws::String &&key, const char *value)
ThingAttribute & AddAttributes(const Aws::String &key, const Aws::String &value)
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
void SetThingTypeName(const Aws::String &value)
void SetThingTypeName(Aws::String &&value)
ThingAttribute & AddAttributes(const char *key, Aws::String &&value)
void SetAttributes(const Aws::Map< Aws::String, Aws::String > &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
ThingAttribute & WithVersion(long long value)
ThingAttribute & WithThingTypeName(const char *value)
ThingAttribute & AddAttributes(const Aws::String &key, Aws::String &&value)
void SetThingName(const char *value)
ThingAttribute & AddAttributes(const char *key, const char *value)
ThingAttribute & WithThingName(const char *value)
JSON (JavaScript Object Notation).
ThingAttribute & WithThingName(Aws::String &&value)