/** * 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 IoTEvents { namespace Model { /** *

Information needed to configure the payload.

By default, AWS IoT * Events generates a standard payload in JSON for any action. This action payload * contains all attribute-value pairs that have the information about the detector * model instance and the event triggered the action. To configure the action * payload, you can use contentExpression.

See Also:

* AWS * API Reference

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

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline const Aws::String& GetContentExpression() const{ return m_contentExpression; } /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline bool ContentExpressionHasBeenSet() const { return m_contentExpressionHasBeenSet; } /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline void SetContentExpression(const Aws::String& value) { m_contentExpressionHasBeenSet = true; m_contentExpression = value; } /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline void SetContentExpression(Aws::String&& value) { m_contentExpressionHasBeenSet = true; m_contentExpression = std::move(value); } /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline void SetContentExpression(const char* value) { m_contentExpressionHasBeenSet = true; m_contentExpression.assign(value); } /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline Payload& WithContentExpression(const Aws::String& value) { SetContentExpression(value); return *this;} /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline Payload& WithContentExpression(Aws::String&& value) { SetContentExpression(std::move(value)); return *this;} /** *

The content of the payload. You can use a string expression that includes * quoted strings ('<string>'), variables * ($variable.<variable-name>), input values * ($input.<input-name>.<path-to-datum>), string * concatenations, and quoted strings that contain ${} as the content. * The recommended maximum size of a content expression is 1 KB.

*/ inline Payload& WithContentExpression(const char* value) { SetContentExpression(value); return *this;} /** *

The value of the payload type can be either STRING or * JSON.

*/ inline const PayloadType& GetType() const{ return m_type; } /** *

The value of the payload type can be either STRING or * JSON.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The value of the payload type can be either STRING or * JSON.

*/ inline void SetType(const PayloadType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The value of the payload type can be either STRING or * JSON.

*/ inline void SetType(PayloadType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The value of the payload type can be either STRING or * JSON.

*/ inline Payload& WithType(const PayloadType& value) { SetType(value); return *this;} /** *

The value of the payload type can be either STRING or * JSON.

*/ inline Payload& WithType(PayloadType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_contentExpression; bool m_contentExpressionHasBeenSet = false; PayloadType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace IoTEvents } // namespace Aws