/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::SWF::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; StartWorkflowExecutionRequest::StartWorkflowExecutionRequest() : m_domainHasBeenSet(false), m_workflowIdHasBeenSet(false), m_workflowTypeHasBeenSet(false), m_taskListHasBeenSet(false), m_taskPriorityHasBeenSet(false), m_inputHasBeenSet(false), m_executionStartToCloseTimeoutHasBeenSet(false), m_tagListHasBeenSet(false), m_taskStartToCloseTimeoutHasBeenSet(false), m_childPolicy(ChildPolicy::NOT_SET), m_childPolicyHasBeenSet(false), m_lambdaRoleHasBeenSet(false) { } Aws::String StartWorkflowExecutionRequest::SerializePayload() const { JsonValue payload; if(m_domainHasBeenSet) { payload.WithString("domain", m_domain); } if(m_workflowIdHasBeenSet) { payload.WithString("workflowId", m_workflowId); } if(m_workflowTypeHasBeenSet) { payload.WithObject("workflowType", m_workflowType.Jsonize()); } if(m_taskListHasBeenSet) { payload.WithObject("taskList", m_taskList.Jsonize()); } if(m_taskPriorityHasBeenSet) { payload.WithString("taskPriority", m_taskPriority); } if(m_inputHasBeenSet) { payload.WithString("input", m_input); } if(m_executionStartToCloseTimeoutHasBeenSet) { payload.WithString("executionStartToCloseTimeout", m_executionStartToCloseTimeout); } if(m_tagListHasBeenSet) { Aws::Utils::Array tagListJsonList(m_tagList.size()); for(unsigned tagListIndex = 0; tagListIndex < tagListJsonList.GetLength(); ++tagListIndex) { tagListJsonList[tagListIndex].AsString(m_tagList[tagListIndex]); } payload.WithArray("tagList", std::move(tagListJsonList)); } if(m_taskStartToCloseTimeoutHasBeenSet) { payload.WithString("taskStartToCloseTimeout", m_taskStartToCloseTimeout); } if(m_childPolicyHasBeenSet) { payload.WithString("childPolicy", ChildPolicyMapper::GetNameForChildPolicy(m_childPolicy)); } if(m_lambdaRoleHasBeenSet) { payload.WithString("lambdaRole", m_lambdaRole); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection StartWorkflowExecutionRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "SimpleWorkflowService.StartWorkflowExecution")); return headers; }