/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

Send data to an HTTPS endpoint.

See Also:

AWS API * Reference

*/ class HttpAction { public: AWS_IOT_API HttpAction(); AWS_IOT_API HttpAction(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API HttpAction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline const Aws::String& GetUrl() const{ return m_url; } /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; } /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline void SetUrl(const Aws::String& value) { m_urlHasBeenSet = true; m_url = value; } /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline void SetUrl(Aws::String&& value) { m_urlHasBeenSet = true; m_url = std::move(value); } /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline void SetUrl(const char* value) { m_urlHasBeenSet = true; m_url.assign(value); } /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline HttpAction& WithUrl(const Aws::String& value) { SetUrl(value); return *this;} /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline HttpAction& WithUrl(Aws::String&& value) { SetUrl(std::move(value)); return *this;} /** *

The endpoint URL. If substitution templates are used in the URL, you must * also specify a confirmationUrl. If this is a new destination, a new * TopicRuleDestination is created if possible.

*/ inline HttpAction& WithUrl(const char* value) { SetUrl(value); return *this;} /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline const Aws::String& GetConfirmationUrl() const{ return m_confirmationUrl; } /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline bool ConfirmationUrlHasBeenSet() const { return m_confirmationUrlHasBeenSet; } /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline void SetConfirmationUrl(const Aws::String& value) { m_confirmationUrlHasBeenSet = true; m_confirmationUrl = value; } /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline void SetConfirmationUrl(Aws::String&& value) { m_confirmationUrlHasBeenSet = true; m_confirmationUrl = std::move(value); } /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline void SetConfirmationUrl(const char* value) { m_confirmationUrlHasBeenSet = true; m_confirmationUrl.assign(value); } /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline HttpAction& WithConfirmationUrl(const Aws::String& value) { SetConfirmationUrl(value); return *this;} /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline HttpAction& WithConfirmationUrl(Aws::String&& value) { SetConfirmationUrl(std::move(value)); return *this;} /** *

The URL to which IoT sends a confirmation message. The value of the * confirmation URL must be a prefix of the endpoint URL. If you do not specify a * confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use * substitution templates in the confirmationUrl, you must create and enable topic * rule destinations that match each possible value of the substitution template * before traffic is allowed to your endpoint URL.

*/ inline HttpAction& WithConfirmationUrl(const char* value) { SetConfirmationUrl(value); return *this;} /** *

The HTTP headers to send with the message data.

*/ inline const Aws::Vector& GetHeaders() const{ return m_headers; } /** *

The HTTP headers to send with the message data.

*/ inline bool HeadersHasBeenSet() const { return m_headersHasBeenSet; } /** *

The HTTP headers to send with the message data.

*/ inline void SetHeaders(const Aws::Vector& value) { m_headersHasBeenSet = true; m_headers = value; } /** *

The HTTP headers to send with the message data.

*/ inline void SetHeaders(Aws::Vector&& value) { m_headersHasBeenSet = true; m_headers = std::move(value); } /** *

The HTTP headers to send with the message data.

*/ inline HttpAction& WithHeaders(const Aws::Vector& value) { SetHeaders(value); return *this;} /** *

The HTTP headers to send with the message data.

*/ inline HttpAction& WithHeaders(Aws::Vector&& value) { SetHeaders(std::move(value)); return *this;} /** *

The HTTP headers to send with the message data.

*/ inline HttpAction& AddHeaders(const HttpActionHeader& value) { m_headersHasBeenSet = true; m_headers.push_back(value); return *this; } /** *

The HTTP headers to send with the message data.

*/ inline HttpAction& AddHeaders(HttpActionHeader&& value) { m_headersHasBeenSet = true; m_headers.push_back(std::move(value)); return *this; } /** *

The authentication method to use when sending data to an HTTPS endpoint.

*/ inline const HttpAuthorization& GetAuth() const{ return m_auth; } /** *

The authentication method to use when sending data to an HTTPS endpoint.

*/ inline bool AuthHasBeenSet() const { return m_authHasBeenSet; } /** *

The authentication method to use when sending data to an HTTPS endpoint.

*/ inline void SetAuth(const HttpAuthorization& value) { m_authHasBeenSet = true; m_auth = value; } /** *

The authentication method to use when sending data to an HTTPS endpoint.

*/ inline void SetAuth(HttpAuthorization&& value) { m_authHasBeenSet = true; m_auth = std::move(value); } /** *

The authentication method to use when sending data to an HTTPS endpoint.

*/ inline HttpAction& WithAuth(const HttpAuthorization& value) { SetAuth(value); return *this;} /** *

The authentication method to use when sending data to an HTTPS endpoint.

*/ inline HttpAction& WithAuth(HttpAuthorization&& value) { SetAuth(std::move(value)); return *this;} private: Aws::String m_url; bool m_urlHasBeenSet = false; Aws::String m_confirmationUrl; bool m_confirmationUrlHasBeenSet = false; Aws::Vector m_headers; bool m_headersHasBeenSet = false; HttpAuthorization m_auth; bool m_authHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws