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

Contains information about an event source for an Lambda function. The event * source defines the topics on which this Lambda function subscribes to receive * messages that run the function.

See Also:

AWS * API Reference

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

The topic to which to subscribe to receive event messages.

*/ inline const Aws::String& GetTopic() const{ return m_topic; } /** *

The topic to which to subscribe to receive event messages.

*/ inline bool TopicHasBeenSet() const { return m_topicHasBeenSet; } /** *

The topic to which to subscribe to receive event messages.

*/ inline void SetTopic(const Aws::String& value) { m_topicHasBeenSet = true; m_topic = value; } /** *

The topic to which to subscribe to receive event messages.

*/ inline void SetTopic(Aws::String&& value) { m_topicHasBeenSet = true; m_topic = std::move(value); } /** *

The topic to which to subscribe to receive event messages.

*/ inline void SetTopic(const char* value) { m_topicHasBeenSet = true; m_topic.assign(value); } /** *

The topic to which to subscribe to receive event messages.

*/ inline LambdaEventSource& WithTopic(const Aws::String& value) { SetTopic(value); return *this;} /** *

The topic to which to subscribe to receive event messages.

*/ inline LambdaEventSource& WithTopic(Aws::String&& value) { SetTopic(std::move(value)); return *this;} /** *

The topic to which to subscribe to receive event messages.

*/ inline LambdaEventSource& WithTopic(const char* value) { SetTopic(value); return *this;} /** *

The type of event source. Choose from the following options:

  • *

    PUB_SUB – Subscribe to local publish/subscribe messages. This * event source type doesn't support MQTT wildcards (+ and * #) in the event source topic.

  • * IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. * This event source type supports MQTT wildcards (+ and * #) in the event source topic.

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

The type of event source. Choose from the following options:

  • *

    PUB_SUB – Subscribe to local publish/subscribe messages. This * event source type doesn't support MQTT wildcards (+ and * #) in the event source topic.

  • * IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. * This event source type supports MQTT wildcards (+ and * #) in the event source topic.

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

The type of event source. Choose from the following options:

  • *

    PUB_SUB – Subscribe to local publish/subscribe messages. This * event source type doesn't support MQTT wildcards (+ and * #) in the event source topic.

  • * IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. * This event source type supports MQTT wildcards (+ and * #) in the event source topic.

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

The type of event source. Choose from the following options:

  • *

    PUB_SUB – Subscribe to local publish/subscribe messages. This * event source type doesn't support MQTT wildcards (+ and * #) in the event source topic.

  • * IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. * This event source type supports MQTT wildcards (+ and * #) in the event source topic.

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

The type of event source. Choose from the following options:

  • *

    PUB_SUB – Subscribe to local publish/subscribe messages. This * event source type doesn't support MQTT wildcards (+ and * #) in the event source topic.

  • * IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. * This event source type supports MQTT wildcards (+ and * #) in the event source topic.

*/ inline LambdaEventSource& WithType(const LambdaEventSourceType& value) { SetType(value); return *this;} /** *

The type of event source. Choose from the following options:

  • *

    PUB_SUB – Subscribe to local publish/subscribe messages. This * event source type doesn't support MQTT wildcards (+ and * #) in the event source topic.

  • * IOT_CORE – Subscribe to Amazon Web Services IoT Core MQTT messages. * This event source type supports MQTT wildcards (+ and * #) in the event source topic.

*/ inline LambdaEventSource& WithType(LambdaEventSourceType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_topic; bool m_topicHasBeenSet = false; LambdaEventSourceType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace GreengrassV2 } // namespace Aws