This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-swf/source/model/PollForDecisionTaskResult.cpp

84 lines
1.9 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/swf/model/PollForDecisionTaskResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::SWF::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PollForDecisionTaskResult::PollForDecisionTaskResult() :
m_startedEventId(0),
m_previousStartedEventId(0)
{
}
PollForDecisionTaskResult::PollForDecisionTaskResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_startedEventId(0),
m_previousStartedEventId(0)
{
*this = result;
}
PollForDecisionTaskResult& PollForDecisionTaskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("taskToken"))
{
m_taskToken = jsonValue.GetString("taskToken");
}
if(jsonValue.ValueExists("startedEventId"))
{
m_startedEventId = jsonValue.GetInt64("startedEventId");
}
if(jsonValue.ValueExists("workflowExecution"))
{
m_workflowExecution = jsonValue.GetObject("workflowExecution");
}
if(jsonValue.ValueExists("workflowType"))
{
m_workflowType = jsonValue.GetObject("workflowType");
}
if(jsonValue.ValueExists("events"))
{
Array<JsonView> eventsJsonList = jsonValue.GetArray("events");
for(unsigned eventsIndex = 0; eventsIndex < eventsJsonList.GetLength(); ++eventsIndex)
{
m_events.push_back(eventsJsonList[eventsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextPageToken"))
{
m_nextPageToken = jsonValue.GetString("nextPageToken");
}
if(jsonValue.ValueExists("previousStartedEventId"))
{
m_previousStartedEventId = jsonValue.GetInt64("previousStartedEventId");
}
return *this;
}