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

The NotificationSpecification data structure describes a HIT event * notification for a HIT type.

See Also:

AWS * API Reference

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

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline const Aws::String& GetDestination() const{ return m_destination; } /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline bool DestinationHasBeenSet() const { return m_destinationHasBeenSet; } /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline void SetDestination(const Aws::String& value) { m_destinationHasBeenSet = true; m_destination = value; } /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline void SetDestination(Aws::String&& value) { m_destinationHasBeenSet = true; m_destination = std::move(value); } /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline void SetDestination(const char* value) { m_destinationHasBeenSet = true; m_destination.assign(value); } /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline NotificationSpecification& WithDestination(const Aws::String& value) { SetDestination(value); return *this;} /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline NotificationSpecification& WithDestination(Aws::String&& value) { SetDestination(std::move(value)); return *this;} /** *

The target for notification messages. The Destination’s format is determined * by the specified Transport:

  • When Transport is Email, the * Destination is your email address.

  • When Transport is SQS, the * Destination is your queue URL.

  • When Transport is SNS, the * Destination is the ARN of your topic.

*/ inline NotificationSpecification& WithDestination(const char* value) { SetDestination(value); return *this;} /** *

The method Amazon Mechanical Turk uses to send the notification. Valid * Values: Email | SQS | SNS.

*/ inline const NotificationTransport& GetTransport() const{ return m_transport; } /** *

The method Amazon Mechanical Turk uses to send the notification. Valid * Values: Email | SQS | SNS.

*/ inline bool TransportHasBeenSet() const { return m_transportHasBeenSet; } /** *

The method Amazon Mechanical Turk uses to send the notification. Valid * Values: Email | SQS | SNS.

*/ inline void SetTransport(const NotificationTransport& value) { m_transportHasBeenSet = true; m_transport = value; } /** *

The method Amazon Mechanical Turk uses to send the notification. Valid * Values: Email | SQS | SNS.

*/ inline void SetTransport(NotificationTransport&& value) { m_transportHasBeenSet = true; m_transport = std::move(value); } /** *

The method Amazon Mechanical Turk uses to send the notification. Valid * Values: Email | SQS | SNS.

*/ inline NotificationSpecification& WithTransport(const NotificationTransport& value) { SetTransport(value); return *this;} /** *

The method Amazon Mechanical Turk uses to send the notification. Valid * Values: Email | SQS | SNS.

*/ inline NotificationSpecification& WithTransport(NotificationTransport&& value) { SetTransport(std::move(value)); return *this;} /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline const Aws::String& GetVersion() const{ return m_version; } /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline NotificationSpecification& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline NotificationSpecification& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} /** *

The version of the Notification API to use. Valid value is 2006-05-05.

*/ inline NotificationSpecification& WithVersion(const char* value) { SetVersion(value); return *this;} /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline const Aws::Vector& GetEventTypes() const{ return m_eventTypes; } /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline bool EventTypesHasBeenSet() const { return m_eventTypesHasBeenSet; } /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline void SetEventTypes(const Aws::Vector& value) { m_eventTypesHasBeenSet = true; m_eventTypes = value; } /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline void SetEventTypes(Aws::Vector&& value) { m_eventTypesHasBeenSet = true; m_eventTypes = std::move(value); } /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline NotificationSpecification& WithEventTypes(const Aws::Vector& value) { SetEventTypes(value); return *this;} /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline NotificationSpecification& WithEventTypes(Aws::Vector&& value) { SetEventTypes(std::move(value)); return *this;} /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline NotificationSpecification& AddEventTypes(const EventType& value) { m_eventTypesHasBeenSet = true; m_eventTypes.push_back(value); return *this; } /** *

The list of events that should cause notifications to be sent. Valid Values: * AssignmentAccepted | AssignmentAbandoned | AssignmentReturned | * AssignmentSubmitted | AssignmentRejected | AssignmentApproved | HITCreated | * HITExtended | HITDisposed | HITReviewable | HITExpired | Ping. The Ping event is * only valid for the SendTestEventNotification operation.

*/ inline NotificationSpecification& AddEventTypes(EventType&& value) { m_eventTypesHasBeenSet = true; m_eventTypes.push_back(std::move(value)); return *this; } private: Aws::String m_destination; bool m_destinationHasBeenSet = false; NotificationTransport m_transport; bool m_transportHasBeenSet = false; Aws::String m_version; bool m_versionHasBeenSet = false; Aws::Vector m_eventTypes; bool m_eventTypesHasBeenSet = false; }; } // namespace Model } // namespace MTurk } // namespace Aws