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

A CloudFront function that is associated with a cache behavior in a * CloudFront distribution.

See Also:

AWS * API Reference

*/ class FunctionAssociation { public: AWS_CLOUDFRONT_API FunctionAssociation(); AWS_CLOUDFRONT_API FunctionAssociation(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API FunctionAssociation& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; /** *

The Amazon Resource Name (ARN) of the function.

*/ inline const Aws::String& GetFunctionARN() const{ return m_functionARN; } /** *

The Amazon Resource Name (ARN) of the function.

*/ inline bool FunctionARNHasBeenSet() const { return m_functionARNHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the function.

*/ inline void SetFunctionARN(const Aws::String& value) { m_functionARNHasBeenSet = true; m_functionARN = value; } /** *

The Amazon Resource Name (ARN) of the function.

*/ inline void SetFunctionARN(Aws::String&& value) { m_functionARNHasBeenSet = true; m_functionARN = std::move(value); } /** *

The Amazon Resource Name (ARN) of the function.

*/ inline void SetFunctionARN(const char* value) { m_functionARNHasBeenSet = true; m_functionARN.assign(value); } /** *

The Amazon Resource Name (ARN) of the function.

*/ inline FunctionAssociation& WithFunctionARN(const Aws::String& value) { SetFunctionARN(value); return *this;} /** *

The Amazon Resource Name (ARN) of the function.

*/ inline FunctionAssociation& WithFunctionARN(Aws::String&& value) { SetFunctionARN(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the function.

*/ inline FunctionAssociation& WithFunctionARN(const char* value) { SetFunctionARN(value); return *this;} /** *

The event type of the function, either viewer-request or * viewer-response. You cannot use origin-facing event types * (origin-request and origin-response) with a CloudFront * function.

*/ inline const EventType& GetEventType() const{ return m_eventType; } /** *

The event type of the function, either viewer-request or * viewer-response. You cannot use origin-facing event types * (origin-request and origin-response) with a CloudFront * function.

*/ inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; } /** *

The event type of the function, either viewer-request or * viewer-response. You cannot use origin-facing event types * (origin-request and origin-response) with a CloudFront * function.

*/ inline void SetEventType(const EventType& value) { m_eventTypeHasBeenSet = true; m_eventType = value; } /** *

The event type of the function, either viewer-request or * viewer-response. You cannot use origin-facing event types * (origin-request and origin-response) with a CloudFront * function.

*/ inline void SetEventType(EventType&& value) { m_eventTypeHasBeenSet = true; m_eventType = std::move(value); } /** *

The event type of the function, either viewer-request or * viewer-response. You cannot use origin-facing event types * (origin-request and origin-response) with a CloudFront * function.

*/ inline FunctionAssociation& WithEventType(const EventType& value) { SetEventType(value); return *this;} /** *

The event type of the function, either viewer-request or * viewer-response. You cannot use origin-facing event types * (origin-request and origin-response) with a CloudFront * function.

*/ inline FunctionAssociation& WithEventType(EventType&& value) { SetEventType(std::move(value)); return *this;} private: Aws::String m_functionARN; bool m_functionARNHasBeenSet = false; EventType m_eventType; bool m_eventTypeHasBeenSet = false; }; } // namespace Model } // namespace CloudFront } // namespace Aws