/** * 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 { /** *

Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or * self-managed Apache Kafka cluster.

See Also:

AWS API * Reference

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

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline const Aws::String& GetDestinationArn() const{ return m_destinationArn; } /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline bool DestinationArnHasBeenSet() const { return m_destinationArnHasBeenSet; } /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline void SetDestinationArn(const Aws::String& value) { m_destinationArnHasBeenSet = true; m_destinationArn = value; } /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline void SetDestinationArn(Aws::String&& value) { m_destinationArnHasBeenSet = true; m_destinationArn = std::move(value); } /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline void SetDestinationArn(const char* value) { m_destinationArnHasBeenSet = true; m_destinationArn.assign(value); } /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline KafkaAction& WithDestinationArn(const Aws::String& value) { SetDestinationArn(value); return *this;} /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline KafkaAction& WithDestinationArn(Aws::String&& value) { SetDestinationArn(std::move(value)); return *this;} /** *

The ARN of Kafka action's VPC TopicRuleDestination.

*/ inline KafkaAction& WithDestinationArn(const char* value) { SetDestinationArn(value); return *this;} /** *

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka topic for messages to be sent to the Kafka broker.

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

The Kafka message key.

*/ inline const Aws::String& GetKey() const{ return m_key; } /** *

The Kafka message key.

*/ inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } /** *

The Kafka message key.

*/ inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } /** *

The Kafka message key.

*/ inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } /** *

The Kafka message key.

*/ inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } /** *

The Kafka message key.

*/ inline KafkaAction& WithKey(const Aws::String& value) { SetKey(value); return *this;} /** *

The Kafka message key.

*/ inline KafkaAction& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} /** *

The Kafka message key.

*/ inline KafkaAction& WithKey(const char* value) { SetKey(value); return *this;} /** *

The Kafka message partition.

*/ inline const Aws::String& GetPartition() const{ return m_partition; } /** *

The Kafka message partition.

*/ inline bool PartitionHasBeenSet() const { return m_partitionHasBeenSet; } /** *

The Kafka message partition.

*/ inline void SetPartition(const Aws::String& value) { m_partitionHasBeenSet = true; m_partition = value; } /** *

The Kafka message partition.

*/ inline void SetPartition(Aws::String&& value) { m_partitionHasBeenSet = true; m_partition = std::move(value); } /** *

The Kafka message partition.

*/ inline void SetPartition(const char* value) { m_partitionHasBeenSet = true; m_partition.assign(value); } /** *

The Kafka message partition.

*/ inline KafkaAction& WithPartition(const Aws::String& value) { SetPartition(value); return *this;} /** *

The Kafka message partition.

*/ inline KafkaAction& WithPartition(Aws::String&& value) { SetPartition(std::move(value)); return *this;} /** *

The Kafka message partition.

*/ inline KafkaAction& WithPartition(const char* value) { SetPartition(value); return *this;} /** *

Properties of the Apache Kafka producer client.

*/ inline const Aws::Map& GetClientProperties() const{ return m_clientProperties; } /** *

Properties of the Apache Kafka producer client.

*/ inline bool ClientPropertiesHasBeenSet() const { return m_clientPropertiesHasBeenSet; } /** *

Properties of the Apache Kafka producer client.

*/ inline void SetClientProperties(const Aws::Map& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties = value; } /** *

Properties of the Apache Kafka producer client.

*/ inline void SetClientProperties(Aws::Map&& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties = std::move(value); } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& WithClientProperties(const Aws::Map& value) { SetClientProperties(value); return *this;} /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& WithClientProperties(Aws::Map&& value) { SetClientProperties(std::move(value)); return *this;} /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(const Aws::String& key, const Aws::String& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(key, value); return *this; } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(Aws::String&& key, const Aws::String& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(std::move(key), value); return *this; } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(const Aws::String& key, Aws::String&& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(key, std::move(value)); return *this; } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(Aws::String&& key, Aws::String&& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(std::move(key), std::move(value)); return *this; } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(const char* key, Aws::String&& value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(key, std::move(value)); return *this; } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(Aws::String&& key, const char* value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(std::move(key), value); return *this; } /** *

Properties of the Apache Kafka producer client.

*/ inline KafkaAction& AddClientProperties(const char* key, const char* value) { m_clientPropertiesHasBeenSet = true; m_clientProperties.emplace(key, value); return *this; } private: Aws::String m_destinationArn; bool m_destinationArnHasBeenSet = false; Aws::String m_topic; bool m_topicHasBeenSet = false; Aws::String m_key; bool m_keyHasBeenSet = false; Aws::String m_partition; bool m_partitionHasBeenSet = false; Aws::Map m_clientProperties; bool m_clientPropertiesHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws