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/iotanalytics/IoTAnalytics_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/iotanalytics/model/ChannelStorage.h>
10 #include <aws/iotanalytics/model/ChannelStatus.h>
11 #include <aws/iotanalytics/model/RetentionPeriod.h>
12 #include <aws/core/utils/DateTime.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21   class JsonValue;
22   class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace IoTAnalytics
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>A collection of data from an MQTT topic. Channels archive the raw,
32    * unprocessed messages before publishing the data to a pipeline.</p><p><h3>See
33    * Also:</h3>   <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/iotanalytics-2017-11-27/Channel">AWS
35    * API Reference</a></p>
36    */
37   class AWS_IOTANALYTICS_API Channel
38   {
39   public:
40     Channel();
41     Channel(Aws::Utils::Json::JsonView jsonValue);
42     Channel& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * <p>The name of the channel.</p>
48      */
GetName()49     inline const Aws::String& GetName() const{ return m_name; }
50 
51     /**
52      * <p>The name of the channel.</p>
53      */
NameHasBeenSet()54     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
55 
56     /**
57      * <p>The name of the channel.</p>
58      */
SetName(const Aws::String & value)59     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
60 
61     /**
62      * <p>The name of the channel.</p>
63      */
SetName(Aws::String && value)64     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
65 
66     /**
67      * <p>The name of the channel.</p>
68      */
SetName(const char * value)69     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
70 
71     /**
72      * <p>The name of the channel.</p>
73      */
WithName(const Aws::String & value)74     inline Channel& WithName(const Aws::String& value) { SetName(value); return *this;}
75 
76     /**
77      * <p>The name of the channel.</p>
78      */
WithName(Aws::String && value)79     inline Channel& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
80 
81     /**
82      * <p>The name of the channel.</p>
83      */
WithName(const char * value)84     inline Channel& WithName(const char* value) { SetName(value); return *this;}
85 
86 
87     /**
88      * <p>Where channel data is stored. You can choose one of
89      * <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not
90      * specified, the default is <code>serviceManagedS3</code>. You can't change this
91      * storage option after the channel is created.</p>
92      */
GetStorage()93     inline const ChannelStorage& GetStorage() const{ return m_storage; }
94 
95     /**
96      * <p>Where channel data is stored. You can choose one of
97      * <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not
98      * specified, the default is <code>serviceManagedS3</code>. You can't change this
99      * storage option after the channel is created.</p>
100      */
StorageHasBeenSet()101     inline bool StorageHasBeenSet() const { return m_storageHasBeenSet; }
102 
103     /**
104      * <p>Where channel data is stored. You can choose one of
105      * <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not
106      * specified, the default is <code>serviceManagedS3</code>. You can't change this
107      * storage option after the channel is created.</p>
108      */
SetStorage(const ChannelStorage & value)109     inline void SetStorage(const ChannelStorage& value) { m_storageHasBeenSet = true; m_storage = value; }
110 
111     /**
112      * <p>Where channel data is stored. You can choose one of
113      * <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not
114      * specified, the default is <code>serviceManagedS3</code>. You can't change this
115      * storage option after the channel is created.</p>
116      */
SetStorage(ChannelStorage && value)117     inline void SetStorage(ChannelStorage&& value) { m_storageHasBeenSet = true; m_storage = std::move(value); }
118 
119     /**
120      * <p>Where channel data is stored. You can choose one of
121      * <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not
122      * specified, the default is <code>serviceManagedS3</code>. You can't change this
123      * storage option after the channel is created.</p>
124      */
WithStorage(const ChannelStorage & value)125     inline Channel& WithStorage(const ChannelStorage& value) { SetStorage(value); return *this;}
126 
127     /**
128      * <p>Where channel data is stored. You can choose one of
129      * <code>serviceManagedS3</code> or <code>customerManagedS3</code> storage. If not
130      * specified, the default is <code>serviceManagedS3</code>. You can't change this
131      * storage option after the channel is created.</p>
132      */
WithStorage(ChannelStorage && value)133     inline Channel& WithStorage(ChannelStorage&& value) { SetStorage(std::move(value)); return *this;}
134 
135 
136     /**
137      * <p>The ARN of the channel.</p>
138      */
GetArn()139     inline const Aws::String& GetArn() const{ return m_arn; }
140 
141     /**
142      * <p>The ARN of the channel.</p>
143      */
ArnHasBeenSet()144     inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
145 
146     /**
147      * <p>The ARN of the channel.</p>
148      */
SetArn(const Aws::String & value)149     inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
150 
151     /**
152      * <p>The ARN of the channel.</p>
153      */
SetArn(Aws::String && value)154     inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
155 
156     /**
157      * <p>The ARN of the channel.</p>
158      */
SetArn(const char * value)159     inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
160 
161     /**
162      * <p>The ARN of the channel.</p>
163      */
WithArn(const Aws::String & value)164     inline Channel& WithArn(const Aws::String& value) { SetArn(value); return *this;}
165 
166     /**
167      * <p>The ARN of the channel.</p>
168      */
WithArn(Aws::String && value)169     inline Channel& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
170 
171     /**
172      * <p>The ARN of the channel.</p>
173      */
WithArn(const char * value)174     inline Channel& WithArn(const char* value) { SetArn(value); return *this;}
175 
176 
177     /**
178      * <p>The status of the channel.</p>
179      */
GetStatus()180     inline const ChannelStatus& GetStatus() const{ return m_status; }
181 
182     /**
183      * <p>The status of the channel.</p>
184      */
StatusHasBeenSet()185     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
186 
187     /**
188      * <p>The status of the channel.</p>
189      */
SetStatus(const ChannelStatus & value)190     inline void SetStatus(const ChannelStatus& value) { m_statusHasBeenSet = true; m_status = value; }
191 
192     /**
193      * <p>The status of the channel.</p>
194      */
SetStatus(ChannelStatus && value)195     inline void SetStatus(ChannelStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
196 
197     /**
198      * <p>The status of the channel.</p>
199      */
WithStatus(const ChannelStatus & value)200     inline Channel& WithStatus(const ChannelStatus& value) { SetStatus(value); return *this;}
201 
202     /**
203      * <p>The status of the channel.</p>
204      */
WithStatus(ChannelStatus && value)205     inline Channel& WithStatus(ChannelStatus&& value) { SetStatus(std::move(value)); return *this;}
206 
207 
208     /**
209      * <p>How long, in days, message data is kept for the channel.</p>
210      */
GetRetentionPeriod()211     inline const RetentionPeriod& GetRetentionPeriod() const{ return m_retentionPeriod; }
212 
213     /**
214      * <p>How long, in days, message data is kept for the channel.</p>
215      */
RetentionPeriodHasBeenSet()216     inline bool RetentionPeriodHasBeenSet() const { return m_retentionPeriodHasBeenSet; }
217 
218     /**
219      * <p>How long, in days, message data is kept for the channel.</p>
220      */
SetRetentionPeriod(const RetentionPeriod & value)221     inline void SetRetentionPeriod(const RetentionPeriod& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = value; }
222 
223     /**
224      * <p>How long, in days, message data is kept for the channel.</p>
225      */
SetRetentionPeriod(RetentionPeriod && value)226     inline void SetRetentionPeriod(RetentionPeriod&& value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = std::move(value); }
227 
228     /**
229      * <p>How long, in days, message data is kept for the channel.</p>
230      */
WithRetentionPeriod(const RetentionPeriod & value)231     inline Channel& WithRetentionPeriod(const RetentionPeriod& value) { SetRetentionPeriod(value); return *this;}
232 
233     /**
234      * <p>How long, in days, message data is kept for the channel.</p>
235      */
WithRetentionPeriod(RetentionPeriod && value)236     inline Channel& WithRetentionPeriod(RetentionPeriod&& value) { SetRetentionPeriod(std::move(value)); return *this;}
237 
238 
239     /**
240      * <p>When the channel was created.</p>
241      */
GetCreationTime()242     inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; }
243 
244     /**
245      * <p>When the channel was created.</p>
246      */
CreationTimeHasBeenSet()247     inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
248 
249     /**
250      * <p>When the channel was created.</p>
251      */
SetCreationTime(const Aws::Utils::DateTime & value)252     inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; }
253 
254     /**
255      * <p>When the channel was created.</p>
256      */
SetCreationTime(Aws::Utils::DateTime && value)257     inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); }
258 
259     /**
260      * <p>When the channel was created.</p>
261      */
WithCreationTime(const Aws::Utils::DateTime & value)262     inline Channel& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;}
263 
264     /**
265      * <p>When the channel was created.</p>
266      */
WithCreationTime(Aws::Utils::DateTime && value)267     inline Channel& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;}
268 
269 
270     /**
271      * <p>When the channel was last updated.</p>
272      */
GetLastUpdateTime()273     inline const Aws::Utils::DateTime& GetLastUpdateTime() const{ return m_lastUpdateTime; }
274 
275     /**
276      * <p>When the channel was last updated.</p>
277      */
LastUpdateTimeHasBeenSet()278     inline bool LastUpdateTimeHasBeenSet() const { return m_lastUpdateTimeHasBeenSet; }
279 
280     /**
281      * <p>When the channel was last updated.</p>
282      */
SetLastUpdateTime(const Aws::Utils::DateTime & value)283     inline void SetLastUpdateTime(const Aws::Utils::DateTime& value) { m_lastUpdateTimeHasBeenSet = true; m_lastUpdateTime = value; }
284 
285     /**
286      * <p>When the channel was last updated.</p>
287      */
SetLastUpdateTime(Aws::Utils::DateTime && value)288     inline void SetLastUpdateTime(Aws::Utils::DateTime&& value) { m_lastUpdateTimeHasBeenSet = true; m_lastUpdateTime = std::move(value); }
289 
290     /**
291      * <p>When the channel was last updated.</p>
292      */
WithLastUpdateTime(const Aws::Utils::DateTime & value)293     inline Channel& WithLastUpdateTime(const Aws::Utils::DateTime& value) { SetLastUpdateTime(value); return *this;}
294 
295     /**
296      * <p>When the channel was last updated.</p>
297      */
WithLastUpdateTime(Aws::Utils::DateTime && value)298     inline Channel& WithLastUpdateTime(Aws::Utils::DateTime&& value) { SetLastUpdateTime(std::move(value)); return *this;}
299 
300 
301     /**
302      * <p>The last time when a new message arrived in the channel.</p> <p>IoT Analytics
303      * updates this value at most once per minute for one channel. Hence, the
304      * <code>lastMessageArrivalTime</code> value is an approximation.</p> <p>This
305      * feature only applies to messages that arrived in the data store after October
306      * 23, 2020. </p>
307      */
GetLastMessageArrivalTime()308     inline const Aws::Utils::DateTime& GetLastMessageArrivalTime() const{ return m_lastMessageArrivalTime; }
309 
310     /**
311      * <p>The last time when a new message arrived in the channel.</p> <p>IoT Analytics
312      * updates this value at most once per minute for one channel. Hence, the
313      * <code>lastMessageArrivalTime</code> value is an approximation.</p> <p>This
314      * feature only applies to messages that arrived in the data store after October
315      * 23, 2020. </p>
316      */
LastMessageArrivalTimeHasBeenSet()317     inline bool LastMessageArrivalTimeHasBeenSet() const { return m_lastMessageArrivalTimeHasBeenSet; }
318 
319     /**
320      * <p>The last time when a new message arrived in the channel.</p> <p>IoT Analytics
321      * updates this value at most once per minute for one channel. Hence, the
322      * <code>lastMessageArrivalTime</code> value is an approximation.</p> <p>This
323      * feature only applies to messages that arrived in the data store after October
324      * 23, 2020. </p>
325      */
SetLastMessageArrivalTime(const Aws::Utils::DateTime & value)326     inline void SetLastMessageArrivalTime(const Aws::Utils::DateTime& value) { m_lastMessageArrivalTimeHasBeenSet = true; m_lastMessageArrivalTime = value; }
327 
328     /**
329      * <p>The last time when a new message arrived in the channel.</p> <p>IoT Analytics
330      * updates this value at most once per minute for one channel. Hence, the
331      * <code>lastMessageArrivalTime</code> value is an approximation.</p> <p>This
332      * feature only applies to messages that arrived in the data store after October
333      * 23, 2020. </p>
334      */
SetLastMessageArrivalTime(Aws::Utils::DateTime && value)335     inline void SetLastMessageArrivalTime(Aws::Utils::DateTime&& value) { m_lastMessageArrivalTimeHasBeenSet = true; m_lastMessageArrivalTime = std::move(value); }
336 
337     /**
338      * <p>The last time when a new message arrived in the channel.</p> <p>IoT Analytics
339      * updates this value at most once per minute for one channel. Hence, the
340      * <code>lastMessageArrivalTime</code> value is an approximation.</p> <p>This
341      * feature only applies to messages that arrived in the data store after October
342      * 23, 2020. </p>
343      */
WithLastMessageArrivalTime(const Aws::Utils::DateTime & value)344     inline Channel& WithLastMessageArrivalTime(const Aws::Utils::DateTime& value) { SetLastMessageArrivalTime(value); return *this;}
345 
346     /**
347      * <p>The last time when a new message arrived in the channel.</p> <p>IoT Analytics
348      * updates this value at most once per minute for one channel. Hence, the
349      * <code>lastMessageArrivalTime</code> value is an approximation.</p> <p>This
350      * feature only applies to messages that arrived in the data store after October
351      * 23, 2020. </p>
352      */
WithLastMessageArrivalTime(Aws::Utils::DateTime && value)353     inline Channel& WithLastMessageArrivalTime(Aws::Utils::DateTime&& value) { SetLastMessageArrivalTime(std::move(value)); return *this;}
354 
355   private:
356 
357     Aws::String m_name;
358     bool m_nameHasBeenSet;
359 
360     ChannelStorage m_storage;
361     bool m_storageHasBeenSet;
362 
363     Aws::String m_arn;
364     bool m_arnHasBeenSet;
365 
366     ChannelStatus m_status;
367     bool m_statusHasBeenSet;
368 
369     RetentionPeriod m_retentionPeriod;
370     bool m_retentionPeriodHasBeenSet;
371 
372     Aws::Utils::DateTime m_creationTime;
373     bool m_creationTimeHasBeenSet;
374 
375     Aws::Utils::DateTime m_lastUpdateTime;
376     bool m_lastUpdateTimeHasBeenSet;
377 
378     Aws::Utils::DateTime m_lastMessageArrivalTime;
379     bool m_lastMessageArrivalTimeHasBeenSet;
380   };
381 
382 } // namespace Model
383 } // namespace IoTAnalytics
384 } // namespace Aws
385