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

Container for specifying the Lambda notification configuration.

See * Also:

AWS * API Reference

*/ class AWS_S3_API CloudFunctionConfiguration { public: CloudFunctionConfiguration(); CloudFunctionConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); CloudFunctionConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; inline const Aws::String& GetId() const{ return m_id; } inline bool IdHasBeenSet() const { return m_idHasBeenSet; } inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } inline CloudFunctionConfiguration& WithId(const Aws::String& value) { SetId(value); return *this;} inline CloudFunctionConfiguration& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} inline CloudFunctionConfiguration& WithId(const char* value) { SetId(value); return *this;} /** *

Bucket events for which to send notifications.

*/ inline const Aws::Vector& GetEvents() const{ return m_events; } /** *

Bucket events for which to send notifications.

*/ inline bool EventsHasBeenSet() const { return m_eventsHasBeenSet; } /** *

Bucket events for which to send notifications.

*/ inline void SetEvents(const Aws::Vector& value) { m_eventsHasBeenSet = true; m_events = value; } /** *

Bucket events for which to send notifications.

*/ inline void SetEvents(Aws::Vector&& value) { m_eventsHasBeenSet = true; m_events = std::move(value); } /** *

Bucket events for which to send notifications.

*/ inline CloudFunctionConfiguration& WithEvents(const Aws::Vector& value) { SetEvents(value); return *this;} /** *

Bucket events for which to send notifications.

*/ inline CloudFunctionConfiguration& WithEvents(Aws::Vector&& value) { SetEvents(std::move(value)); return *this;} /** *

Bucket events for which to send notifications.

*/ inline CloudFunctionConfiguration& AddEvents(const Event& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; } /** *

Bucket events for which to send notifications.

*/ inline CloudFunctionConfiguration& AddEvents(Event&& value) { m_eventsHasBeenSet = true; m_events.push_back(std::move(value)); return *this; } /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline const Aws::String& GetCloudFunction() const{ return m_cloudFunction; } /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline bool CloudFunctionHasBeenSet() const { return m_cloudFunctionHasBeenSet; } /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline void SetCloudFunction(const Aws::String& value) { m_cloudFunctionHasBeenSet = true; m_cloudFunction = value; } /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline void SetCloudFunction(Aws::String&& value) { m_cloudFunctionHasBeenSet = true; m_cloudFunction = std::move(value); } /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline void SetCloudFunction(const char* value) { m_cloudFunctionHasBeenSet = true; m_cloudFunction.assign(value); } /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline CloudFunctionConfiguration& WithCloudFunction(const Aws::String& value) { SetCloudFunction(value); return *this;} /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline CloudFunctionConfiguration& WithCloudFunction(Aws::String&& value) { SetCloudFunction(std::move(value)); return *this;} /** *

Lambda cloud function ARN that Amazon S3 can invoke when it detects events of * the specified type.

*/ inline CloudFunctionConfiguration& WithCloudFunction(const char* value) { SetCloudFunction(value); return *this;} /** *

The role supporting the invocation of the Lambda function

*/ inline const Aws::String& GetInvocationRole() const{ return m_invocationRole; } /** *

The role supporting the invocation of the Lambda function

*/ inline bool InvocationRoleHasBeenSet() const { return m_invocationRoleHasBeenSet; } /** *

The role supporting the invocation of the Lambda function

*/ inline void SetInvocationRole(const Aws::String& value) { m_invocationRoleHasBeenSet = true; m_invocationRole = value; } /** *

The role supporting the invocation of the Lambda function

*/ inline void SetInvocationRole(Aws::String&& value) { m_invocationRoleHasBeenSet = true; m_invocationRole = std::move(value); } /** *

The role supporting the invocation of the Lambda function

*/ inline void SetInvocationRole(const char* value) { m_invocationRoleHasBeenSet = true; m_invocationRole.assign(value); } /** *

The role supporting the invocation of the Lambda function

*/ inline CloudFunctionConfiguration& WithInvocationRole(const Aws::String& value) { SetInvocationRole(value); return *this;} /** *

The role supporting the invocation of the Lambda function

*/ inline CloudFunctionConfiguration& WithInvocationRole(Aws::String&& value) { SetInvocationRole(std::move(value)); return *this;} /** *

The role supporting the invocation of the Lambda function

*/ inline CloudFunctionConfiguration& WithInvocationRole(const char* value) { SetInvocationRole(value); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; Aws::Vector m_events; bool m_eventsHasBeenSet; Aws::String m_cloudFunction; bool m_cloudFunctionHasBeenSet; Aws::String m_invocationRole; bool m_invocationRoleHasBeenSet; }; } // namespace Model } // namespace S3 } // namespace Aws