1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/glue/model/UpdateCrawlerRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8 
9 #include <utility>
10 
11 using namespace Aws::Glue::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14 
UpdateCrawlerRequest()15 UpdateCrawlerRequest::UpdateCrawlerRequest() :
16     m_nameHasBeenSet(false),
17     m_roleHasBeenSet(false),
18     m_databaseNameHasBeenSet(false),
19     m_descriptionHasBeenSet(false),
20     m_targetsHasBeenSet(false),
21     m_scheduleHasBeenSet(false),
22     m_classifiersHasBeenSet(false),
23     m_tablePrefixHasBeenSet(false),
24     m_schemaChangePolicyHasBeenSet(false),
25     m_recrawlPolicyHasBeenSet(false),
26     m_lineageConfigurationHasBeenSet(false),
27     m_configurationHasBeenSet(false),
28     m_crawlerSecurityConfigurationHasBeenSet(false)
29 {
30 }
31 
SerializePayload() const32 Aws::String UpdateCrawlerRequest::SerializePayload() const
33 {
34   JsonValue payload;
35 
36   if(m_nameHasBeenSet)
37   {
38    payload.WithString("Name", m_name);
39 
40   }
41 
42   if(m_roleHasBeenSet)
43   {
44    payload.WithString("Role", m_role);
45 
46   }
47 
48   if(m_databaseNameHasBeenSet)
49   {
50    payload.WithString("DatabaseName", m_databaseName);
51 
52   }
53 
54   if(m_descriptionHasBeenSet)
55   {
56    payload.WithString("Description", m_description);
57 
58   }
59 
60   if(m_targetsHasBeenSet)
61   {
62    payload.WithObject("Targets", m_targets.Jsonize());
63 
64   }
65 
66   if(m_scheduleHasBeenSet)
67   {
68    payload.WithString("Schedule", m_schedule);
69 
70   }
71 
72   if(m_classifiersHasBeenSet)
73   {
74    Array<JsonValue> classifiersJsonList(m_classifiers.size());
75    for(unsigned classifiersIndex = 0; classifiersIndex < classifiersJsonList.GetLength(); ++classifiersIndex)
76    {
77      classifiersJsonList[classifiersIndex].AsString(m_classifiers[classifiersIndex]);
78    }
79    payload.WithArray("Classifiers", std::move(classifiersJsonList));
80 
81   }
82 
83   if(m_tablePrefixHasBeenSet)
84   {
85    payload.WithString("TablePrefix", m_tablePrefix);
86 
87   }
88 
89   if(m_schemaChangePolicyHasBeenSet)
90   {
91    payload.WithObject("SchemaChangePolicy", m_schemaChangePolicy.Jsonize());
92 
93   }
94 
95   if(m_recrawlPolicyHasBeenSet)
96   {
97    payload.WithObject("RecrawlPolicy", m_recrawlPolicy.Jsonize());
98 
99   }
100 
101   if(m_lineageConfigurationHasBeenSet)
102   {
103    payload.WithObject("LineageConfiguration", m_lineageConfiguration.Jsonize());
104 
105   }
106 
107   if(m_configurationHasBeenSet)
108   {
109    payload.WithString("Configuration", m_configuration);
110 
111   }
112 
113   if(m_crawlerSecurityConfigurationHasBeenSet)
114   {
115    payload.WithString("CrawlerSecurityConfiguration", m_crawlerSecurityConfiguration);
116 
117   }
118 
119   return payload.View().WriteReadable();
120 }
121 
GetRequestSpecificHeaders() const122 Aws::Http::HeaderValueCollection UpdateCrawlerRequest::GetRequestSpecificHeaders() const
123 {
124   Aws::Http::HeaderValueCollection headers;
125   headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.UpdateCrawler"));
126   return headers;
127 
128 }
129 
130 
131 
132 
133