Support multi language.

This commit is contained in:
sdk-team
2021-11-02 07:14:08 +00:00
parent e4fc46970b
commit 5f1578fdbe
46 changed files with 1489 additions and 176 deletions

View File

@@ -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);
}
}

View File

@@ -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);
}

View File

@@ -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());
}

View File

@@ -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);
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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();
}

View File

@@ -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_;

View File

@@ -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())

View File

@@ -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())

View 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);
}

View 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_;
}

View File

@@ -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_;

View 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);
}

View 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_;
}

View 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);
}

View 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_;
}

View 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");
}

View File

@@ -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_;
}

View 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);
}

View 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());
}