/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

The attribute payload.

See Also:

AWS * API Reference

*/ class AttributePayload { public: AWS_IOT_API AttributePayload(); AWS_IOT_API AttributePayload(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API AttributePayload& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline const Aws::Map& GetAttributes() const{ return m_attributes; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline void SetAttributes(const Aws::Map& value) { m_attributesHasBeenSet = true; m_attributes = value; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline void SetAttributes(Aws::Map&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& WithAttributes(const Aws::Map& value) { SetAttributes(value); return *this;} /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& WithAttributes(Aws::Map&& value) { SetAttributes(std::move(value)); return *this;} /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; } /** *

A JSON string containing up to three key-value pair in JSON format. For * example:

{\"attributes\":{\"string1\":\"string2\"}}

*/ inline AttributePayload& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; } /** *

Specifies whether the list of attributes provided in the * AttributePayload is merged with the attributes stored in the * registry, instead of overwriting them.

To remove an attribute, call * UpdateThing with an empty attribute value.

The * merge attribute is only valid when calling UpdateThing * or UpdateThingGroup.

*/ inline bool GetMerge() const{ return m_merge; } /** *

Specifies whether the list of attributes provided in the * AttributePayload is merged with the attributes stored in the * registry, instead of overwriting them.

To remove an attribute, call * UpdateThing with an empty attribute value.

The * merge attribute is only valid when calling UpdateThing * or UpdateThingGroup.

*/ inline bool MergeHasBeenSet() const { return m_mergeHasBeenSet; } /** *

Specifies whether the list of attributes provided in the * AttributePayload is merged with the attributes stored in the * registry, instead of overwriting them.

To remove an attribute, call * UpdateThing with an empty attribute value.

The * merge attribute is only valid when calling UpdateThing * or UpdateThingGroup.

*/ inline void SetMerge(bool value) { m_mergeHasBeenSet = true; m_merge = value; } /** *

Specifies whether the list of attributes provided in the * AttributePayload is merged with the attributes stored in the * registry, instead of overwriting them.

To remove an attribute, call * UpdateThing with an empty attribute value.

The * merge attribute is only valid when calling UpdateThing * or UpdateThingGroup.

*/ inline AttributePayload& WithMerge(bool value) { SetMerge(value); return *this;} private: Aws::Map m_attributes; bool m_attributesHasBeenSet = false; bool m_merge; bool m_mergeHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws