Support multi language.
This commit is contained in:
@@ -1347,42 +1347,6 @@ FoasClient::GetInstanceRunSummaryOutcomeCallable FoasClient::getInstanceRunSumma
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::GetInstanceVertexTaskManagersOutcome FoasClient::getInstanceVertexTaskManagers(const GetInstanceVertexTaskManagersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetInstanceVertexTaskManagersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetInstanceVertexTaskManagersOutcome(GetInstanceVertexTaskManagersResult(outcome.result()));
|
||||
else
|
||||
return GetInstanceVertexTaskManagersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FoasClient::getInstanceVertexTaskManagersAsync(const GetInstanceVertexTaskManagersRequest& request, const GetInstanceVertexTaskManagersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getInstanceVertexTaskManagers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FoasClient::GetInstanceVertexTaskManagersOutcomeCallable FoasClient::getInstanceVertexTaskManagersCallable(const GetInstanceVertexTaskManagersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetInstanceVertexTaskManagersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getInstanceVertexTaskManagers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::GetJobOutcome FoasClient::getJob(const GetJobRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1887,6 +1851,42 @@ FoasClient::ListProjectBindQueueResourceOutcomeCallable FoasClient::listProjectB
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::ListTagResourcesOutcome FoasClient::listTagResources(const ListTagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListTagResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result()));
|
||||
else
|
||||
return ListTagResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FoasClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listTagResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FoasClient::ListTagResourcesOutcomeCallable FoasClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListTagResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listTagResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::MVFolderOutcome FoasClient::mVFolder(const MVFolderRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2103,6 +2103,42 @@ FoasClient::StartJobOutcomeCallable FoasClient::startJobCallable(const StartJobR
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::TagResourcesOutcome FoasClient::tagResources(const TagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TagResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TagResourcesOutcome(TagResourcesResult(outcome.result()));
|
||||
else
|
||||
return TagResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FoasClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, tagResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FoasClient::TagResourcesOutcomeCallable FoasClient::tagResourcesCallable(const TagResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TagResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->tagResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::UnbindQueueOutcome FoasClient::unbindQueue(const UnbindQueueRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2139,6 +2175,42 @@ FoasClient::UnbindQueueOutcomeCallable FoasClient::unbindQueueCallable(const Unb
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::UntagResourcesOutcome FoasClient::untagResources(const UntagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UntagResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UntagResourcesOutcome(UntagResourcesResult(outcome.result()));
|
||||
else
|
||||
return UntagResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FoasClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, untagResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FoasClient::UntagResourcesOutcomeCallable FoasClient::untagResourcesCallable(const UntagResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UntagResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->untagResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::UpdateAutoScaleConfigOutcome FoasClient::updateAutoScaleConfig(const UpdateAutoScaleConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2247,6 +2319,78 @@ FoasClient::UpdatePackageOutcomeCallable FoasClient::updatePackageCallable(const
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::UpdateProjectOutcome FoasClient::updateProject(const UpdateProjectRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateProjectOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateProjectOutcome(UpdateProjectResult(outcome.result()));
|
||||
else
|
||||
return UpdateProjectOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FoasClient::updateProjectAsync(const UpdateProjectRequest& request, const UpdateProjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateProject(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FoasClient::UpdateProjectOutcomeCallable FoasClient::updateProjectCallable(const UpdateProjectRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateProjectOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateProject(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::UpdateProjectConfigOutcome FoasClient::updateProjectConfig(const UpdateProjectConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateProjectConfigOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateProjectConfigOutcome(UpdateProjectConfigResult(outcome.result()));
|
||||
else
|
||||
return UpdateProjectConfigOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void FoasClient::updateProjectConfigAsync(const UpdateProjectConfigRequest& request, const UpdateProjectConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateProjectConfig(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
FoasClient::UpdateProjectConfigOutcomeCallable FoasClient::updateProjectConfigCallable(const UpdateProjectConfigRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateProjectConfigOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateProjectConfig(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
FoasClient::UpdateQueueOutcome FoasClient::updateQueue(const UpdateQueueRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -39,6 +39,17 @@ void CommitJobRequest::setProjectName(const std::string& projectName)
|
||||
setParameter("ProjectName", projectName);
|
||||
}
|
||||
|
||||
bool CommitJobRequest::getRecommendOnly()const
|
||||
{
|
||||
return recommendOnly_;
|
||||
}
|
||||
|
||||
void CommitJobRequest::setRecommendOnly(bool recommendOnly)
|
||||
{
|
||||
recommendOnly_ = recommendOnly;
|
||||
setBodyParameter("RecommendOnly", recommendOnly ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CommitJobRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
@@ -50,6 +61,17 @@ void CommitJobRequest::setRegionId(const std::string& regionId)
|
||||
setHeader("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CommitJobRequest::getSuspendPeriods()const
|
||||
{
|
||||
return suspendPeriods_;
|
||||
}
|
||||
|
||||
void CommitJobRequest::setSuspendPeriods(const std::string& suspendPeriods)
|
||||
{
|
||||
suspendPeriods_ = suspendPeriods;
|
||||
setBodyParameter("SuspendPeriods", suspendPeriods);
|
||||
}
|
||||
|
||||
float CommitJobRequest::getMaxCU()const
|
||||
{
|
||||
return maxCU_;
|
||||
@@ -94,3 +116,21 @@ void CommitJobRequest::setJobName(const std::string& jobName)
|
||||
setParameter("JobName", jobName);
|
||||
}
|
||||
|
||||
std::vector<CommitJobRequest::suspendPeriodParam> CommitJobRequest::getSuspendPeriodParam()const
|
||||
{
|
||||
return suspendPeriodParam_;
|
||||
}
|
||||
|
||||
void CommitJobRequest::setSuspendPeriodParam(const std::vector<suspendPeriodParam>& suspendPeriodParam)
|
||||
{
|
||||
suspendPeriodParam_ = suspendPeriodParam;
|
||||
for(int dep1 = 0; dep1!= suspendPeriodParam.size(); dep1++) {
|
||||
auto suspendPeriodParamObj = suspendPeriodParam.at(dep1);
|
||||
std::string suspendPeriodParamObjStr = "suspendPeriodParam." + std::to_string(dep1 + 1);
|
||||
setParameter(suspendPeriodParamObjStr + ".EndTime", suspendPeriodParamObj.endTime);
|
||||
setParameter(suspendPeriodParamObjStr + ".StartTime", suspendPeriodParamObj.startTime);
|
||||
setParameter(suspendPeriodParamObjStr + ".Plan", suspendPeriodParamObj.plan);
|
||||
setParameter(suspendPeriodParamObjStr + ".Policy", suspendPeriodParamObj.policy);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ void GetClusterQueueInfoResult::parse(const std::string &payload)
|
||||
queuesObject.maxVCore = std::stoi(valueQueuesQueue["MaxVCore"].asString());
|
||||
if(!valueQueuesQueue["MaxMem"].isNull())
|
||||
queuesObject.maxMem = std::stoi(valueQueuesQueue["MaxMem"].asString());
|
||||
if(!valueQueuesQueue["ExternalInfo"].isNull())
|
||||
queuesObject.externalInfo = valueQueuesQueue["ExternalInfo"].asString();
|
||||
queues_.push_back(queuesObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,10 @@ void GetInstanceResult::parse(const std::string &payload)
|
||||
instance_.queueName = instanceNode["QueueName"].asString();
|
||||
if(!instanceNode["EndTime"].isNull())
|
||||
instance_.endTime = std::stol(instanceNode["EndTime"].asString());
|
||||
if(!instanceNode["AutoScaleParams"].isNull())
|
||||
instance_.autoScaleParams = instanceNode["AutoScaleParams"].asString();
|
||||
if(!instanceNode["Priority"].isNull())
|
||||
instance_.priority = std::stoi(instanceNode["Priority"].asString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
/*
|
||||
* 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/foas/model/GetInstanceVertexTaskManagersRequest.h>
|
||||
|
||||
using AlibabaCloud::Foas::Model::GetInstanceVertexTaskManagersRequest;
|
||||
|
||||
GetInstanceVertexTaskManagersRequest::GetInstanceVertexTaskManagersRequest() :
|
||||
RoaServiceRequest("foas", "2018-11-11")
|
||||
{}
|
||||
|
||||
GetInstanceVertexTaskManagersRequest::~GetInstanceVertexTaskManagersRequest()
|
||||
{}
|
||||
|
||||
std::string GetInstanceVertexTaskManagersRequest::getProjectName()const
|
||||
{
|
||||
return projectName_;
|
||||
}
|
||||
|
||||
void GetInstanceVertexTaskManagersRequest::setProjectName(const std::string& projectName)
|
||||
{
|
||||
projectName_ = projectName;
|
||||
setCoreParameter("ProjectName", projectName);
|
||||
}
|
||||
|
||||
long GetInstanceVertexTaskManagersRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetInstanceVertexTaskManagersRequest::setInstanceId(long instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setCoreParameter("InstanceId", std::to_string(instanceId));
|
||||
}
|
||||
|
||||
std::string GetInstanceVertexTaskManagersRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetInstanceVertexTaskManagersRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setCoreParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string GetInstanceVertexTaskManagersRequest::getVertexId()const
|
||||
{
|
||||
return vertexId_;
|
||||
}
|
||||
|
||||
void GetInstanceVertexTaskManagersRequest::setVertexId(const std::string& vertexId)
|
||||
{
|
||||
vertexId_ = vertexId;
|
||||
setCoreParameter("VertexId", vertexId);
|
||||
}
|
||||
|
||||
std::string GetInstanceVertexTaskManagersRequest::getJobName()const
|
||||
{
|
||||
return jobName_;
|
||||
}
|
||||
|
||||
void GetInstanceVertexTaskManagersRequest::setJobName(const std::string& jobName)
|
||||
{
|
||||
jobName_ = jobName;
|
||||
setCoreParameter("JobName", jobName);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,8 @@ void GetJobResult::parse(const std::string &payload)
|
||||
job_.folderId = std::stol(jobNode["FolderId"].asString());
|
||||
if(!jobNode["JobId"].isNull())
|
||||
job_.jobId = jobNode["JobId"].asString();
|
||||
if(!jobNode["FileId"].isNull())
|
||||
job_.fileId = jobNode["FileId"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,14 @@ void GetPackageResult::parse(const std::string &payload)
|
||||
package_.ossPath = packageNode["OssPath"].asString();
|
||||
if(!packageNode["Tag"].isNull())
|
||||
package_.tag = packageNode["Tag"].asString();
|
||||
if(!packageNode["ScanLink"].isNull())
|
||||
package_.scanLink = packageNode["ScanLink"].asString();
|
||||
if(!packageNode["ScanState"].isNull())
|
||||
package_.scanState = packageNode["ScanState"].asString();
|
||||
if(!packageNode["ScanErrorMessage"].isNull())
|
||||
package_.scanErrorMessage = packageNode["ScanErrorMessage"].asString();
|
||||
if(!packageNode["ScanExtBizNo"].isNull())
|
||||
package_.scanExtBizNo = packageNode["ScanExtBizNo"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ void GetProjectResult::parse(const std::string &payload)
|
||||
project_.region = projectNode["Region"].asString();
|
||||
if(!projectNode["Id"].isNull())
|
||||
project_.id = projectNode["Id"].asString();
|
||||
if(!projectNode["GlobalJobConfig"].isNull())
|
||||
project_.globalJobConfig = projectNode["GlobalJobConfig"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -72,6 +72,17 @@ void GetRawPlanJsonRequest::setExpectedCore(float expectedCore)
|
||||
setParameter("ExpectedCore", std::to_string(expectedCore));
|
||||
}
|
||||
|
||||
std::string GetRawPlanJsonRequest::getAdvisorAction()const
|
||||
{
|
||||
return advisorAction_;
|
||||
}
|
||||
|
||||
void GetRawPlanJsonRequest::setAdvisorAction(const std::string& advisorAction)
|
||||
{
|
||||
advisorAction_ = advisorAction;
|
||||
setParameter("AdvisorAction", advisorAction);
|
||||
}
|
||||
|
||||
std::string GetRawPlanJsonRequest::getJobName()const
|
||||
{
|
||||
return jobName_;
|
||||
|
||||
@@ -89,6 +89,8 @@ void ListInstanceResult::parse(const std::string &payload)
|
||||
instancesObject.queueName = valueInstancesInstance["QueueName"].asString();
|
||||
if(!valueInstancesInstance["EndTime"].isNull())
|
||||
instancesObject.endTime = std::stol(valueInstancesInstance["EndTime"].asString());
|
||||
if(!valueInstancesInstance["Priority"].isNull())
|
||||
instancesObject.priority = std::stoi(valueInstancesInstance["Priority"].asString());
|
||||
instances_.push_back(instancesObject);
|
||||
}
|
||||
if(!value["PageIndex"].isNull())
|
||||
|
||||
@@ -73,6 +73,14 @@ void ListPackageResult::parse(const std::string &payload)
|
||||
packagesObject.ossPath = valuePackagesPackage["OssPath"].asString();
|
||||
if(!valuePackagesPackage["Tag"].isNull())
|
||||
packagesObject.tag = valuePackagesPackage["Tag"].asString();
|
||||
if(!valuePackagesPackage["ScanState"].isNull())
|
||||
packagesObject.scanState = valuePackagesPackage["ScanState"].asString();
|
||||
if(!valuePackagesPackage["ScanLink"].isNull())
|
||||
packagesObject.scanLink = valuePackagesPackage["ScanLink"].asString();
|
||||
if(!valuePackagesPackage["ScanExtBizNo"].isNull())
|
||||
packagesObject.scanExtBizNo = valuePackagesPackage["ScanExtBizNo"].asString();
|
||||
if(!valuePackagesPackage["ScanErrorMessage"].isNull())
|
||||
packagesObject.scanErrorMessage = valuePackagesPackage["ScanErrorMessage"].asString();
|
||||
packages_.push_back(packagesObject);
|
||||
}
|
||||
if(!value["PageIndex"].isNull())
|
||||
|
||||
85
foas/src/model/ListTagResourcesRequest.cc
Normal file
85
foas/src/model/ListTagResourcesRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/foas/model/ListTagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Foas::Model::ListTagResourcesRequest;
|
||||
|
||||
ListTagResourcesRequest::ListTagResourcesRequest() :
|
||||
RoaServiceRequest("foas", "2018-11-11")
|
||||
{
|
||||
setResourcePath("/api/v2/cluster/tags");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListTagResourcesRequest::~ListTagResourcesRequest()
|
||||
{}
|
||||
|
||||
std::string ListTagResourcesRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setHeader("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setNextToken(const std::string& nextToken)
|
||||
{
|
||||
nextToken_ = nextToken;
|
||||
setParameter("NextToken", nextToken);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getResourceType()const
|
||||
{
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceType(const std::string& resourceType)
|
||||
{
|
||||
resourceType_ = resourceType;
|
||||
setParameter("ResourceType", resourceType);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getResourceIds()const
|
||||
{
|
||||
return resourceIds_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceIds(const std::string& resourceIds)
|
||||
{
|
||||
resourceIds_ = resourceIds;
|
||||
setParameter("ResourceIds", resourceIds);
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setTags(const std::string& tags)
|
||||
{
|
||||
tags_ = tags;
|
||||
setParameter("Tags", tags);
|
||||
}
|
||||
|
||||
94
foas/src/model/ListTagResourcesResult.cc
Normal file
94
foas/src/model/ListTagResourcesResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/foas/model/ListTagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Foas;
|
||||
using namespace AlibabaCloud::Foas::Model;
|
||||
|
||||
ListTagResourcesResult::ListTagResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListTagResourcesResult::~ListTagResourcesResult()
|
||||
{}
|
||||
|
||||
void ListTagResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["NextToken"].isNull())
|
||||
data_.nextToken = dataNode["NextToken"].asString();
|
||||
auto allTagResourcesNode = dataNode["TagResources"]["TagResource"];
|
||||
for (auto dataNodeTagResourcesTagResource : allTagResourcesNode)
|
||||
{
|
||||
Data::TagResource tagResourceObject;
|
||||
if(!dataNodeTagResourcesTagResource["ResourceType"].isNull())
|
||||
tagResourceObject.resourceType = dataNodeTagResourcesTagResource["ResourceType"].asString();
|
||||
if(!dataNodeTagResourcesTagResource["TagKey"].isNull())
|
||||
tagResourceObject.tagKey = dataNodeTagResourcesTagResource["TagKey"].asString();
|
||||
if(!dataNodeTagResourcesTagResource["TagValue"].isNull())
|
||||
tagResourceObject.tagValue = dataNodeTagResourcesTagResource["TagValue"].asString();
|
||||
if(!dataNodeTagResourcesTagResource["ResourceId"].isNull())
|
||||
tagResourceObject.resourceId = dataNodeTagResourcesTagResource["ResourceId"].asString();
|
||||
data_.tagResources.push_back(tagResourceObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListTagResourcesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListTagResourcesResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
ListTagResourcesResult::Data ListTagResourcesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string ListTagResourcesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListTagResourcesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -72,6 +72,17 @@ void ModifyInstanceStateRequest::setRegionId(const std::string& regionId)
|
||||
setHeader("RegionId", regionId);
|
||||
}
|
||||
|
||||
bool ModifyInstanceStateRequest::getTriggerCheckpoint()const
|
||||
{
|
||||
return triggerCheckpoint_;
|
||||
}
|
||||
|
||||
void ModifyInstanceStateRequest::setTriggerCheckpoint(bool triggerCheckpoint)
|
||||
{
|
||||
triggerCheckpoint_ = triggerCheckpoint;
|
||||
setBodyParameter("TriggerCheckpoint", triggerCheckpoint ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ModifyInstanceStateRequest::getExpectState()const
|
||||
{
|
||||
return expectState_;
|
||||
|
||||
41
foas/src/model/TagResourcesRequest.cc
Normal file
41
foas/src/model/TagResourcesRequest.cc
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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/foas/model/TagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Foas::Model::TagResourcesRequest;
|
||||
|
||||
TagResourcesRequest::TagResourcesRequest() :
|
||||
RoaServiceRequest("foas", "2018-11-11")
|
||||
{
|
||||
setResourcePath("/api/v2/cluster/tags");
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TagResourcesRequest::~TagResourcesRequest()
|
||||
{}
|
||||
|
||||
std::string TagResourcesRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setHeader("RegionId", regionId);
|
||||
}
|
||||
|
||||
79
foas/src/model/TagResourcesResult.cc
Normal file
79
foas/src/model/TagResourcesResult.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/foas/model/TagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Foas;
|
||||
using namespace AlibabaCloud::Foas::Model;
|
||||
|
||||
TagResourcesResult::TagResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TagResourcesResult::TagResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TagResourcesResult::~TagResourcesResult()
|
||||
{}
|
||||
|
||||
void TagResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string TagResourcesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int TagResourcesResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
bool TagResourcesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string TagResourcesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool TagResourcesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
85
foas/src/model/UntagResourcesRequest.cc
Normal file
85
foas/src/model/UntagResourcesRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/foas/model/UntagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Foas::Model::UntagResourcesRequest;
|
||||
|
||||
UntagResourcesRequest::UntagResourcesRequest() :
|
||||
RoaServiceRequest("foas", "2018-11-11")
|
||||
{
|
||||
setResourcePath("/api/v2/cluster/tags");
|
||||
setMethod(HttpRequest::Method::Delete);
|
||||
}
|
||||
|
||||
UntagResourcesRequest::~UntagResourcesRequest()
|
||||
{}
|
||||
|
||||
bool UntagResourcesRequest::getAll()const
|
||||
{
|
||||
return all_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setAll(bool all)
|
||||
{
|
||||
all_ = all;
|
||||
setParameter("All", all ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setHeader("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getTagKeys()const
|
||||
{
|
||||
return tagKeys_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setTagKeys(const std::string& tagKeys)
|
||||
{
|
||||
tagKeys_ = tagKeys;
|
||||
setParameter("TagKeys", tagKeys);
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getResourceType()const
|
||||
{
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceType(const std::string& resourceType)
|
||||
{
|
||||
resourceType_ = resourceType;
|
||||
setParameter("ResourceType", resourceType);
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getResourceIds()const
|
||||
{
|
||||
return resourceIds_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceIds(const std::string& resourceIds)
|
||||
{
|
||||
resourceIds_ = resourceIds;
|
||||
setParameter("ResourceIds", resourceIds);
|
||||
}
|
||||
|
||||
79
foas/src/model/UntagResourcesResult.cc
Normal file
79
foas/src/model/UntagResourcesResult.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/foas/model/UntagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Foas;
|
||||
using namespace AlibabaCloud::Foas::Model;
|
||||
|
||||
UntagResourcesResult::UntagResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UntagResourcesResult::UntagResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UntagResourcesResult::~UntagResourcesResult()
|
||||
{}
|
||||
|
||||
void UntagResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string UntagResourcesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int UntagResourcesResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
bool UntagResourcesResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string UntagResourcesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool UntagResourcesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
52
foas/src/model/UpdateProjectConfigRequest.cc
Normal file
52
foas/src/model/UpdateProjectConfigRequest.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/foas/model/UpdateProjectConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::Foas::Model::UpdateProjectConfigRequest;
|
||||
|
||||
UpdateProjectConfigRequest::UpdateProjectConfigRequest() :
|
||||
RoaServiceRequest("foas", "2018-11-11")
|
||||
{
|
||||
setResourcePath("/api/v2/project/config");
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateProjectConfigRequest::~UpdateProjectConfigRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateProjectConfigRequest::getProjectName()const
|
||||
{
|
||||
return projectName_;
|
||||
}
|
||||
|
||||
void UpdateProjectConfigRequest::setProjectName(const std::string& projectName)
|
||||
{
|
||||
projectName_ = projectName;
|
||||
setParameter("ProjectName", projectName);
|
||||
}
|
||||
|
||||
bool UpdateProjectConfigRequest::getIsOpenBatchSQL()const
|
||||
{
|
||||
return isOpenBatchSQL_;
|
||||
}
|
||||
|
||||
void UpdateProjectConfigRequest::setIsOpenBatchSQL(bool isOpenBatchSQL)
|
||||
{
|
||||
isOpenBatchSQL_ = isOpenBatchSQL;
|
||||
setParameter("IsOpenBatchSQL", isOpenBatchSQL ? "true" : "false");
|
||||
}
|
||||
|
||||
@@ -14,38 +14,38 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/foas/model/GetInstanceVertexTaskManagersResult.h>
|
||||
#include <alibabacloud/foas/model/UpdateProjectConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Foas;
|
||||
using namespace AlibabaCloud::Foas::Model;
|
||||
|
||||
GetInstanceVertexTaskManagersResult::GetInstanceVertexTaskManagersResult() :
|
||||
UpdateProjectConfigResult::UpdateProjectConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetInstanceVertexTaskManagersResult::GetInstanceVertexTaskManagersResult(const std::string &payload) :
|
||||
UpdateProjectConfigResult::UpdateProjectConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetInstanceVertexTaskManagersResult::~GetInstanceVertexTaskManagersResult()
|
||||
UpdateProjectConfigResult::~UpdateProjectConfigResult()
|
||||
{}
|
||||
|
||||
void GetInstanceVertexTaskManagersResult::parse(const std::string &payload)
|
||||
void UpdateProjectConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["TaskManagers"].isNull())
|
||||
taskManagers_ = value["TaskManagers"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetInstanceVertexTaskManagersResult::getTaskManagers()const
|
||||
bool UpdateProjectConfigResult::getData()const
|
||||
{
|
||||
return taskManagers_;
|
||||
return data_;
|
||||
}
|
||||
|
||||
63
foas/src/model/UpdateProjectRequest.cc
Normal file
63
foas/src/model/UpdateProjectRequest.cc
Normal file
@@ -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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/foas/model/UpdateProjectRequest.h>
|
||||
|
||||
using AlibabaCloud::Foas::Model::UpdateProjectRequest;
|
||||
|
||||
UpdateProjectRequest::UpdateProjectRequest() :
|
||||
RoaServiceRequest("foas", "2018-11-11")
|
||||
{
|
||||
setResourcePath("/api/v2/projects/[projectName]");
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateProjectRequest::~UpdateProjectRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateProjectRequest::getProjectName()const
|
||||
{
|
||||
return projectName_;
|
||||
}
|
||||
|
||||
void UpdateProjectRequest::setProjectName(const std::string& projectName)
|
||||
{
|
||||
projectName_ = projectName;
|
||||
setParameter("ProjectName", projectName);
|
||||
}
|
||||
|
||||
std::string UpdateProjectRequest::getGlobalJobConfig()const
|
||||
{
|
||||
return globalJobConfig_;
|
||||
}
|
||||
|
||||
void UpdateProjectRequest::setGlobalJobConfig(const std::string& globalJobConfig)
|
||||
{
|
||||
globalJobConfig_ = globalJobConfig;
|
||||
setBodyParameter("GlobalJobConfig", globalJobConfig);
|
||||
}
|
||||
|
||||
std::string UpdateProjectRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void UpdateProjectRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setHeader("RegionId", regionId);
|
||||
}
|
||||
|
||||
44
foas/src/model/UpdateProjectResult.cc
Normal file
44
foas/src/model/UpdateProjectResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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/foas/model/UpdateProjectResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Foas;
|
||||
using namespace AlibabaCloud::Foas::Model;
|
||||
|
||||
UpdateProjectResult::UpdateProjectResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateProjectResult::UpdateProjectResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateProjectResult::~UpdateProjectResult()
|
||||
{}
|
||||
|
||||
void UpdateProjectResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user