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/GetPartitionsRequest.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
GetPartitionsRequest()15 GetPartitionsRequest::GetPartitionsRequest() :
16 m_catalogIdHasBeenSet(false),
17 m_databaseNameHasBeenSet(false),
18 m_tableNameHasBeenSet(false),
19 m_expressionHasBeenSet(false),
20 m_nextTokenHasBeenSet(false),
21 m_segmentHasBeenSet(false),
22 m_maxResults(0),
23 m_maxResultsHasBeenSet(false),
24 m_excludeColumnSchema(false),
25 m_excludeColumnSchemaHasBeenSet(false)
26 {
27 }
28
SerializePayload() const29 Aws::String GetPartitionsRequest::SerializePayload() const
30 {
31 JsonValue payload;
32
33 if(m_catalogIdHasBeenSet)
34 {
35 payload.WithString("CatalogId", m_catalogId);
36
37 }
38
39 if(m_databaseNameHasBeenSet)
40 {
41 payload.WithString("DatabaseName", m_databaseName);
42
43 }
44
45 if(m_tableNameHasBeenSet)
46 {
47 payload.WithString("TableName", m_tableName);
48
49 }
50
51 if(m_expressionHasBeenSet)
52 {
53 payload.WithString("Expression", m_expression);
54
55 }
56
57 if(m_nextTokenHasBeenSet)
58 {
59 payload.WithString("NextToken", m_nextToken);
60
61 }
62
63 if(m_segmentHasBeenSet)
64 {
65 payload.WithObject("Segment", m_segment.Jsonize());
66
67 }
68
69 if(m_maxResultsHasBeenSet)
70 {
71 payload.WithInteger("MaxResults", m_maxResults);
72
73 }
74
75 if(m_excludeColumnSchemaHasBeenSet)
76 {
77 payload.WithBool("ExcludeColumnSchema", m_excludeColumnSchema);
78
79 }
80
81 return payload.View().WriteReadable();
82 }
83
GetRequestSpecificHeaders() const84 Aws::Http::HeaderValueCollection GetPartitionsRequest::GetRequestSpecificHeaders() const
85 {
86 Aws::Http::HeaderValueCollection headers;
87 headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.GetPartitions"));
88 return headers;
89
90 }
91
92
93
94
95