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

The contact's preference for being opted-in to or opted-out of a * topic.

See Also:

AWS * API Reference

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

The name of the topic.

*/ inline const Aws::String& GetTopicName() const{ return m_topicName; } /** *

The name of the topic.

*/ inline bool TopicNameHasBeenSet() const { return m_topicNameHasBeenSet; } /** *

The name of the topic.

*/ inline void SetTopicName(const Aws::String& value) { m_topicNameHasBeenSet = true; m_topicName = value; } /** *

The name of the topic.

*/ inline void SetTopicName(Aws::String&& value) { m_topicNameHasBeenSet = true; m_topicName = std::move(value); } /** *

The name of the topic.

*/ inline void SetTopicName(const char* value) { m_topicNameHasBeenSet = true; m_topicName.assign(value); } /** *

The name of the topic.

*/ inline TopicPreference& WithTopicName(const Aws::String& value) { SetTopicName(value); return *this;} /** *

The name of the topic.

*/ inline TopicPreference& WithTopicName(Aws::String&& value) { SetTopicName(std::move(value)); return *this;} /** *

The name of the topic.

*/ inline TopicPreference& WithTopicName(const char* value) { SetTopicName(value); return *this;} /** *

The contact's subscription status to a topic which is either * OPT_IN or OPT_OUT.

*/ inline const SubscriptionStatus& GetSubscriptionStatus() const{ return m_subscriptionStatus; } /** *

The contact's subscription status to a topic which is either * OPT_IN or OPT_OUT.

*/ inline bool SubscriptionStatusHasBeenSet() const { return m_subscriptionStatusHasBeenSet; } /** *

The contact's subscription status to a topic which is either * OPT_IN or OPT_OUT.

*/ inline void SetSubscriptionStatus(const SubscriptionStatus& value) { m_subscriptionStatusHasBeenSet = true; m_subscriptionStatus = value; } /** *

The contact's subscription status to a topic which is either * OPT_IN or OPT_OUT.

*/ inline void SetSubscriptionStatus(SubscriptionStatus&& value) { m_subscriptionStatusHasBeenSet = true; m_subscriptionStatus = std::move(value); } /** *

The contact's subscription status to a topic which is either * OPT_IN or OPT_OUT.

*/ inline TopicPreference& WithSubscriptionStatus(const SubscriptionStatus& value) { SetSubscriptionStatus(value); return *this;} /** *

The contact's subscription status to a topic which is either * OPT_IN or OPT_OUT.

*/ inline TopicPreference& WithSubscriptionStatus(SubscriptionStatus&& value) { SetSubscriptionStatus(std::move(value)); return *this;} private: Aws::String m_topicName; bool m_topicNameHasBeenSet = false; SubscriptionStatus m_subscriptionStatus; bool m_subscriptionStatusHasBeenSet = false; }; } // namespace Model } // namespace SESV2 } // namespace Aws