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

A contact is the end-user who is receiving the email.

See * Also:

AWS API * Reference

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

The contact's email address.

*/ inline const Aws::String& GetEmailAddress() const{ return m_emailAddress; } /** *

The contact's email address.

*/ inline bool EmailAddressHasBeenSet() const { return m_emailAddressHasBeenSet; } /** *

The contact's email address.

*/ inline void SetEmailAddress(const Aws::String& value) { m_emailAddressHasBeenSet = true; m_emailAddress = value; } /** *

The contact's email address.

*/ inline void SetEmailAddress(Aws::String&& value) { m_emailAddressHasBeenSet = true; m_emailAddress = std::move(value); } /** *

The contact's email address.

*/ inline void SetEmailAddress(const char* value) { m_emailAddressHasBeenSet = true; m_emailAddress.assign(value); } /** *

The contact's email address.

*/ inline Contact& WithEmailAddress(const Aws::String& value) { SetEmailAddress(value); return *this;} /** *

The contact's email address.

*/ inline Contact& WithEmailAddress(Aws::String&& value) { SetEmailAddress(std::move(value)); return *this;} /** *

The contact's email address.

*/ inline Contact& WithEmailAddress(const char* value) { SetEmailAddress(value); return *this;} /** *

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

*/ inline const Aws::Vector& GetTopicPreferences() const{ return m_topicPreferences; } /** *

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

*/ inline bool TopicPreferencesHasBeenSet() const { return m_topicPreferencesHasBeenSet; } /** *

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

*/ inline void SetTopicPreferences(const Aws::Vector& value) { m_topicPreferencesHasBeenSet = true; m_topicPreferences = value; } /** *

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

*/ inline void SetTopicPreferences(Aws::Vector&& value) { m_topicPreferencesHasBeenSet = true; m_topicPreferences = std::move(value); } /** *

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

*/ inline Contact& WithTopicPreferences(const Aws::Vector& value) { SetTopicPreferences(value); return *this;} /** *

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

*/ inline Contact& WithTopicPreferences(Aws::Vector&& value) { SetTopicPreferences(std::move(value)); return *this;} /** *

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

*/ inline Contact& AddTopicPreferences(const TopicPreference& value) { m_topicPreferencesHasBeenSet = true; m_topicPreferences.push_back(value); return *this; } /** *

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

*/ inline Contact& AddTopicPreferences(TopicPreference&& value) { m_topicPreferencesHasBeenSet = true; m_topicPreferences.push_back(std::move(value)); return *this; } /** *

The default topic preferences applied to the contact.

*/ inline const Aws::Vector& GetTopicDefaultPreferences() const{ return m_topicDefaultPreferences; } /** *

The default topic preferences applied to the contact.

*/ inline bool TopicDefaultPreferencesHasBeenSet() const { return m_topicDefaultPreferencesHasBeenSet; } /** *

The default topic preferences applied to the contact.

*/ inline void SetTopicDefaultPreferences(const Aws::Vector& value) { m_topicDefaultPreferencesHasBeenSet = true; m_topicDefaultPreferences = value; } /** *

The default topic preferences applied to the contact.

*/ inline void SetTopicDefaultPreferences(Aws::Vector&& value) { m_topicDefaultPreferencesHasBeenSet = true; m_topicDefaultPreferences = std::move(value); } /** *

The default topic preferences applied to the contact.

*/ inline Contact& WithTopicDefaultPreferences(const Aws::Vector& value) { SetTopicDefaultPreferences(value); return *this;} /** *

The default topic preferences applied to the contact.

*/ inline Contact& WithTopicDefaultPreferences(Aws::Vector&& value) { SetTopicDefaultPreferences(std::move(value)); return *this;} /** *

The default topic preferences applied to the contact.

*/ inline Contact& AddTopicDefaultPreferences(const TopicPreference& value) { m_topicDefaultPreferencesHasBeenSet = true; m_topicDefaultPreferences.push_back(value); return *this; } /** *

The default topic preferences applied to the contact.

*/ inline Contact& AddTopicDefaultPreferences(TopicPreference&& value) { m_topicDefaultPreferencesHasBeenSet = true; m_topicDefaultPreferences.push_back(std::move(value)); return *this; } /** *

A boolean value status noting if the contact is unsubscribed from all contact * list topics.

*/ inline bool GetUnsubscribeAll() const{ return m_unsubscribeAll; } /** *

A boolean value status noting if the contact is unsubscribed from all contact * list topics.

*/ inline bool UnsubscribeAllHasBeenSet() const { return m_unsubscribeAllHasBeenSet; } /** *

A boolean value status noting if the contact is unsubscribed from all contact * list topics.

*/ inline void SetUnsubscribeAll(bool value) { m_unsubscribeAllHasBeenSet = true; m_unsubscribeAll = value; } /** *

A boolean value status noting if the contact is unsubscribed from all contact * list topics.

*/ inline Contact& WithUnsubscribeAll(bool value) { SetUnsubscribeAll(value); return *this;} /** *

A timestamp noting the last time the contact's information was updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedTimestamp() const{ return m_lastUpdatedTimestamp; } /** *

A timestamp noting the last time the contact's information was updated.

*/ inline bool LastUpdatedTimestampHasBeenSet() const { return m_lastUpdatedTimestampHasBeenSet; } /** *

A timestamp noting the last time the contact's information was updated.

*/ inline void SetLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = value; } /** *

A timestamp noting the last time the contact's information was updated.

*/ inline void SetLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = std::move(value); } /** *

A timestamp noting the last time the contact's information was updated.

*/ inline Contact& WithLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetLastUpdatedTimestamp(value); return *this;} /** *

A timestamp noting the last time the contact's information was updated.

*/ inline Contact& WithLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetLastUpdatedTimestamp(std::move(value)); return *this;} private: Aws::String m_emailAddress; bool m_emailAddressHasBeenSet = false; Aws::Vector m_topicPreferences; bool m_topicPreferencesHasBeenSet = false; Aws::Vector m_topicDefaultPreferences; bool m_topicDefaultPreferencesHasBeenSet = false; bool m_unsubscribeAll; bool m_unsubscribeAllHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedTimestamp; bool m_lastUpdatedTimestampHasBeenSet = false; }; } // namespace Model } // namespace SESV2 } // namespace Aws