fixed #51
This commit is contained in:
@@ -39,22 +39,22 @@ void GetExecutionHistoryResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allEvents = value["Events"]["EventsItem"];
|
||||
for (auto value : allEvents)
|
||||
auto allEventsNode = value["Events"]["EventsItem"];
|
||||
for (auto valueEventsEventsItem : allEventsNode)
|
||||
{
|
||||
EventsItem eventsObject;
|
||||
if(!value["StepName"].isNull())
|
||||
eventsObject.stepName = value["StepName"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
eventsObject.type = value["Type"].asString();
|
||||
if(!value["EventId"].isNull())
|
||||
eventsObject.eventId = std::stol(value["EventId"].asString());
|
||||
if(!value["ScheduleEventId"].isNull())
|
||||
eventsObject.scheduleEventId = std::stol(value["ScheduleEventId"].asString());
|
||||
if(!value["EventDetail"].isNull())
|
||||
eventsObject.eventDetail = value["EventDetail"].asString();
|
||||
if(!value["Time"].isNull())
|
||||
eventsObject.time = value["Time"].asString();
|
||||
if(!valueEventsEventsItem["StepName"].isNull())
|
||||
eventsObject.stepName = valueEventsEventsItem["StepName"].asString();
|
||||
if(!valueEventsEventsItem["Type"].isNull())
|
||||
eventsObject.type = valueEventsEventsItem["Type"].asString();
|
||||
if(!valueEventsEventsItem["EventId"].isNull())
|
||||
eventsObject.eventId = std::stol(valueEventsEventsItem["EventId"].asString());
|
||||
if(!valueEventsEventsItem["ScheduleEventId"].isNull())
|
||||
eventsObject.scheduleEventId = std::stol(valueEventsEventsItem["ScheduleEventId"].asString());
|
||||
if(!valueEventsEventsItem["EventDetail"].isNull())
|
||||
eventsObject.eventDetail = valueEventsEventsItem["EventDetail"].asString();
|
||||
if(!valueEventsEventsItem["Time"].isNull())
|
||||
eventsObject.time = valueEventsEventsItem["Time"].asString();
|
||||
events_.push_back(eventsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
|
||||
@@ -39,26 +39,26 @@ void ListExecutionsResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allExecutions = value["Executions"]["ExecutionsItem"];
|
||||
for (auto value : allExecutions)
|
||||
auto allExecutionsNode = value["Executions"]["ExecutionsItem"];
|
||||
for (auto valueExecutionsExecutionsItem : allExecutionsNode)
|
||||
{
|
||||
ExecutionsItem executionsObject;
|
||||
if(!value["Name"].isNull())
|
||||
executionsObject.name = value["Name"].asString();
|
||||
if(!value["FlowName"].isNull())
|
||||
executionsObject.flowName = value["FlowName"].asString();
|
||||
if(!value["FlowDefinition"].isNull())
|
||||
executionsObject.flowDefinition = value["FlowDefinition"].asString();
|
||||
if(!value["Input"].isNull())
|
||||
executionsObject.input = value["Input"].asString();
|
||||
if(!value["Output"].isNull())
|
||||
executionsObject.output = value["Output"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
executionsObject.status = value["Status"].asString();
|
||||
if(!value["StartedTime"].isNull())
|
||||
executionsObject.startedTime = value["StartedTime"].asString();
|
||||
if(!value["StoppedTime"].isNull())
|
||||
executionsObject.stoppedTime = value["StoppedTime"].asString();
|
||||
if(!valueExecutionsExecutionsItem["Name"].isNull())
|
||||
executionsObject.name = valueExecutionsExecutionsItem["Name"].asString();
|
||||
if(!valueExecutionsExecutionsItem["FlowName"].isNull())
|
||||
executionsObject.flowName = valueExecutionsExecutionsItem["FlowName"].asString();
|
||||
if(!valueExecutionsExecutionsItem["FlowDefinition"].isNull())
|
||||
executionsObject.flowDefinition = valueExecutionsExecutionsItem["FlowDefinition"].asString();
|
||||
if(!valueExecutionsExecutionsItem["Input"].isNull())
|
||||
executionsObject.input = valueExecutionsExecutionsItem["Input"].asString();
|
||||
if(!valueExecutionsExecutionsItem["Output"].isNull())
|
||||
executionsObject.output = valueExecutionsExecutionsItem["Output"].asString();
|
||||
if(!valueExecutionsExecutionsItem["Status"].isNull())
|
||||
executionsObject.status = valueExecutionsExecutionsItem["Status"].asString();
|
||||
if(!valueExecutionsExecutionsItem["StartedTime"].isNull())
|
||||
executionsObject.startedTime = valueExecutionsExecutionsItem["StartedTime"].asString();
|
||||
if(!valueExecutionsExecutionsItem["StoppedTime"].isNull())
|
||||
executionsObject.stoppedTime = valueExecutionsExecutionsItem["StoppedTime"].asString();
|
||||
executions_.push_back(executionsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
|
||||
@@ -39,26 +39,26 @@ void ListFlowsResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allFlows = value["Flows"]["FlowsItem"];
|
||||
for (auto value : allFlows)
|
||||
auto allFlowsNode = value["Flows"]["FlowsItem"];
|
||||
for (auto valueFlowsFlowsItem : allFlowsNode)
|
||||
{
|
||||
FlowsItem flowsObject;
|
||||
if(!value["Name"].isNull())
|
||||
flowsObject.name = value["Name"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
flowsObject.description = value["Description"].asString();
|
||||
if(!value["Definition"].isNull())
|
||||
flowsObject.definition = value["Definition"].asString();
|
||||
if(!value["Id"].isNull())
|
||||
flowsObject.id = value["Id"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
flowsObject.type = value["Type"].asString();
|
||||
if(!value["RoleArn"].isNull())
|
||||
flowsObject.roleArn = value["RoleArn"].asString();
|
||||
if(!value["CreatedTime"].isNull())
|
||||
flowsObject.createdTime = value["CreatedTime"].asString();
|
||||
if(!value["LastModifiedTime"].isNull())
|
||||
flowsObject.lastModifiedTime = value["LastModifiedTime"].asString();
|
||||
if(!valueFlowsFlowsItem["Name"].isNull())
|
||||
flowsObject.name = valueFlowsFlowsItem["Name"].asString();
|
||||
if(!valueFlowsFlowsItem["Description"].isNull())
|
||||
flowsObject.description = valueFlowsFlowsItem["Description"].asString();
|
||||
if(!valueFlowsFlowsItem["Definition"].isNull())
|
||||
flowsObject.definition = valueFlowsFlowsItem["Definition"].asString();
|
||||
if(!valueFlowsFlowsItem["Id"].isNull())
|
||||
flowsObject.id = valueFlowsFlowsItem["Id"].asString();
|
||||
if(!valueFlowsFlowsItem["Type"].isNull())
|
||||
flowsObject.type = valueFlowsFlowsItem["Type"].asString();
|
||||
if(!valueFlowsFlowsItem["RoleArn"].isNull())
|
||||
flowsObject.roleArn = valueFlowsFlowsItem["RoleArn"].asString();
|
||||
if(!valueFlowsFlowsItem["CreatedTime"].isNull())
|
||||
flowsObject.createdTime = valueFlowsFlowsItem["CreatedTime"].asString();
|
||||
if(!valueFlowsFlowsItem["LastModifiedTime"].isNull())
|
||||
flowsObject.lastModifiedTime = valueFlowsFlowsItem["LastModifiedTime"].asString();
|
||||
flows_.push_back(flowsObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
|
||||
Reference in New Issue
Block a user