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/chime/Chime_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/chime/model/SipRuleTriggerType.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/core/utils/DateTime.h>
12 #include <aws/chime/model/SipRuleTargetApplication.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 Chime
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>The SIP rule details, including name, triggers, and target applications. An
32    * AWS account can have multiple SIP rules.</p><p><h3>See Also:</h3>   <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/chime-2018-05-01/SipRule">AWS API
34    * Reference</a></p>
35    */
36   class AWS_CHIME_API SipRule
37   {
38   public:
39     SipRule();
40     SipRule(Aws::Utils::Json::JsonView jsonValue);
41     SipRule& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p>The SIP rule ID.</p>
47      */
GetSipRuleId()48     inline const Aws::String& GetSipRuleId() const{ return m_sipRuleId; }
49 
50     /**
51      * <p>The SIP rule ID.</p>
52      */
SipRuleIdHasBeenSet()53     inline bool SipRuleIdHasBeenSet() const { return m_sipRuleIdHasBeenSet; }
54 
55     /**
56      * <p>The SIP rule ID.</p>
57      */
SetSipRuleId(const Aws::String & value)58     inline void SetSipRuleId(const Aws::String& value) { m_sipRuleIdHasBeenSet = true; m_sipRuleId = value; }
59 
60     /**
61      * <p>The SIP rule ID.</p>
62      */
SetSipRuleId(Aws::String && value)63     inline void SetSipRuleId(Aws::String&& value) { m_sipRuleIdHasBeenSet = true; m_sipRuleId = std::move(value); }
64 
65     /**
66      * <p>The SIP rule ID.</p>
67      */
SetSipRuleId(const char * value)68     inline void SetSipRuleId(const char* value) { m_sipRuleIdHasBeenSet = true; m_sipRuleId.assign(value); }
69 
70     /**
71      * <p>The SIP rule ID.</p>
72      */
WithSipRuleId(const Aws::String & value)73     inline SipRule& WithSipRuleId(const Aws::String& value) { SetSipRuleId(value); return *this;}
74 
75     /**
76      * <p>The SIP rule ID.</p>
77      */
WithSipRuleId(Aws::String && value)78     inline SipRule& WithSipRuleId(Aws::String&& value) { SetSipRuleId(std::move(value)); return *this;}
79 
80     /**
81      * <p>The SIP rule ID.</p>
82      */
WithSipRuleId(const char * value)83     inline SipRule& WithSipRuleId(const char* value) { SetSipRuleId(value); return *this;}
84 
85 
86     /**
87      * <p>The name of the SIP rule.</p>
88      */
GetName()89     inline const Aws::String& GetName() const{ return m_name; }
90 
91     /**
92      * <p>The name of the SIP rule.</p>
93      */
NameHasBeenSet()94     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
95 
96     /**
97      * <p>The name of the SIP rule.</p>
98      */
SetName(const Aws::String & value)99     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
100 
101     /**
102      * <p>The name of the SIP rule.</p>
103      */
SetName(Aws::String && value)104     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
105 
106     /**
107      * <p>The name of the SIP rule.</p>
108      */
SetName(const char * value)109     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
110 
111     /**
112      * <p>The name of the SIP rule.</p>
113      */
WithName(const Aws::String & value)114     inline SipRule& WithName(const Aws::String& value) { SetName(value); return *this;}
115 
116     /**
117      * <p>The name of the SIP rule.</p>
118      */
WithName(Aws::String && value)119     inline SipRule& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
120 
121     /**
122      * <p>The name of the SIP rule.</p>
123      */
WithName(const char * value)124     inline SipRule& WithName(const char* value) { SetName(value); return *this;}
125 
126 
127     /**
128      * <p>Indicates whether the SIP rule is enabled or disabled. You must disable a
129      * rule before you can delete it.</p>
130      */
GetDisabled()131     inline bool GetDisabled() const{ return m_disabled; }
132 
133     /**
134      * <p>Indicates whether the SIP rule is enabled or disabled. You must disable a
135      * rule before you can delete it.</p>
136      */
DisabledHasBeenSet()137     inline bool DisabledHasBeenSet() const { return m_disabledHasBeenSet; }
138 
139     /**
140      * <p>Indicates whether the SIP rule is enabled or disabled. You must disable a
141      * rule before you can delete it.</p>
142      */
SetDisabled(bool value)143     inline void SetDisabled(bool value) { m_disabledHasBeenSet = true; m_disabled = value; }
144 
145     /**
146      * <p>Indicates whether the SIP rule is enabled or disabled. You must disable a
147      * rule before you can delete it.</p>
148      */
WithDisabled(bool value)149     inline SipRule& WithDisabled(bool value) { SetDisabled(value); return *this;}
150 
151 
152     /**
153      * <p>The type of trigger assigned to the SIP rule in <code>TriggerValue</code>,
154      * currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.</p>
155      */
GetTriggerType()156     inline const SipRuleTriggerType& GetTriggerType() const{ return m_triggerType; }
157 
158     /**
159      * <p>The type of trigger assigned to the SIP rule in <code>TriggerValue</code>,
160      * currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.</p>
161      */
TriggerTypeHasBeenSet()162     inline bool TriggerTypeHasBeenSet() const { return m_triggerTypeHasBeenSet; }
163 
164     /**
165      * <p>The type of trigger assigned to the SIP rule in <code>TriggerValue</code>,
166      * currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.</p>
167      */
SetTriggerType(const SipRuleTriggerType & value)168     inline void SetTriggerType(const SipRuleTriggerType& value) { m_triggerTypeHasBeenSet = true; m_triggerType = value; }
169 
170     /**
171      * <p>The type of trigger assigned to the SIP rule in <code>TriggerValue</code>,
172      * currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.</p>
173      */
SetTriggerType(SipRuleTriggerType && value)174     inline void SetTriggerType(SipRuleTriggerType&& value) { m_triggerTypeHasBeenSet = true; m_triggerType = std::move(value); }
175 
176     /**
177      * <p>The type of trigger assigned to the SIP rule in <code>TriggerValue</code>,
178      * currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.</p>
179      */
WithTriggerType(const SipRuleTriggerType & value)180     inline SipRule& WithTriggerType(const SipRuleTriggerType& value) { SetTriggerType(value); return *this;}
181 
182     /**
183      * <p>The type of trigger assigned to the SIP rule in <code>TriggerValue</code>,
184      * currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.</p>
185      */
WithTriggerType(SipRuleTriggerType && value)186     inline SipRule& WithTriggerType(SipRuleTriggerType&& value) { SetTriggerType(std::move(value)); return *this;}
187 
188 
189     /**
190      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
191      * value can be the outbound host name of the Amazon Chime Voice Connector. If
192      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
193      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
194      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
195      * incoming SIP request.</p>
196      */
GetTriggerValue()197     inline const Aws::String& GetTriggerValue() const{ return m_triggerValue; }
198 
199     /**
200      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
201      * value can be the outbound host name of the Amazon Chime Voice Connector. If
202      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
203      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
204      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
205      * incoming SIP request.</p>
206      */
TriggerValueHasBeenSet()207     inline bool TriggerValueHasBeenSet() const { return m_triggerValueHasBeenSet; }
208 
209     /**
210      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
211      * value can be the outbound host name of the Amazon Chime Voice Connector. If
212      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
213      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
214      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
215      * incoming SIP request.</p>
216      */
SetTriggerValue(const Aws::String & value)217     inline void SetTriggerValue(const Aws::String& value) { m_triggerValueHasBeenSet = true; m_triggerValue = value; }
218 
219     /**
220      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
221      * value can be the outbound host name of the Amazon Chime Voice Connector. If
222      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
223      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
224      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
225      * incoming SIP request.</p>
226      */
SetTriggerValue(Aws::String && value)227     inline void SetTriggerValue(Aws::String&& value) { m_triggerValueHasBeenSet = true; m_triggerValue = std::move(value); }
228 
229     /**
230      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
231      * value can be the outbound host name of the Amazon Chime Voice Connector. If
232      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
233      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
234      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
235      * incoming SIP request.</p>
236      */
SetTriggerValue(const char * value)237     inline void SetTriggerValue(const char* value) { m_triggerValueHasBeenSet = true; m_triggerValue.assign(value); }
238 
239     /**
240      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
241      * value can be the outbound host name of the Amazon Chime Voice Connector. If
242      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
243      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
244      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
245      * incoming SIP request.</p>
246      */
WithTriggerValue(const Aws::String & value)247     inline SipRule& WithTriggerValue(const Aws::String& value) { SetTriggerValue(value); return *this;}
248 
249     /**
250      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
251      * value can be the outbound host name of the Amazon Chime Voice Connector. If
252      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
253      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
254      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
255      * incoming SIP request.</p>
256      */
WithTriggerValue(Aws::String && value)257     inline SipRule& WithTriggerValue(Aws::String&& value) { SetTriggerValue(std::move(value)); return *this;}
258 
259     /**
260      * <p>If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the
261      * value can be the outbound host name of the Amazon Chime Voice Connector. If
262      * <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a
263      * customer-owned phone number in E164 format. <code>SipRule</code> is triggered
264      * when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the
265      * incoming SIP request.</p>
266      */
WithTriggerValue(const char * value)267     inline SipRule& WithTriggerValue(const char* value) { SetTriggerValue(value); return *this;}
268 
269 
270     /**
271      * <p>Target SIP media application and other details, such as priority and AWS
272      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
273      * provided.</p>
274      */
GetTargetApplications()275     inline const Aws::Vector<SipRuleTargetApplication>& GetTargetApplications() const{ return m_targetApplications; }
276 
277     /**
278      * <p>Target SIP media application and other details, such as priority and AWS
279      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
280      * provided.</p>
281      */
TargetApplicationsHasBeenSet()282     inline bool TargetApplicationsHasBeenSet() const { return m_targetApplicationsHasBeenSet; }
283 
284     /**
285      * <p>Target SIP media application and other details, such as priority and AWS
286      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
287      * provided.</p>
288      */
SetTargetApplications(const Aws::Vector<SipRuleTargetApplication> & value)289     inline void SetTargetApplications(const Aws::Vector<SipRuleTargetApplication>& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications = value; }
290 
291     /**
292      * <p>Target SIP media application and other details, such as priority and AWS
293      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
294      * provided.</p>
295      */
SetTargetApplications(Aws::Vector<SipRuleTargetApplication> && value)296     inline void SetTargetApplications(Aws::Vector<SipRuleTargetApplication>&& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications = std::move(value); }
297 
298     /**
299      * <p>Target SIP media application and other details, such as priority and AWS
300      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
301      * provided.</p>
302      */
WithTargetApplications(const Aws::Vector<SipRuleTargetApplication> & value)303     inline SipRule& WithTargetApplications(const Aws::Vector<SipRuleTargetApplication>& value) { SetTargetApplications(value); return *this;}
304 
305     /**
306      * <p>Target SIP media application and other details, such as priority and AWS
307      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
308      * provided.</p>
309      */
WithTargetApplications(Aws::Vector<SipRuleTargetApplication> && value)310     inline SipRule& WithTargetApplications(Aws::Vector<SipRuleTargetApplication>&& value) { SetTargetApplications(std::move(value)); return *this;}
311 
312     /**
313      * <p>Target SIP media application and other details, such as priority and AWS
314      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
315      * provided.</p>
316      */
AddTargetApplications(const SipRuleTargetApplication & value)317     inline SipRule& AddTargetApplications(const SipRuleTargetApplication& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications.push_back(value); return *this; }
318 
319     /**
320      * <p>Target SIP media application and other details, such as priority and AWS
321      * Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be
322      * provided.</p>
323      */
AddTargetApplications(SipRuleTargetApplication && value)324     inline SipRule& AddTargetApplications(SipRuleTargetApplication&& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications.push_back(std::move(value)); return *this; }
325 
326 
327     /**
328      * <p>The time at which the SIP rule was created, in ISO 8601 format.</p>
329      */
GetCreatedTimestamp()330     inline const Aws::Utils::DateTime& GetCreatedTimestamp() const{ return m_createdTimestamp; }
331 
332     /**
333      * <p>The time at which the SIP rule was created, in ISO 8601 format.</p>
334      */
CreatedTimestampHasBeenSet()335     inline bool CreatedTimestampHasBeenSet() const { return m_createdTimestampHasBeenSet; }
336 
337     /**
338      * <p>The time at which the SIP rule was created, in ISO 8601 format.</p>
339      */
SetCreatedTimestamp(const Aws::Utils::DateTime & value)340     inline void SetCreatedTimestamp(const Aws::Utils::DateTime& value) { m_createdTimestampHasBeenSet = true; m_createdTimestamp = value; }
341 
342     /**
343      * <p>The time at which the SIP rule was created, in ISO 8601 format.</p>
344      */
SetCreatedTimestamp(Aws::Utils::DateTime && value)345     inline void SetCreatedTimestamp(Aws::Utils::DateTime&& value) { m_createdTimestampHasBeenSet = true; m_createdTimestamp = std::move(value); }
346 
347     /**
348      * <p>The time at which the SIP rule was created, in ISO 8601 format.</p>
349      */
WithCreatedTimestamp(const Aws::Utils::DateTime & value)350     inline SipRule& WithCreatedTimestamp(const Aws::Utils::DateTime& value) { SetCreatedTimestamp(value); return *this;}
351 
352     /**
353      * <p>The time at which the SIP rule was created, in ISO 8601 format.</p>
354      */
WithCreatedTimestamp(Aws::Utils::DateTime && value)355     inline SipRule& WithCreatedTimestamp(Aws::Utils::DateTime&& value) { SetCreatedTimestamp(std::move(value)); return *this;}
356 
357 
358     /**
359      * <p>The time at which the SIP rule was last updated, in ISO 8601 format.</p>
360      */
GetUpdatedTimestamp()361     inline const Aws::Utils::DateTime& GetUpdatedTimestamp() const{ return m_updatedTimestamp; }
362 
363     /**
364      * <p>The time at which the SIP rule was last updated, in ISO 8601 format.</p>
365      */
UpdatedTimestampHasBeenSet()366     inline bool UpdatedTimestampHasBeenSet() const { return m_updatedTimestampHasBeenSet; }
367 
368     /**
369      * <p>The time at which the SIP rule was last updated, in ISO 8601 format.</p>
370      */
SetUpdatedTimestamp(const Aws::Utils::DateTime & value)371     inline void SetUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_updatedTimestampHasBeenSet = true; m_updatedTimestamp = value; }
372 
373     /**
374      * <p>The time at which the SIP rule was last updated, in ISO 8601 format.</p>
375      */
SetUpdatedTimestamp(Aws::Utils::DateTime && value)376     inline void SetUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_updatedTimestampHasBeenSet = true; m_updatedTimestamp = std::move(value); }
377 
378     /**
379      * <p>The time at which the SIP rule was last updated, in ISO 8601 format.</p>
380      */
WithUpdatedTimestamp(const Aws::Utils::DateTime & value)381     inline SipRule& WithUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetUpdatedTimestamp(value); return *this;}
382 
383     /**
384      * <p>The time at which the SIP rule was last updated, in ISO 8601 format.</p>
385      */
WithUpdatedTimestamp(Aws::Utils::DateTime && value)386     inline SipRule& WithUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetUpdatedTimestamp(std::move(value)); return *this;}
387 
388   private:
389 
390     Aws::String m_sipRuleId;
391     bool m_sipRuleIdHasBeenSet;
392 
393     Aws::String m_name;
394     bool m_nameHasBeenSet;
395 
396     bool m_disabled;
397     bool m_disabledHasBeenSet;
398 
399     SipRuleTriggerType m_triggerType;
400     bool m_triggerTypeHasBeenSet;
401 
402     Aws::String m_triggerValue;
403     bool m_triggerValueHasBeenSet;
404 
405     Aws::Vector<SipRuleTargetApplication> m_targetApplications;
406     bool m_targetApplicationsHasBeenSet;
407 
408     Aws::Utils::DateTime m_createdTimestamp;
409     bool m_createdTimestampHasBeenSet;
410 
411     Aws::Utils::DateTime m_updatedTimestamp;
412     bool m_updatedTimestampHasBeenSet;
413   };
414 
415 } // namespace Model
416 } // namespace Chime
417 } // namespace Aws
418