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/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/inspector/model/EventSubscription.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Json
18 {
19   class JsonValue;
20   class JsonView;
21 } // namespace Json
22 } // namespace Utils
23 namespace Inspector
24 {
25 namespace Model
26 {
27 
28   /**
29    * <p>This data type is used as a response element in the
30    * <a>ListEventSubscriptions</a> action.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/Subscription">AWS
32    * API Reference</a></p>
33    */
34   class AWS_INSPECTOR_API Subscription
35   {
36   public:
37     Subscription();
38     Subscription(Aws::Utils::Json::JsonView jsonValue);
39     Subscription& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The ARN of the assessment template that is used during the event for which
45      * the SNS notification is sent.</p>
46      */
GetResourceArn()47     inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
48 
49     /**
50      * <p>The ARN of the assessment template that is used during the event for which
51      * the SNS notification is sent.</p>
52      */
ResourceArnHasBeenSet()53     inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
54 
55     /**
56      * <p>The ARN of the assessment template that is used during the event for which
57      * the SNS notification is sent.</p>
58      */
SetResourceArn(const Aws::String & value)59     inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
60 
61     /**
62      * <p>The ARN of the assessment template that is used during the event for which
63      * the SNS notification is sent.</p>
64      */
SetResourceArn(Aws::String && value)65     inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
66 
67     /**
68      * <p>The ARN of the assessment template that is used during the event for which
69      * the SNS notification is sent.</p>
70      */
SetResourceArn(const char * value)71     inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
72 
73     /**
74      * <p>The ARN of the assessment template that is used during the event for which
75      * the SNS notification is sent.</p>
76      */
WithResourceArn(const Aws::String & value)77     inline Subscription& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
78 
79     /**
80      * <p>The ARN of the assessment template that is used during the event for which
81      * the SNS notification is sent.</p>
82      */
WithResourceArn(Aws::String && value)83     inline Subscription& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
84 
85     /**
86      * <p>The ARN of the assessment template that is used during the event for which
87      * the SNS notification is sent.</p>
88      */
WithResourceArn(const char * value)89     inline Subscription& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
90 
91 
92     /**
93      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
94      * SNS notifications are sent.</p>
95      */
GetTopicArn()96     inline const Aws::String& GetTopicArn() const{ return m_topicArn; }
97 
98     /**
99      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
100      * SNS notifications are sent.</p>
101      */
TopicArnHasBeenSet()102     inline bool TopicArnHasBeenSet() const { return m_topicArnHasBeenSet; }
103 
104     /**
105      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
106      * SNS notifications are sent.</p>
107      */
SetTopicArn(const Aws::String & value)108     inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; }
109 
110     /**
111      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
112      * SNS notifications are sent.</p>
113      */
SetTopicArn(Aws::String && value)114     inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = std::move(value); }
115 
116     /**
117      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
118      * SNS notifications are sent.</p>
119      */
SetTopicArn(const char * value)120     inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); }
121 
122     /**
123      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
124      * SNS notifications are sent.</p>
125      */
WithTopicArn(const Aws::String & value)126     inline Subscription& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;}
127 
128     /**
129      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
130      * SNS notifications are sent.</p>
131      */
WithTopicArn(Aws::String && value)132     inline Subscription& WithTopicArn(Aws::String&& value) { SetTopicArn(std::move(value)); return *this;}
133 
134     /**
135      * <p>The ARN of the Amazon Simple Notification Service (SNS) topic to which the
136      * SNS notifications are sent.</p>
137      */
WithTopicArn(const char * value)138     inline Subscription& WithTopicArn(const char* value) { SetTopicArn(value); return *this;}
139 
140 
141     /**
142      * <p>The list of existing event subscriptions.</p>
143      */
GetEventSubscriptions()144     inline const Aws::Vector<EventSubscription>& GetEventSubscriptions() const{ return m_eventSubscriptions; }
145 
146     /**
147      * <p>The list of existing event subscriptions.</p>
148      */
EventSubscriptionsHasBeenSet()149     inline bool EventSubscriptionsHasBeenSet() const { return m_eventSubscriptionsHasBeenSet; }
150 
151     /**
152      * <p>The list of existing event subscriptions.</p>
153      */
SetEventSubscriptions(const Aws::Vector<EventSubscription> & value)154     inline void SetEventSubscriptions(const Aws::Vector<EventSubscription>& value) { m_eventSubscriptionsHasBeenSet = true; m_eventSubscriptions = value; }
155 
156     /**
157      * <p>The list of existing event subscriptions.</p>
158      */
SetEventSubscriptions(Aws::Vector<EventSubscription> && value)159     inline void SetEventSubscriptions(Aws::Vector<EventSubscription>&& value) { m_eventSubscriptionsHasBeenSet = true; m_eventSubscriptions = std::move(value); }
160 
161     /**
162      * <p>The list of existing event subscriptions.</p>
163      */
WithEventSubscriptions(const Aws::Vector<EventSubscription> & value)164     inline Subscription& WithEventSubscriptions(const Aws::Vector<EventSubscription>& value) { SetEventSubscriptions(value); return *this;}
165 
166     /**
167      * <p>The list of existing event subscriptions.</p>
168      */
WithEventSubscriptions(Aws::Vector<EventSubscription> && value)169     inline Subscription& WithEventSubscriptions(Aws::Vector<EventSubscription>&& value) { SetEventSubscriptions(std::move(value)); return *this;}
170 
171     /**
172      * <p>The list of existing event subscriptions.</p>
173      */
AddEventSubscriptions(const EventSubscription & value)174     inline Subscription& AddEventSubscriptions(const EventSubscription& value) { m_eventSubscriptionsHasBeenSet = true; m_eventSubscriptions.push_back(value); return *this; }
175 
176     /**
177      * <p>The list of existing event subscriptions.</p>
178      */
AddEventSubscriptions(EventSubscription && value)179     inline Subscription& AddEventSubscriptions(EventSubscription&& value) { m_eventSubscriptionsHasBeenSet = true; m_eventSubscriptions.push_back(std::move(value)); return *this; }
180 
181   private:
182 
183     Aws::String m_resourceArn;
184     bool m_resourceArnHasBeenSet;
185 
186     Aws::String m_topicArn;
187     bool m_topicArnHasBeenSet;
188 
189     Aws::Vector<EventSubscription> m_eventSubscriptions;
190     bool m_eventSubscriptionsHasBeenSet;
191   };
192 
193 } // namespace Model
194 } // namespace Inspector
195 } // namespace Aws
196