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/s3-crt/S3Crt_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/memory/stl/AWSVector.h> 10 #include <aws/s3-crt/model/Event.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Xml 18 { 19 class XmlNode; 20 } // namespace Xml 21 } // namespace Utils 22 namespace S3Crt 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Container for specifying the Lambda notification configuration.</p><p><h3>See 29 * Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CloudFunctionConfiguration">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_S3CRT_API CloudFunctionConfiguration 34 { 35 public: 36 CloudFunctionConfiguration(); 37 CloudFunctionConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode); 38 CloudFunctionConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 39 40 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; 41 42 43 GetId()44 inline const Aws::String& GetId() const{ return m_id; } 45 46 IdHasBeenSet()47 inline bool IdHasBeenSet() const { return m_idHasBeenSet; } 48 49 SetId(const Aws::String & value)50 inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } 51 52 SetId(Aws::String && value)53 inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } 54 55 SetId(const char * value)56 inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } 57 58 WithId(const Aws::String & value)59 inline CloudFunctionConfiguration& WithId(const Aws::String& value) { SetId(value); return *this;} 60 61 WithId(Aws::String && value)62 inline CloudFunctionConfiguration& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} 63 64 WithId(const char * value)65 inline CloudFunctionConfiguration& WithId(const char* value) { SetId(value); return *this;} 66 67 68 /** 69 * <p>Bucket events for which to send notifications.</p> 70 */ GetEvents()71 inline const Aws::Vector<Event>& GetEvents() const{ return m_events; } 72 73 /** 74 * <p>Bucket events for which to send notifications.</p> 75 */ EventsHasBeenSet()76 inline bool EventsHasBeenSet() const { return m_eventsHasBeenSet; } 77 78 /** 79 * <p>Bucket events for which to send notifications.</p> 80 */ SetEvents(const Aws::Vector<Event> & value)81 inline void SetEvents(const Aws::Vector<Event>& value) { m_eventsHasBeenSet = true; m_events = value; } 82 83 /** 84 * <p>Bucket events for which to send notifications.</p> 85 */ SetEvents(Aws::Vector<Event> && value)86 inline void SetEvents(Aws::Vector<Event>&& value) { m_eventsHasBeenSet = true; m_events = std::move(value); } 87 88 /** 89 * <p>Bucket events for which to send notifications.</p> 90 */ WithEvents(const Aws::Vector<Event> & value)91 inline CloudFunctionConfiguration& WithEvents(const Aws::Vector<Event>& value) { SetEvents(value); return *this;} 92 93 /** 94 * <p>Bucket events for which to send notifications.</p> 95 */ WithEvents(Aws::Vector<Event> && value)96 inline CloudFunctionConfiguration& WithEvents(Aws::Vector<Event>&& value) { SetEvents(std::move(value)); return *this;} 97 98 /** 99 * <p>Bucket events for which to send notifications.</p> 100 */ AddEvents(const Event & value)101 inline CloudFunctionConfiguration& AddEvents(const Event& value) { m_eventsHasBeenSet = true; m_events.push_back(value); return *this; } 102 103 /** 104 * <p>Bucket events for which to send notifications.</p> 105 */ AddEvents(Event && value)106 inline CloudFunctionConfiguration& AddEvents(Event&& value) { m_eventsHasBeenSet = true; m_events.push_back(std::move(value)); return *this; } 107 108 109 /** 110 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 111 * the specified type.</p> 112 */ GetCloudFunction()113 inline const Aws::String& GetCloudFunction() const{ return m_cloudFunction; } 114 115 /** 116 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 117 * the specified type.</p> 118 */ CloudFunctionHasBeenSet()119 inline bool CloudFunctionHasBeenSet() const { return m_cloudFunctionHasBeenSet; } 120 121 /** 122 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 123 * the specified type.</p> 124 */ SetCloudFunction(const Aws::String & value)125 inline void SetCloudFunction(const Aws::String& value) { m_cloudFunctionHasBeenSet = true; m_cloudFunction = value; } 126 127 /** 128 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 129 * the specified type.</p> 130 */ SetCloudFunction(Aws::String && value)131 inline void SetCloudFunction(Aws::String&& value) { m_cloudFunctionHasBeenSet = true; m_cloudFunction = std::move(value); } 132 133 /** 134 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 135 * the specified type.</p> 136 */ SetCloudFunction(const char * value)137 inline void SetCloudFunction(const char* value) { m_cloudFunctionHasBeenSet = true; m_cloudFunction.assign(value); } 138 139 /** 140 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 141 * the specified type.</p> 142 */ WithCloudFunction(const Aws::String & value)143 inline CloudFunctionConfiguration& WithCloudFunction(const Aws::String& value) { SetCloudFunction(value); return *this;} 144 145 /** 146 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 147 * the specified type.</p> 148 */ WithCloudFunction(Aws::String && value)149 inline CloudFunctionConfiguration& WithCloudFunction(Aws::String&& value) { SetCloudFunction(std::move(value)); return *this;} 150 151 /** 152 * <p>Lambda cloud function ARN that Amazon S3 can invoke when it detects events of 153 * the specified type.</p> 154 */ WithCloudFunction(const char * value)155 inline CloudFunctionConfiguration& WithCloudFunction(const char* value) { SetCloudFunction(value); return *this;} 156 157 158 /** 159 * <p>The role supporting the invocation of the Lambda function</p> 160 */ GetInvocationRole()161 inline const Aws::String& GetInvocationRole() const{ return m_invocationRole; } 162 163 /** 164 * <p>The role supporting the invocation of the Lambda function</p> 165 */ InvocationRoleHasBeenSet()166 inline bool InvocationRoleHasBeenSet() const { return m_invocationRoleHasBeenSet; } 167 168 /** 169 * <p>The role supporting the invocation of the Lambda function</p> 170 */ SetInvocationRole(const Aws::String & value)171 inline void SetInvocationRole(const Aws::String& value) { m_invocationRoleHasBeenSet = true; m_invocationRole = value; } 172 173 /** 174 * <p>The role supporting the invocation of the Lambda function</p> 175 */ SetInvocationRole(Aws::String && value)176 inline void SetInvocationRole(Aws::String&& value) { m_invocationRoleHasBeenSet = true; m_invocationRole = std::move(value); } 177 178 /** 179 * <p>The role supporting the invocation of the Lambda function</p> 180 */ SetInvocationRole(const char * value)181 inline void SetInvocationRole(const char* value) { m_invocationRoleHasBeenSet = true; m_invocationRole.assign(value); } 182 183 /** 184 * <p>The role supporting the invocation of the Lambda function</p> 185 */ WithInvocationRole(const Aws::String & value)186 inline CloudFunctionConfiguration& WithInvocationRole(const Aws::String& value) { SetInvocationRole(value); return *this;} 187 188 /** 189 * <p>The role supporting the invocation of the Lambda function</p> 190 */ WithInvocationRole(Aws::String && value)191 inline CloudFunctionConfiguration& WithInvocationRole(Aws::String&& value) { SetInvocationRole(std::move(value)); return *this;} 192 193 /** 194 * <p>The role supporting the invocation of the Lambda function</p> 195 */ WithInvocationRole(const char * value)196 inline CloudFunctionConfiguration& WithInvocationRole(const char* value) { SetInvocationRole(value); return *this;} 197 198 private: 199 200 Aws::String m_id; 201 bool m_idHasBeenSet; 202 203 Aws::Vector<Event> m_events; 204 bool m_eventsHasBeenSet; 205 206 Aws::String m_cloudFunction; 207 bool m_cloudFunctionHasBeenSet; 208 209 Aws::String m_invocationRole; 210 bool m_invocationRoleHasBeenSet; 211 }; 212 213 } // namespace Model 214 } // namespace S3Crt 215 } // namespace Aws 216