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/budgets/Budgets_EXPORTS.h>
8 #include <aws/budgets/model/SubscriptionType.h>
9 #include <aws/core/utils/memory/stl/AWSString.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 Budgets
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>The subscriber to a budget notification. The subscriber consists of a
29    * subscription type and either an Amazon SNS topic or an email address.</p> <p>For
30    * example, an email subscriber would have the following parameters:</p> <ul> <li>
31    * <p>A <code>subscriptionType</code> of <code>EMAIL</code> </p> </li> <li> <p>An
32    * <code>address</code> of <code>example@example.com</code> </p> </li>
33    * </ul><p><h3>See Also:</h3>   <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/budgets-2016-10-20/Subscriber">AWS
35    * API Reference</a></p>
36    */
37   class AWS_BUDGETS_API Subscriber
38   {
39   public:
40     Subscriber();
41     Subscriber(Aws::Utils::Json::JsonView jsonValue);
42     Subscriber& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * <p>The type of notification that AWS sends to a subscriber.</p>
48      */
GetSubscriptionType()49     inline const SubscriptionType& GetSubscriptionType() const{ return m_subscriptionType; }
50 
51     /**
52      * <p>The type of notification that AWS sends to a subscriber.</p>
53      */
SubscriptionTypeHasBeenSet()54     inline bool SubscriptionTypeHasBeenSet() const { return m_subscriptionTypeHasBeenSet; }
55 
56     /**
57      * <p>The type of notification that AWS sends to a subscriber.</p>
58      */
SetSubscriptionType(const SubscriptionType & value)59     inline void SetSubscriptionType(const SubscriptionType& value) { m_subscriptionTypeHasBeenSet = true; m_subscriptionType = value; }
60 
61     /**
62      * <p>The type of notification that AWS sends to a subscriber.</p>
63      */
SetSubscriptionType(SubscriptionType && value)64     inline void SetSubscriptionType(SubscriptionType&& value) { m_subscriptionTypeHasBeenSet = true; m_subscriptionType = std::move(value); }
65 
66     /**
67      * <p>The type of notification that AWS sends to a subscriber.</p>
68      */
WithSubscriptionType(const SubscriptionType & value)69     inline Subscriber& WithSubscriptionType(const SubscriptionType& value) { SetSubscriptionType(value); return *this;}
70 
71     /**
72      * <p>The type of notification that AWS sends to a subscriber.</p>
73      */
WithSubscriptionType(SubscriptionType && value)74     inline Subscriber& WithSubscriptionType(SubscriptionType&& value) { SetSubscriptionType(std::move(value)); return *this;}
75 
76 
77     /**
78      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
79      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
80      * can't contain line breaks.</p>
81      */
GetAddress()82     inline const Aws::String& GetAddress() const{ return m_address; }
83 
84     /**
85      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
86      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
87      * can't contain line breaks.</p>
88      */
AddressHasBeenSet()89     inline bool AddressHasBeenSet() const { return m_addressHasBeenSet; }
90 
91     /**
92      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
93      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
94      * can't contain line breaks.</p>
95      */
SetAddress(const Aws::String & value)96     inline void SetAddress(const Aws::String& value) { m_addressHasBeenSet = true; m_address = value; }
97 
98     /**
99      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
100      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
101      * can't contain line breaks.</p>
102      */
SetAddress(Aws::String && value)103     inline void SetAddress(Aws::String&& value) { m_addressHasBeenSet = true; m_address = std::move(value); }
104 
105     /**
106      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
107      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
108      * can't contain line breaks.</p>
109      */
SetAddress(const char * value)110     inline void SetAddress(const char* value) { m_addressHasBeenSet = true; m_address.assign(value); }
111 
112     /**
113      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
114      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
115      * can't contain line breaks.</p>
116      */
WithAddress(const Aws::String & value)117     inline Subscriber& WithAddress(const Aws::String& value) { SetAddress(value); return *this;}
118 
119     /**
120      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
121      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
122      * can't contain line breaks.</p>
123      */
WithAddress(Aws::String && value)124     inline Subscriber& WithAddress(Aws::String&& value) { SetAddress(std::move(value)); return *this;}
125 
126     /**
127      * <p>The address that AWS sends budget notifications to, either an SNS topic or an
128      * email.</p> <p>When you create a subscriber, the value of <code>Address</code>
129      * can't contain line breaks.</p>
130      */
WithAddress(const char * value)131     inline Subscriber& WithAddress(const char* value) { SetAddress(value); return *this;}
132 
133   private:
134 
135     SubscriptionType m_subscriptionType;
136     bool m_subscriptionTypeHasBeenSet;
137 
138     Aws::String m_address;
139     bool m_addressHasBeenSet;
140   };
141 
142 } // namespace Model
143 } // namespace Budgets
144 } // namespace Aws
145