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

Specifies the settings for a campaign treatment. A treatment is a * variation of a campaign that's used for A/B testing of a campaign.

See * Also:

AWS * API Reference

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

The delivery configuration settings for sending the treatment through a * custom channel. This object is required if the MessageConfiguration object for * the treatment specifies a CustomMessage object.

*/ inline const CustomDeliveryConfiguration& GetCustomDeliveryConfiguration() const{ return m_customDeliveryConfiguration; } /** *

The delivery configuration settings for sending the treatment through a * custom channel. This object is required if the MessageConfiguration object for * the treatment specifies a CustomMessage object.

*/ inline bool CustomDeliveryConfigurationHasBeenSet() const { return m_customDeliveryConfigurationHasBeenSet; } /** *

The delivery configuration settings for sending the treatment through a * custom channel. This object is required if the MessageConfiguration object for * the treatment specifies a CustomMessage object.

*/ inline void SetCustomDeliveryConfiguration(const CustomDeliveryConfiguration& value) { m_customDeliveryConfigurationHasBeenSet = true; m_customDeliveryConfiguration = value; } /** *

The delivery configuration settings for sending the treatment through a * custom channel. This object is required if the MessageConfiguration object for * the treatment specifies a CustomMessage object.

*/ inline void SetCustomDeliveryConfiguration(CustomDeliveryConfiguration&& value) { m_customDeliveryConfigurationHasBeenSet = true; m_customDeliveryConfiguration = std::move(value); } /** *

The delivery configuration settings for sending the treatment through a * custom channel. This object is required if the MessageConfiguration object for * the treatment specifies a CustomMessage object.

*/ inline WriteTreatmentResource& WithCustomDeliveryConfiguration(const CustomDeliveryConfiguration& value) { SetCustomDeliveryConfiguration(value); return *this;} /** *

The delivery configuration settings for sending the treatment through a * custom channel. This object is required if the MessageConfiguration object for * the treatment specifies a CustomMessage object.

*/ inline WriteTreatmentResource& WithCustomDeliveryConfiguration(CustomDeliveryConfiguration&& value) { SetCustomDeliveryConfiguration(std::move(value)); return *this;} /** *

The message configuration settings for the treatment.

*/ inline const MessageConfiguration& GetMessageConfiguration() const{ return m_messageConfiguration; } /** *

The message configuration settings for the treatment.

*/ inline bool MessageConfigurationHasBeenSet() const { return m_messageConfigurationHasBeenSet; } /** *

The message configuration settings for the treatment.

*/ inline void SetMessageConfiguration(const MessageConfiguration& value) { m_messageConfigurationHasBeenSet = true; m_messageConfiguration = value; } /** *

The message configuration settings for the treatment.

*/ inline void SetMessageConfiguration(MessageConfiguration&& value) { m_messageConfigurationHasBeenSet = true; m_messageConfiguration = std::move(value); } /** *

The message configuration settings for the treatment.

*/ inline WriteTreatmentResource& WithMessageConfiguration(const MessageConfiguration& value) { SetMessageConfiguration(value); return *this;} /** *

The message configuration settings for the treatment.

*/ inline WriteTreatmentResource& WithMessageConfiguration(MessageConfiguration&& value) { SetMessageConfiguration(std::move(value)); return *this;} /** *

The schedule settings for the treatment.

*/ inline const Schedule& GetSchedule() const{ return m_schedule; } /** *

The schedule settings for the treatment.

*/ inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; } /** *

The schedule settings for the treatment.

*/ inline void SetSchedule(const Schedule& value) { m_scheduleHasBeenSet = true; m_schedule = value; } /** *

The schedule settings for the treatment.

*/ inline void SetSchedule(Schedule&& value) { m_scheduleHasBeenSet = true; m_schedule = std::move(value); } /** *

The schedule settings for the treatment.

*/ inline WriteTreatmentResource& WithSchedule(const Schedule& value) { SetSchedule(value); return *this;} /** *

The schedule settings for the treatment.

*/ inline WriteTreatmentResource& WithSchedule(Schedule&& value) { SetSchedule(std::move(value)); return *this;} /** *

The allocated percentage of users (segment members) to send the treatment * to.

*/ inline int GetSizePercent() const{ return m_sizePercent; } /** *

The allocated percentage of users (segment members) to send the treatment * to.

*/ inline bool SizePercentHasBeenSet() const { return m_sizePercentHasBeenSet; } /** *

The allocated percentage of users (segment members) to send the treatment * to.

*/ inline void SetSizePercent(int value) { m_sizePercentHasBeenSet = true; m_sizePercent = value; } /** *

The allocated percentage of users (segment members) to send the treatment * to.

*/ inline WriteTreatmentResource& WithSizePercent(int value) { SetSizePercent(value); return *this;} /** *

The message template to use for the treatment.

*/ inline const TemplateConfiguration& GetTemplateConfiguration() const{ return m_templateConfiguration; } /** *

The message template to use for the treatment.

*/ inline bool TemplateConfigurationHasBeenSet() const { return m_templateConfigurationHasBeenSet; } /** *

The message template to use for the treatment.

*/ inline void SetTemplateConfiguration(const TemplateConfiguration& value) { m_templateConfigurationHasBeenSet = true; m_templateConfiguration = value; } /** *

The message template to use for the treatment.

*/ inline void SetTemplateConfiguration(TemplateConfiguration&& value) { m_templateConfigurationHasBeenSet = true; m_templateConfiguration = std::move(value); } /** *

The message template to use for the treatment.

*/ inline WriteTreatmentResource& WithTemplateConfiguration(const TemplateConfiguration& value) { SetTemplateConfiguration(value); return *this;} /** *

The message template to use for the treatment.

*/ inline WriteTreatmentResource& WithTemplateConfiguration(TemplateConfiguration&& value) { SetTemplateConfiguration(std::move(value)); return *this;} /** *

A custom description of the treatment.

*/ inline const Aws::String& GetTreatmentDescription() const{ return m_treatmentDescription; } /** *

A custom description of the treatment.

*/ inline bool TreatmentDescriptionHasBeenSet() const { return m_treatmentDescriptionHasBeenSet; } /** *

A custom description of the treatment.

*/ inline void SetTreatmentDescription(const Aws::String& value) { m_treatmentDescriptionHasBeenSet = true; m_treatmentDescription = value; } /** *

A custom description of the treatment.

*/ inline void SetTreatmentDescription(Aws::String&& value) { m_treatmentDescriptionHasBeenSet = true; m_treatmentDescription = std::move(value); } /** *

A custom description of the treatment.

*/ inline void SetTreatmentDescription(const char* value) { m_treatmentDescriptionHasBeenSet = true; m_treatmentDescription.assign(value); } /** *

A custom description of the treatment.

*/ inline WriteTreatmentResource& WithTreatmentDescription(const Aws::String& value) { SetTreatmentDescription(value); return *this;} /** *

A custom description of the treatment.

*/ inline WriteTreatmentResource& WithTreatmentDescription(Aws::String&& value) { SetTreatmentDescription(std::move(value)); return *this;} /** *

A custom description of the treatment.

*/ inline WriteTreatmentResource& WithTreatmentDescription(const char* value) { SetTreatmentDescription(value); return *this;} /** *

A custom name for the treatment.

*/ inline const Aws::String& GetTreatmentName() const{ return m_treatmentName; } /** *

A custom name for the treatment.

*/ inline bool TreatmentNameHasBeenSet() const { return m_treatmentNameHasBeenSet; } /** *

A custom name for the treatment.

*/ inline void SetTreatmentName(const Aws::String& value) { m_treatmentNameHasBeenSet = true; m_treatmentName = value; } /** *

A custom name for the treatment.

*/ inline void SetTreatmentName(Aws::String&& value) { m_treatmentNameHasBeenSet = true; m_treatmentName = std::move(value); } /** *

A custom name for the treatment.

*/ inline void SetTreatmentName(const char* value) { m_treatmentNameHasBeenSet = true; m_treatmentName.assign(value); } /** *

A custom name for the treatment.

*/ inline WriteTreatmentResource& WithTreatmentName(const Aws::String& value) { SetTreatmentName(value); return *this;} /** *

A custom name for the treatment.

*/ inline WriteTreatmentResource& WithTreatmentName(Aws::String&& value) { SetTreatmentName(std::move(value)); return *this;} /** *

A custom name for the treatment.

*/ inline WriteTreatmentResource& WithTreatmentName(const char* value) { SetTreatmentName(value); return *this;} private: CustomDeliveryConfiguration m_customDeliveryConfiguration; bool m_customDeliveryConfigurationHasBeenSet = false; MessageConfiguration m_messageConfiguration; bool m_messageConfigurationHasBeenSet = false; Schedule m_schedule; bool m_scheduleHasBeenSet = false; int m_sizePercent; bool m_sizePercentHasBeenSet = false; TemplateConfiguration m_templateConfiguration; bool m_templateConfigurationHasBeenSet = false; Aws::String m_treatmentDescription; bool m_treatmentDescriptionHasBeenSet = false; Aws::String m_treatmentName; bool m_treatmentNameHasBeenSet = false; }; } // namespace Model } // namespace Pinpoint } // namespace Aws