/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace ChimeSDKVoice { namespace Model { /** */ class CreateSipRuleRequest : public ChimeSDKVoiceRequest { public: AWS_CHIMESDKVOICE_API CreateSipRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateSipRule"; } AWS_CHIMESDKVOICE_API Aws::String SerializePayload() const override; /** *

The name of the SIP rule.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the SIP rule.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the SIP rule.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the SIP rule.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the SIP rule.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the SIP rule.

*/ inline CreateSipRuleRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the SIP rule.

*/ inline CreateSipRuleRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the SIP rule.

*/ inline CreateSipRuleRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The type of trigger assigned to the SIP rule in TriggerValue, * currently RequestUriHostname or ToPhoneNumber.

*/ inline const SipRuleTriggerType& GetTriggerType() const{ return m_triggerType; } /** *

The type of trigger assigned to the SIP rule in TriggerValue, * currently RequestUriHostname or ToPhoneNumber.

*/ inline bool TriggerTypeHasBeenSet() const { return m_triggerTypeHasBeenSet; } /** *

The type of trigger assigned to the SIP rule in TriggerValue, * currently RequestUriHostname or ToPhoneNumber.

*/ inline void SetTriggerType(const SipRuleTriggerType& value) { m_triggerTypeHasBeenSet = true; m_triggerType = value; } /** *

The type of trigger assigned to the SIP rule in TriggerValue, * currently RequestUriHostname or ToPhoneNumber.

*/ inline void SetTriggerType(SipRuleTriggerType&& value) { m_triggerTypeHasBeenSet = true; m_triggerType = std::move(value); } /** *

The type of trigger assigned to the SIP rule in TriggerValue, * currently RequestUriHostname or ToPhoneNumber.

*/ inline CreateSipRuleRequest& WithTriggerType(const SipRuleTriggerType& value) { SetTriggerType(value); return *this;} /** *

The type of trigger assigned to the SIP rule in TriggerValue, * currently RequestUriHostname or ToPhoneNumber.

*/ inline CreateSipRuleRequest& WithTriggerType(SipRuleTriggerType&& value) { SetTriggerType(std::move(value)); return *this;} /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline const Aws::String& GetTriggerValue() const{ return m_triggerValue; } /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline bool TriggerValueHasBeenSet() const { return m_triggerValueHasBeenSet; } /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline void SetTriggerValue(const Aws::String& value) { m_triggerValueHasBeenSet = true; m_triggerValue = value; } /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline void SetTriggerValue(Aws::String&& value) { m_triggerValueHasBeenSet = true; m_triggerValue = std::move(value); } /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline void SetTriggerValue(const char* value) { m_triggerValueHasBeenSet = true; m_triggerValue.assign(value); } /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline CreateSipRuleRequest& WithTriggerValue(const Aws::String& value) { SetTriggerValue(value); return *this;} /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline CreateSipRuleRequest& WithTriggerValue(Aws::String&& value) { SetTriggerValue(std::move(value)); return *this;} /** *

If TriggerType is RequestUriHostname, the value can * be the outbound host name of a Voice Connector. If TriggerType is * ToPhoneNumber, the value can be a customer-owned phone number in * the E164 format. The SipMediaApplication specified in the * SipRule is triggered if the request URI in an incoming SIP request * matches the RequestUriHostname, or if the To header in * the incoming SIP request matches the ToPhoneNumber value.

*/ inline CreateSipRuleRequest& WithTriggerValue(const char* value) { SetTriggerValue(value); return *this;} /** *

Disables or enables a SIP rule. You must disable SIP rules before you can * delete them.

*/ inline bool GetDisabled() const{ return m_disabled; } /** *

Disables or enables a SIP rule. You must disable SIP rules before you can * delete them.

*/ inline bool DisabledHasBeenSet() const { return m_disabledHasBeenSet; } /** *

Disables or enables a SIP rule. You must disable SIP rules before you can * delete them.

*/ inline void SetDisabled(bool value) { m_disabledHasBeenSet = true; m_disabled = value; } /** *

Disables or enables a SIP rule. You must disable SIP rules before you can * delete them.

*/ inline CreateSipRuleRequest& WithDisabled(bool value) { SetDisabled(value); return *this;} /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline const Aws::Vector& GetTargetApplications() const{ return m_targetApplications; } /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline bool TargetApplicationsHasBeenSet() const { return m_targetApplicationsHasBeenSet; } /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline void SetTargetApplications(const Aws::Vector& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications = value; } /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline void SetTargetApplications(Aws::Vector&& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications = std::move(value); } /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline CreateSipRuleRequest& WithTargetApplications(const Aws::Vector& value) { SetTargetApplications(value); return *this;} /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline CreateSipRuleRequest& WithTargetApplications(Aws::Vector&& value) { SetTargetApplications(std::move(value)); return *this;} /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline CreateSipRuleRequest& AddTargetApplications(const SipRuleTargetApplication& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications.push_back(value); return *this; } /** *

List of SIP media applications, with priority and AWS Region. Only one SIP * application per AWS Region can be used.

*/ inline CreateSipRuleRequest& AddTargetApplications(SipRuleTargetApplication&& value) { m_targetApplicationsHasBeenSet = true; m_targetApplications.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; SipRuleTriggerType m_triggerType; bool m_triggerTypeHasBeenSet = false; Aws::String m_triggerValue; bool m_triggerValueHasBeenSet = false; bool m_disabled; bool m_disabledHasBeenSet = false; Aws::Vector m_targetApplications; bool m_targetApplicationsHasBeenSet = false; }; } // namespace Model } // namespace ChimeSDKVoice } // namespace Aws