1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/inspector/Inspector_EXPORTS.h> 8 #include <aws/inspector/model/InspectorEvent.h> 9 #include <aws/core/utils/DateTime.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace Inspector 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>This data type is used in the <a>Subscription</a> data type.</p><p><h3>See 29 * Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/EventSubscription">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_INSPECTOR_API EventSubscription 34 { 35 public: 36 EventSubscription(); 37 EventSubscription(Aws::Utils::Json::JsonView jsonValue); 38 EventSubscription& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>The event for which Amazon Simple Notification Service (SNS) notifications 44 * are sent.</p> 45 */ GetEvent()46 inline const InspectorEvent& GetEvent() const{ return m_event; } 47 48 /** 49 * <p>The event for which Amazon Simple Notification Service (SNS) notifications 50 * are sent.</p> 51 */ EventHasBeenSet()52 inline bool EventHasBeenSet() const { return m_eventHasBeenSet; } 53 54 /** 55 * <p>The event for which Amazon Simple Notification Service (SNS) notifications 56 * are sent.</p> 57 */ SetEvent(const InspectorEvent & value)58 inline void SetEvent(const InspectorEvent& value) { m_eventHasBeenSet = true; m_event = value; } 59 60 /** 61 * <p>The event for which Amazon Simple Notification Service (SNS) notifications 62 * are sent.</p> 63 */ SetEvent(InspectorEvent && value)64 inline void SetEvent(InspectorEvent&& value) { m_eventHasBeenSet = true; m_event = std::move(value); } 65 66 /** 67 * <p>The event for which Amazon Simple Notification Service (SNS) notifications 68 * are sent.</p> 69 */ WithEvent(const InspectorEvent & value)70 inline EventSubscription& WithEvent(const InspectorEvent& value) { SetEvent(value); return *this;} 71 72 /** 73 * <p>The event for which Amazon Simple Notification Service (SNS) notifications 74 * are sent.</p> 75 */ WithEvent(InspectorEvent && value)76 inline EventSubscription& WithEvent(InspectorEvent&& value) { SetEvent(std::move(value)); return *this;} 77 78 79 /** 80 * <p>The time at which <a>SubscribeToEvent</a> is called.</p> 81 */ GetSubscribedAt()82 inline const Aws::Utils::DateTime& GetSubscribedAt() const{ return m_subscribedAt; } 83 84 /** 85 * <p>The time at which <a>SubscribeToEvent</a> is called.</p> 86 */ SubscribedAtHasBeenSet()87 inline bool SubscribedAtHasBeenSet() const { return m_subscribedAtHasBeenSet; } 88 89 /** 90 * <p>The time at which <a>SubscribeToEvent</a> is called.</p> 91 */ SetSubscribedAt(const Aws::Utils::DateTime & value)92 inline void SetSubscribedAt(const Aws::Utils::DateTime& value) { m_subscribedAtHasBeenSet = true; m_subscribedAt = value; } 93 94 /** 95 * <p>The time at which <a>SubscribeToEvent</a> is called.</p> 96 */ SetSubscribedAt(Aws::Utils::DateTime && value)97 inline void SetSubscribedAt(Aws::Utils::DateTime&& value) { m_subscribedAtHasBeenSet = true; m_subscribedAt = std::move(value); } 98 99 /** 100 * <p>The time at which <a>SubscribeToEvent</a> is called.</p> 101 */ WithSubscribedAt(const Aws::Utils::DateTime & value)102 inline EventSubscription& WithSubscribedAt(const Aws::Utils::DateTime& value) { SetSubscribedAt(value); return *this;} 103 104 /** 105 * <p>The time at which <a>SubscribeToEvent</a> is called.</p> 106 */ WithSubscribedAt(Aws::Utils::DateTime && value)107 inline EventSubscription& WithSubscribedAt(Aws::Utils::DateTime&& value) { SetSubscribedAt(std::move(value)); return *this;} 108 109 private: 110 111 InspectorEvent m_event; 112 bool m_eventHasBeenSet; 113 114 Aws::Utils::DateTime m_subscribedAt; 115 bool m_subscribedAtHasBeenSet; 116 }; 117 118 } // namespace Model 119 } // namespace Inspector 120 } // namespace Aws 121