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/appsync/AppSync_EXPORTS.h>
8 #include <aws/appsync/AppSyncRequest.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <aws/appsync/model/SyncConfig.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace AppSync
16 {
17 namespace Model
18 {
19 
20   /**
21    */
22   class AWS_APPSYNC_API UpdateFunctionRequest : public AppSyncRequest
23   {
24   public:
25     UpdateFunctionRequest();
26 
27     // Service request name is the Operation name which will send this request out,
28     // each operation should has unique request name, so that we can get operation's name from this request.
29     // Note: this is not true for response, multiple operations may have the same response name,
30     // so we can not get operation's name from response.
GetServiceRequestName()31     inline virtual const char* GetServiceRequestName() const override { return "UpdateFunction"; }
32 
33     Aws::String SerializePayload() const override;
34 
35 
36     /**
37      * <p>The GraphQL API ID.</p>
38      */
GetApiId()39     inline const Aws::String& GetApiId() const{ return m_apiId; }
40 
41     /**
42      * <p>The GraphQL API ID.</p>
43      */
ApiIdHasBeenSet()44     inline bool ApiIdHasBeenSet() const { return m_apiIdHasBeenSet; }
45 
46     /**
47      * <p>The GraphQL API ID.</p>
48      */
SetApiId(const Aws::String & value)49     inline void SetApiId(const Aws::String& value) { m_apiIdHasBeenSet = true; m_apiId = value; }
50 
51     /**
52      * <p>The GraphQL API ID.</p>
53      */
SetApiId(Aws::String && value)54     inline void SetApiId(Aws::String&& value) { m_apiIdHasBeenSet = true; m_apiId = std::move(value); }
55 
56     /**
57      * <p>The GraphQL API ID.</p>
58      */
SetApiId(const char * value)59     inline void SetApiId(const char* value) { m_apiIdHasBeenSet = true; m_apiId.assign(value); }
60 
61     /**
62      * <p>The GraphQL API ID.</p>
63      */
WithApiId(const Aws::String & value)64     inline UpdateFunctionRequest& WithApiId(const Aws::String& value) { SetApiId(value); return *this;}
65 
66     /**
67      * <p>The GraphQL API ID.</p>
68      */
WithApiId(Aws::String && value)69     inline UpdateFunctionRequest& WithApiId(Aws::String&& value) { SetApiId(std::move(value)); return *this;}
70 
71     /**
72      * <p>The GraphQL API ID.</p>
73      */
WithApiId(const char * value)74     inline UpdateFunctionRequest& WithApiId(const char* value) { SetApiId(value); return *this;}
75 
76 
77     /**
78      * <p>The <code>Function</code> name.</p>
79      */
GetName()80     inline const Aws::String& GetName() const{ return m_name; }
81 
82     /**
83      * <p>The <code>Function</code> name.</p>
84      */
NameHasBeenSet()85     inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
86 
87     /**
88      * <p>The <code>Function</code> name.</p>
89      */
SetName(const Aws::String & value)90     inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
91 
92     /**
93      * <p>The <code>Function</code> name.</p>
94      */
SetName(Aws::String && value)95     inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
96 
97     /**
98      * <p>The <code>Function</code> name.</p>
99      */
SetName(const char * value)100     inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
101 
102     /**
103      * <p>The <code>Function</code> name.</p>
104      */
WithName(const Aws::String & value)105     inline UpdateFunctionRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
106 
107     /**
108      * <p>The <code>Function</code> name.</p>
109      */
WithName(Aws::String && value)110     inline UpdateFunctionRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
111 
112     /**
113      * <p>The <code>Function</code> name.</p>
114      */
WithName(const char * value)115     inline UpdateFunctionRequest& WithName(const char* value) { SetName(value); return *this;}
116 
117 
118     /**
119      * <p>The <code>Function</code> description.</p>
120      */
GetDescription()121     inline const Aws::String& GetDescription() const{ return m_description; }
122 
123     /**
124      * <p>The <code>Function</code> description.</p>
125      */
DescriptionHasBeenSet()126     inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
127 
128     /**
129      * <p>The <code>Function</code> description.</p>
130      */
SetDescription(const Aws::String & value)131     inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
132 
133     /**
134      * <p>The <code>Function</code> description.</p>
135      */
SetDescription(Aws::String && value)136     inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
137 
138     /**
139      * <p>The <code>Function</code> description.</p>
140      */
SetDescription(const char * value)141     inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
142 
143     /**
144      * <p>The <code>Function</code> description.</p>
145      */
WithDescription(const Aws::String & value)146     inline UpdateFunctionRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
147 
148     /**
149      * <p>The <code>Function</code> description.</p>
150      */
WithDescription(Aws::String && value)151     inline UpdateFunctionRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
152 
153     /**
154      * <p>The <code>Function</code> description.</p>
155      */
WithDescription(const char * value)156     inline UpdateFunctionRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
157 
158 
159     /**
160      * <p>The function ID.</p>
161      */
GetFunctionId()162     inline const Aws::String& GetFunctionId() const{ return m_functionId; }
163 
164     /**
165      * <p>The function ID.</p>
166      */
FunctionIdHasBeenSet()167     inline bool FunctionIdHasBeenSet() const { return m_functionIdHasBeenSet; }
168 
169     /**
170      * <p>The function ID.</p>
171      */
SetFunctionId(const Aws::String & value)172     inline void SetFunctionId(const Aws::String& value) { m_functionIdHasBeenSet = true; m_functionId = value; }
173 
174     /**
175      * <p>The function ID.</p>
176      */
SetFunctionId(Aws::String && value)177     inline void SetFunctionId(Aws::String&& value) { m_functionIdHasBeenSet = true; m_functionId = std::move(value); }
178 
179     /**
180      * <p>The function ID.</p>
181      */
SetFunctionId(const char * value)182     inline void SetFunctionId(const char* value) { m_functionIdHasBeenSet = true; m_functionId.assign(value); }
183 
184     /**
185      * <p>The function ID.</p>
186      */
WithFunctionId(const Aws::String & value)187     inline UpdateFunctionRequest& WithFunctionId(const Aws::String& value) { SetFunctionId(value); return *this;}
188 
189     /**
190      * <p>The function ID.</p>
191      */
WithFunctionId(Aws::String && value)192     inline UpdateFunctionRequest& WithFunctionId(Aws::String&& value) { SetFunctionId(std::move(value)); return *this;}
193 
194     /**
195      * <p>The function ID.</p>
196      */
WithFunctionId(const char * value)197     inline UpdateFunctionRequest& WithFunctionId(const char* value) { SetFunctionId(value); return *this;}
198 
199 
200     /**
201      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
202      */
GetDataSourceName()203     inline const Aws::String& GetDataSourceName() const{ return m_dataSourceName; }
204 
205     /**
206      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
207      */
DataSourceNameHasBeenSet()208     inline bool DataSourceNameHasBeenSet() const { return m_dataSourceNameHasBeenSet; }
209 
210     /**
211      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
212      */
SetDataSourceName(const Aws::String & value)213     inline void SetDataSourceName(const Aws::String& value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName = value; }
214 
215     /**
216      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
217      */
SetDataSourceName(Aws::String && value)218     inline void SetDataSourceName(Aws::String&& value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName = std::move(value); }
219 
220     /**
221      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
222      */
SetDataSourceName(const char * value)223     inline void SetDataSourceName(const char* value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName.assign(value); }
224 
225     /**
226      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
227      */
WithDataSourceName(const Aws::String & value)228     inline UpdateFunctionRequest& WithDataSourceName(const Aws::String& value) { SetDataSourceName(value); return *this;}
229 
230     /**
231      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
232      */
WithDataSourceName(Aws::String && value)233     inline UpdateFunctionRequest& WithDataSourceName(Aws::String&& value) { SetDataSourceName(std::move(value)); return *this;}
234 
235     /**
236      * <p>The <code>Function</code> <code>DataSource</code> name.</p>
237      */
WithDataSourceName(const char * value)238     inline UpdateFunctionRequest& WithDataSourceName(const char* value) { SetDataSourceName(value); return *this;}
239 
240 
241     /**
242      * <p>The <code>Function</code> request mapping template. Functions support only
243      * the 2018-05-29 version of the request mapping template.</p>
244      */
GetRequestMappingTemplate()245     inline const Aws::String& GetRequestMappingTemplate() const{ return m_requestMappingTemplate; }
246 
247     /**
248      * <p>The <code>Function</code> request mapping template. Functions support only
249      * the 2018-05-29 version of the request mapping template.</p>
250      */
RequestMappingTemplateHasBeenSet()251     inline bool RequestMappingTemplateHasBeenSet() const { return m_requestMappingTemplateHasBeenSet; }
252 
253     /**
254      * <p>The <code>Function</code> request mapping template. Functions support only
255      * the 2018-05-29 version of the request mapping template.</p>
256      */
SetRequestMappingTemplate(const Aws::String & value)257     inline void SetRequestMappingTemplate(const Aws::String& value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate = value; }
258 
259     /**
260      * <p>The <code>Function</code> request mapping template. Functions support only
261      * the 2018-05-29 version of the request mapping template.</p>
262      */
SetRequestMappingTemplate(Aws::String && value)263     inline void SetRequestMappingTemplate(Aws::String&& value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate = std::move(value); }
264 
265     /**
266      * <p>The <code>Function</code> request mapping template. Functions support only
267      * the 2018-05-29 version of the request mapping template.</p>
268      */
SetRequestMappingTemplate(const char * value)269     inline void SetRequestMappingTemplate(const char* value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate.assign(value); }
270 
271     /**
272      * <p>The <code>Function</code> request mapping template. Functions support only
273      * the 2018-05-29 version of the request mapping template.</p>
274      */
WithRequestMappingTemplate(const Aws::String & value)275     inline UpdateFunctionRequest& WithRequestMappingTemplate(const Aws::String& value) { SetRequestMappingTemplate(value); return *this;}
276 
277     /**
278      * <p>The <code>Function</code> request mapping template. Functions support only
279      * the 2018-05-29 version of the request mapping template.</p>
280      */
WithRequestMappingTemplate(Aws::String && value)281     inline UpdateFunctionRequest& WithRequestMappingTemplate(Aws::String&& value) { SetRequestMappingTemplate(std::move(value)); return *this;}
282 
283     /**
284      * <p>The <code>Function</code> request mapping template. Functions support only
285      * the 2018-05-29 version of the request mapping template.</p>
286      */
WithRequestMappingTemplate(const char * value)287     inline UpdateFunctionRequest& WithRequestMappingTemplate(const char* value) { SetRequestMappingTemplate(value); return *this;}
288 
289 
290     /**
291      * <p>The <code>Function</code> request mapping template. </p>
292      */
GetResponseMappingTemplate()293     inline const Aws::String& GetResponseMappingTemplate() const{ return m_responseMappingTemplate; }
294 
295     /**
296      * <p>The <code>Function</code> request mapping template. </p>
297      */
ResponseMappingTemplateHasBeenSet()298     inline bool ResponseMappingTemplateHasBeenSet() const { return m_responseMappingTemplateHasBeenSet; }
299 
300     /**
301      * <p>The <code>Function</code> request mapping template. </p>
302      */
SetResponseMappingTemplate(const Aws::String & value)303     inline void SetResponseMappingTemplate(const Aws::String& value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate = value; }
304 
305     /**
306      * <p>The <code>Function</code> request mapping template. </p>
307      */
SetResponseMappingTemplate(Aws::String && value)308     inline void SetResponseMappingTemplate(Aws::String&& value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate = std::move(value); }
309 
310     /**
311      * <p>The <code>Function</code> request mapping template. </p>
312      */
SetResponseMappingTemplate(const char * value)313     inline void SetResponseMappingTemplate(const char* value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate.assign(value); }
314 
315     /**
316      * <p>The <code>Function</code> request mapping template. </p>
317      */
WithResponseMappingTemplate(const Aws::String & value)318     inline UpdateFunctionRequest& WithResponseMappingTemplate(const Aws::String& value) { SetResponseMappingTemplate(value); return *this;}
319 
320     /**
321      * <p>The <code>Function</code> request mapping template. </p>
322      */
WithResponseMappingTemplate(Aws::String && value)323     inline UpdateFunctionRequest& WithResponseMappingTemplate(Aws::String&& value) { SetResponseMappingTemplate(std::move(value)); return *this;}
324 
325     /**
326      * <p>The <code>Function</code> request mapping template. </p>
327      */
WithResponseMappingTemplate(const char * value)328     inline UpdateFunctionRequest& WithResponseMappingTemplate(const char* value) { SetResponseMappingTemplate(value); return *this;}
329 
330 
331     /**
332      * <p>The <code>version</code> of the request mapping template. Currently the
333      * supported value is 2018-05-29. </p>
334      */
GetFunctionVersion()335     inline const Aws::String& GetFunctionVersion() const{ return m_functionVersion; }
336 
337     /**
338      * <p>The <code>version</code> of the request mapping template. Currently the
339      * supported value is 2018-05-29. </p>
340      */
FunctionVersionHasBeenSet()341     inline bool FunctionVersionHasBeenSet() const { return m_functionVersionHasBeenSet; }
342 
343     /**
344      * <p>The <code>version</code> of the request mapping template. Currently the
345      * supported value is 2018-05-29. </p>
346      */
SetFunctionVersion(const Aws::String & value)347     inline void SetFunctionVersion(const Aws::String& value) { m_functionVersionHasBeenSet = true; m_functionVersion = value; }
348 
349     /**
350      * <p>The <code>version</code> of the request mapping template. Currently the
351      * supported value is 2018-05-29. </p>
352      */
SetFunctionVersion(Aws::String && value)353     inline void SetFunctionVersion(Aws::String&& value) { m_functionVersionHasBeenSet = true; m_functionVersion = std::move(value); }
354 
355     /**
356      * <p>The <code>version</code> of the request mapping template. Currently the
357      * supported value is 2018-05-29. </p>
358      */
SetFunctionVersion(const char * value)359     inline void SetFunctionVersion(const char* value) { m_functionVersionHasBeenSet = true; m_functionVersion.assign(value); }
360 
361     /**
362      * <p>The <code>version</code> of the request mapping template. Currently the
363      * supported value is 2018-05-29. </p>
364      */
WithFunctionVersion(const Aws::String & value)365     inline UpdateFunctionRequest& WithFunctionVersion(const Aws::String& value) { SetFunctionVersion(value); return *this;}
366 
367     /**
368      * <p>The <code>version</code> of the request mapping template. Currently the
369      * supported value is 2018-05-29. </p>
370      */
WithFunctionVersion(Aws::String && value)371     inline UpdateFunctionRequest& WithFunctionVersion(Aws::String&& value) { SetFunctionVersion(std::move(value)); return *this;}
372 
373     /**
374      * <p>The <code>version</code> of the request mapping template. Currently the
375      * supported value is 2018-05-29. </p>
376      */
WithFunctionVersion(const char * value)377     inline UpdateFunctionRequest& WithFunctionVersion(const char* value) { SetFunctionVersion(value); return *this;}
378 
379 
380 
GetSyncConfig()381     inline const SyncConfig& GetSyncConfig() const{ return m_syncConfig; }
382 
383 
SyncConfigHasBeenSet()384     inline bool SyncConfigHasBeenSet() const { return m_syncConfigHasBeenSet; }
385 
386 
SetSyncConfig(const SyncConfig & value)387     inline void SetSyncConfig(const SyncConfig& value) { m_syncConfigHasBeenSet = true; m_syncConfig = value; }
388 
389 
SetSyncConfig(SyncConfig && value)390     inline void SetSyncConfig(SyncConfig&& value) { m_syncConfigHasBeenSet = true; m_syncConfig = std::move(value); }
391 
392 
WithSyncConfig(const SyncConfig & value)393     inline UpdateFunctionRequest& WithSyncConfig(const SyncConfig& value) { SetSyncConfig(value); return *this;}
394 
395 
WithSyncConfig(SyncConfig && value)396     inline UpdateFunctionRequest& WithSyncConfig(SyncConfig&& value) { SetSyncConfig(std::move(value)); return *this;}
397 
398   private:
399 
400     Aws::String m_apiId;
401     bool m_apiIdHasBeenSet;
402 
403     Aws::String m_name;
404     bool m_nameHasBeenSet;
405 
406     Aws::String m_description;
407     bool m_descriptionHasBeenSet;
408 
409     Aws::String m_functionId;
410     bool m_functionIdHasBeenSet;
411 
412     Aws::String m_dataSourceName;
413     bool m_dataSourceNameHasBeenSet;
414 
415     Aws::String m_requestMappingTemplate;
416     bool m_requestMappingTemplateHasBeenSet;
417 
418     Aws::String m_responseMappingTemplate;
419     bool m_responseMappingTemplateHasBeenSet;
420 
421     Aws::String m_functionVersion;
422     bool m_functionVersionHasBeenSet;
423 
424     SyncConfig m_syncConfig;
425     bool m_syncConfigHasBeenSet;
426   };
427 
428 } // namespace Model
429 } // namespace AppSync
430 } // namespace Aws
431