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/BatchGetWorkflowsRequest.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 
BatchGetWorkflowsRequest()15 BatchGetWorkflowsRequest::BatchGetWorkflowsRequest() :
16     m_namesHasBeenSet(false),
17     m_includeGraph(false),
18     m_includeGraphHasBeenSet(false)
19 {
20 }
21 
SerializePayload() const22 Aws::String BatchGetWorkflowsRequest::SerializePayload() const
23 {
24   JsonValue payload;
25 
26   if(m_namesHasBeenSet)
27   {
28    Array<JsonValue> namesJsonList(m_names.size());
29    for(unsigned namesIndex = 0; namesIndex < namesJsonList.GetLength(); ++namesIndex)
30    {
31      namesJsonList[namesIndex].AsString(m_names[namesIndex]);
32    }
33    payload.WithArray("Names", std::move(namesJsonList));
34 
35   }
36 
37   if(m_includeGraphHasBeenSet)
38   {
39    payload.WithBool("IncludeGraph", m_includeGraph);
40 
41   }
42 
43   return payload.View().WriteReadable();
44 }
45 
GetRequestSpecificHeaders() const46 Aws::Http::HeaderValueCollection BatchGetWorkflowsRequest::GetRequestSpecificHeaders() const
47 {
48   Aws::Http::HeaderValueCollection headers;
49   headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSGlue.BatchGetWorkflows"));
50   return headers;
51 
52 }
53 
54 
55 
56 
57