Add ListResourceExecutionStatus API.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2020-07-03 Version: 1.36.499
|
||||
- Add ListResourceExecutionStatus API.
|
||||
- ListExecutions API supports filtering by resource id.
|
||||
- TriggerExecution API supports TimerTrigger.
|
||||
|
||||
2020-07-03 Version: 1.36.498
|
||||
- Supports tag management APIs.
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ set(oos_public_header_model
|
||||
include/alibabacloud/oos/model/ListExecutionRiskyTasksResult.h
|
||||
include/alibabacloud/oos/model/ListExecutionsRequest.h
|
||||
include/alibabacloud/oos/model/ListExecutionsResult.h
|
||||
include/alibabacloud/oos/model/ListResourceExecutionStatusRequest.h
|
||||
include/alibabacloud/oos/model/ListResourceExecutionStatusResult.h
|
||||
include/alibabacloud/oos/model/ListTagKeysRequest.h
|
||||
include/alibabacloud/oos/model/ListTagKeysResult.h
|
||||
include/alibabacloud/oos/model/ListTagResourcesRequest.h
|
||||
@@ -102,6 +104,8 @@ set(oos_src
|
||||
src/model/ListExecutionRiskyTasksResult.cc
|
||||
src/model/ListExecutionsRequest.cc
|
||||
src/model/ListExecutionsResult.cc
|
||||
src/model/ListResourceExecutionStatusRequest.cc
|
||||
src/model/ListResourceExecutionStatusResult.cc
|
||||
src/model/ListTagKeysRequest.cc
|
||||
src/model/ListTagKeysResult.cc
|
||||
src/model/ListTagResourcesRequest.cc
|
||||
|
||||
@@ -48,6 +48,8 @@
|
||||
#include "model/ListExecutionRiskyTasksResult.h"
|
||||
#include "model/ListExecutionsRequest.h"
|
||||
#include "model/ListExecutionsResult.h"
|
||||
#include "model/ListResourceExecutionStatusRequest.h"
|
||||
#include "model/ListResourceExecutionStatusResult.h"
|
||||
#include "model/ListTagKeysRequest.h"
|
||||
#include "model/ListTagKeysResult.h"
|
||||
#include "model/ListTagResourcesRequest.h"
|
||||
@@ -122,6 +124,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListExecutionsResult> ListExecutionsOutcome;
|
||||
typedef std::future<ListExecutionsOutcome> ListExecutionsOutcomeCallable;
|
||||
typedef std::function<void(const OosClient*, const Model::ListExecutionsRequest&, const ListExecutionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListExecutionsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListResourceExecutionStatusResult> ListResourceExecutionStatusOutcome;
|
||||
typedef std::future<ListResourceExecutionStatusOutcome> ListResourceExecutionStatusOutcomeCallable;
|
||||
typedef std::function<void(const OosClient*, const Model::ListResourceExecutionStatusRequest&, const ListResourceExecutionStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListResourceExecutionStatusAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListTagKeysResult> ListTagKeysOutcome;
|
||||
typedef std::future<ListTagKeysOutcome> ListTagKeysOutcomeCallable;
|
||||
typedef std::function<void(const OosClient*, const Model::ListTagKeysRequest&, const ListTagKeysOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagKeysAsyncHandler;
|
||||
@@ -205,6 +210,9 @@ namespace AlibabaCloud
|
||||
ListExecutionsOutcome listExecutions(const Model::ListExecutionsRequest &request)const;
|
||||
void listExecutionsAsync(const Model::ListExecutionsRequest& request, const ListExecutionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListExecutionsOutcomeCallable listExecutionsCallable(const Model::ListExecutionsRequest& request) const;
|
||||
ListResourceExecutionStatusOutcome listResourceExecutionStatus(const Model::ListResourceExecutionStatusRequest &request)const;
|
||||
void listResourceExecutionStatusAsync(const Model::ListResourceExecutionStatusRequest& request, const ListResourceExecutionStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListResourceExecutionStatusOutcomeCallable listResourceExecutionStatusCallable(const Model::ListResourceExecutionStatusRequest& request) const;
|
||||
ListTagKeysOutcome listTagKeys(const Model::ListTagKeysRequest &request)const;
|
||||
void listTagKeysAsync(const Model::ListTagKeysRequest& request, const ListTagKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListTagKeysOutcomeCallable listTagKeysCallable(const Model::ListTagKeysRequest& request) const;
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace AlibabaCloud
|
||||
bool hasTrigger;
|
||||
std::string createdDate;
|
||||
std::string templateName;
|
||||
std::string versionName;
|
||||
std::string templateId;
|
||||
std::string tags;
|
||||
std::string shareType;
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace AlibabaCloud
|
||||
void setEndDateBefore(const std::string& endDateBefore);
|
||||
std::string getSortOrder()const;
|
||||
void setSortOrder(const std::string& sortOrder);
|
||||
std::string getResourceId()const;
|
||||
void setResourceId(const std::string& resourceId);
|
||||
std::string getStartDateAfter()const;
|
||||
void setStartDateAfter(const std::string& startDateAfter);
|
||||
std::string getStartDateBefore()const;
|
||||
@@ -71,6 +73,8 @@ namespace AlibabaCloud
|
||||
void setSortField(const std::string& sortField);
|
||||
std::string getCategory()const;
|
||||
void setCategory(const std::string& category);
|
||||
std::string getResourceTemplateName()const;
|
||||
void setResourceTemplateName(const std::string& resourceTemplateName);
|
||||
std::string getStatus()const;
|
||||
void setStatus(const std::string& status);
|
||||
|
||||
@@ -85,6 +89,7 @@ namespace AlibabaCloud
|
||||
std::string templateName_;
|
||||
std::string endDateBefore_;
|
||||
std::string sortOrder_;
|
||||
std::string resourceId_;
|
||||
std::string startDateAfter_;
|
||||
std::string startDateBefore_;
|
||||
std::map<std::string, std::string> tags_;
|
||||
@@ -93,6 +98,7 @@ namespace AlibabaCloud
|
||||
int maxResults_;
|
||||
std::string sortField_;
|
||||
std::string category_;
|
||||
std::string resourceTemplateName_;
|
||||
std::string status_;
|
||||
|
||||
};
|
||||
|
||||
@@ -48,7 +48,10 @@ namespace AlibabaCloud
|
||||
std::string createDate;
|
||||
std::string startDate;
|
||||
std::string updateDate;
|
||||
std::string lastTriggerTime;
|
||||
std::string templateName;
|
||||
std::string lastSuccessfulTriggerTime;
|
||||
std::string resourceStatus;
|
||||
std::string templateId;
|
||||
std::string executedBy;
|
||||
std::string tags;
|
||||
@@ -57,6 +60,7 @@ namespace AlibabaCloud
|
||||
std::string statusReason;
|
||||
bool isParent;
|
||||
std::string mode;
|
||||
std::string targets;
|
||||
std::string endDate;
|
||||
std::string waitingStatus;
|
||||
std::string statusMessage;
|
||||
@@ -64,6 +68,7 @@ namespace AlibabaCloud
|
||||
std::string outputs;
|
||||
std::string ramRole;
|
||||
std::string counters;
|
||||
std::string lastTriggerStatus;
|
||||
std::string executionId;
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_OOS_MODEL_LISTRESOURCEEXECUTIONSTATUSREQUEST_H_
|
||||
#define ALIBABACLOUD_OOS_MODEL_LISTRESOURCEEXECUTIONSTATUSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/oos/OosExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Oos
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OOS_EXPORT ListResourceExecutionStatusRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListResourceExecutionStatusRequest();
|
||||
~ListResourceExecutionStatusRequest();
|
||||
|
||||
std::string getExecutionId()const;
|
||||
void setExecutionId(const std::string& executionId);
|
||||
std::string getRegionId()const;
|
||||
void setRegionId(const std::string& regionId);
|
||||
std::string getNextToken()const;
|
||||
void setNextToken(const std::string& nextToken);
|
||||
int getMaxResults()const;
|
||||
void setMaxResults(int maxResults);
|
||||
|
||||
private:
|
||||
std::string executionId_;
|
||||
std::string regionId_;
|
||||
std::string nextToken_;
|
||||
int maxResults_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OOS_MODEL_LISTRESOURCEEXECUTIONSTATUSREQUEST_H_
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_OOS_MODEL_LISTRESOURCEEXECUTIONSTATUSRESULT_H_
|
||||
#define ALIBABACLOUD_OOS_MODEL_LISTRESOURCEEXECUTIONSTATUSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/oos/OosExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Oos
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_OOS_EXPORT ListResourceExecutionStatusResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Status
|
||||
{
|
||||
std::string status;
|
||||
std::string executionTime;
|
||||
std::string resourceId;
|
||||
std::string outputs;
|
||||
std::string executionId;
|
||||
};
|
||||
|
||||
|
||||
ListResourceExecutionStatusResult();
|
||||
explicit ListResourceExecutionStatusResult(const std::string &payload);
|
||||
~ListResourceExecutionStatusResult();
|
||||
std::string getNextToken()const;
|
||||
std::vector<Status> getResourceExecutionStatus()const;
|
||||
int getMaxResults()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string nextToken_;
|
||||
std::vector<Status> resourceExecutionStatus_;
|
||||
int maxResults_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_OOS_MODEL_LISTRESOURCEEXECUTIONSTATUSRESULT_H_
|
||||
@@ -31,21 +31,21 @@ OosClient::OosClient(const Credentials &credentials, const ClientConfiguration &
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "oos");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
OosClient::OosClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "oos");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
OosClient::OosClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "oos");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
OosClient::~OosClient()
|
||||
@@ -519,6 +519,42 @@ OosClient::ListExecutionsOutcomeCallable OosClient::listExecutionsCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OosClient::ListResourceExecutionStatusOutcome OosClient::listResourceExecutionStatus(const ListResourceExecutionStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListResourceExecutionStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListResourceExecutionStatusOutcome(ListResourceExecutionStatusResult(outcome.result()));
|
||||
else
|
||||
return ListResourceExecutionStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void OosClient::listResourceExecutionStatusAsync(const ListResourceExecutionStatusRequest& request, const ListResourceExecutionStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listResourceExecutionStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
OosClient::ListResourceExecutionStatusOutcomeCallable OosClient::listResourceExecutionStatusCallable(const ListResourceExecutionStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListResourceExecutionStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listResourceExecutionStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
OosClient::ListTagKeysOutcome OosClient::listTagKeys(const ListTagKeysRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -68,6 +68,8 @@ void GetTemplateResult::parse(const std::string &payload)
|
||||
_template_.tags = _templateNode["Tags"].asString();
|
||||
if(!_templateNode["TemplateType"].isNull())
|
||||
_template_.templateType = _templateNode["TemplateType"].asString();
|
||||
if(!_templateNode["VersionName"].isNull())
|
||||
_template_.versionName = _templateNode["VersionName"].asString();
|
||||
if(!value["Content"].isNull())
|
||||
content_ = value["Content"].asString();
|
||||
|
||||
|
||||
@@ -137,6 +137,17 @@ void ListExecutionsRequest::setSortOrder(const std::string& sortOrder)
|
||||
setParameter("SortOrder", sortOrder);
|
||||
}
|
||||
|
||||
std::string ListExecutionsRequest::getResourceId()const
|
||||
{
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListExecutionsRequest::setResourceId(const std::string& resourceId)
|
||||
{
|
||||
resourceId_ = resourceId;
|
||||
setParameter("ResourceId", resourceId);
|
||||
}
|
||||
|
||||
std::string ListExecutionsRequest::getStartDateAfter()const
|
||||
{
|
||||
return startDateAfter_;
|
||||
@@ -225,6 +236,17 @@ void ListExecutionsRequest::setCategory(const std::string& category)
|
||||
setParameter("Category", category);
|
||||
}
|
||||
|
||||
std::string ListExecutionsRequest::getResourceTemplateName()const
|
||||
{
|
||||
return resourceTemplateName_;
|
||||
}
|
||||
|
||||
void ListExecutionsRequest::setResourceTemplateName(const std::string& resourceTemplateName)
|
||||
{
|
||||
resourceTemplateName_ = resourceTemplateName;
|
||||
setParameter("ResourceTemplateName", resourceTemplateName);
|
||||
}
|
||||
|
||||
std::string ListExecutionsRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
|
||||
@@ -91,6 +91,16 @@ void ListExecutionsResult::parse(const std::string &payload)
|
||||
executionsObject.tags = valueExecutionsExecution["Tags"].asString();
|
||||
if(!valueExecutionsExecution["Description"].isNull())
|
||||
executionsObject.description = valueExecutionsExecution["Description"].asString();
|
||||
if(!valueExecutionsExecution["Targets"].isNull())
|
||||
executionsObject.targets = valueExecutionsExecution["Targets"].asString();
|
||||
if(!valueExecutionsExecution["LastTriggerTime"].isNull())
|
||||
executionsObject.lastTriggerTime = valueExecutionsExecution["LastTriggerTime"].asString();
|
||||
if(!valueExecutionsExecution["LastTriggerStatus"].isNull())
|
||||
executionsObject.lastTriggerStatus = valueExecutionsExecution["LastTriggerStatus"].asString();
|
||||
if(!valueExecutionsExecution["LastSuccessfulTriggerTime"].isNull())
|
||||
executionsObject.lastSuccessfulTriggerTime = valueExecutionsExecution["LastSuccessfulTriggerTime"].asString();
|
||||
if(!valueExecutionsExecution["ResourceStatus"].isNull())
|
||||
executionsObject.resourceStatus = valueExecutionsExecution["ResourceStatus"].asString();
|
||||
auto allCurrentTasksNode = allExecutionsNode["CurrentTasks"]["CurrentTask"];
|
||||
for (auto allExecutionsNodeCurrentTasksCurrentTask : allCurrentTasksNode)
|
||||
{
|
||||
|
||||
73
oos/src/model/ListResourceExecutionStatusRequest.cc
Normal file
73
oos/src/model/ListResourceExecutionStatusRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/oos/model/ListResourceExecutionStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Oos::Model::ListResourceExecutionStatusRequest;
|
||||
|
||||
ListResourceExecutionStatusRequest::ListResourceExecutionStatusRequest() :
|
||||
RpcServiceRequest("oos", "2019-06-01", "ListResourceExecutionStatus")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListResourceExecutionStatusRequest::~ListResourceExecutionStatusRequest()
|
||||
{}
|
||||
|
||||
std::string ListResourceExecutionStatusRequest::getExecutionId()const
|
||||
{
|
||||
return executionId_;
|
||||
}
|
||||
|
||||
void ListResourceExecutionStatusRequest::setExecutionId(const std::string& executionId)
|
||||
{
|
||||
executionId_ = executionId;
|
||||
setParameter("ExecutionId", executionId);
|
||||
}
|
||||
|
||||
std::string ListResourceExecutionStatusRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListResourceExecutionStatusRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string ListResourceExecutionStatusRequest::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListResourceExecutionStatusRequest::setNextToken(const std::string& nextToken)
|
||||
{
|
||||
nextToken_ = nextToken;
|
||||
setParameter("NextToken", nextToken);
|
||||
}
|
||||
|
||||
int ListResourceExecutionStatusRequest::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListResourceExecutionStatusRequest::setMaxResults(int maxResults)
|
||||
{
|
||||
maxResults_ = maxResults;
|
||||
setParameter("MaxResults", std::to_string(maxResults));
|
||||
}
|
||||
|
||||
79
oos/src/model/ListResourceExecutionStatusResult.cc
Normal file
79
oos/src/model/ListResourceExecutionStatusResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/oos/model/ListResourceExecutionStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Oos;
|
||||
using namespace AlibabaCloud::Oos::Model;
|
||||
|
||||
ListResourceExecutionStatusResult::ListResourceExecutionStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListResourceExecutionStatusResult::ListResourceExecutionStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListResourceExecutionStatusResult::~ListResourceExecutionStatusResult()
|
||||
{}
|
||||
|
||||
void ListResourceExecutionStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResourceExecutionStatusNode = value["ResourceExecutionStatus"]["Status"];
|
||||
for (auto valueResourceExecutionStatusStatus : allResourceExecutionStatusNode)
|
||||
{
|
||||
Status resourceExecutionStatusObject;
|
||||
if(!valueResourceExecutionStatusStatus["ResourceId"].isNull())
|
||||
resourceExecutionStatusObject.resourceId = valueResourceExecutionStatusStatus["ResourceId"].asString();
|
||||
if(!valueResourceExecutionStatusStatus["ExecutionTime"].isNull())
|
||||
resourceExecutionStatusObject.executionTime = valueResourceExecutionStatusStatus["ExecutionTime"].asString();
|
||||
if(!valueResourceExecutionStatusStatus["Status"].isNull())
|
||||
resourceExecutionStatusObject.status = valueResourceExecutionStatusStatus["Status"].asString();
|
||||
if(!valueResourceExecutionStatusStatus["Outputs"].isNull())
|
||||
resourceExecutionStatusObject.outputs = valueResourceExecutionStatusStatus["Outputs"].asString();
|
||||
if(!valueResourceExecutionStatusStatus["ExecutionId"].isNull())
|
||||
resourceExecutionStatusObject.executionId = valueResourceExecutionStatusStatus["ExecutionId"].asString();
|
||||
resourceExecutionStatus_.push_back(resourceExecutionStatusObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListResourceExecutionStatusResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::vector<ListResourceExecutionStatusResult::Status> ListResourceExecutionStatusResult::getResourceExecutionStatus()const
|
||||
{
|
||||
return resourceExecutionStatus_;
|
||||
}
|
||||
|
||||
int ListResourceExecutionStatusResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user