Add GWS serie apis.

This commit is contained in:
sdk-team
2020-01-03 18:21:00 +08:00
parent 07fbfc619a
commit 0781ea0be4
23 changed files with 607 additions and 26 deletions

View File

@@ -181,6 +181,17 @@ void AddNodesRequest::setComputeSpotStrategy(const std::string& computeSpotStrat
setCoreParameter("ComputeSpotStrategy", computeSpotStrategy);
}
std::string AddNodesRequest::getHostNameSuffix()const
{
return hostNameSuffix_;
}
void AddNodesRequest::setHostNameSuffix(const std::string& hostNameSuffix)
{
hostNameSuffix_ = hostNameSuffix;
setCoreParameter("HostNameSuffix", hostNameSuffix);
}
std::string AddNodesRequest::getVSwitchId()const
{
return vSwitchId_;
@@ -203,6 +214,17 @@ void AddNodesRequest::setPeriodUnit(const std::string& periodUnit)
setCoreParameter("PeriodUnit", periodUnit);
}
bool AddNodesRequest::getComputeEnableHt()const
{
return computeEnableHt_;
}
void AddNodesRequest::setComputeEnableHt(bool computeEnableHt)
{
computeEnableHt_ = computeEnableHt;
setCoreParameter("ComputeEnableHt", computeEnableHt ? "true" : "false");
}
std::string AddNodesRequest::getAutoRenew()const
{
return autoRenew_;

View File

@@ -279,6 +279,17 @@ void CreateClusterRequest::setPeriodUnit(const std::string& periodUnit)
setCoreParameter("PeriodUnit", periodUnit);
}
bool CreateClusterRequest::getComputeEnableHt()const
{
return computeEnableHt_;
}
void CreateClusterRequest::setComputeEnableHt(bool computeEnableHt)
{
computeEnableHt_ = computeEnableHt;
setCoreParameter("ComputeEnableHt", computeEnableHt ? "true" : "false");
}
std::string CreateClusterRequest::getAutoRenew()const
{
return autoRenew_;
@@ -444,17 +455,6 @@ void CreateClusterRequest::setSystemDiskType(const std::string& systemDiskType)
setCoreParameter("SystemDiskType", systemDiskType);
}
bool CreateClusterRequest::getIsComputeOnecs()const
{
return isComputeOnecs_;
}
void CreateClusterRequest::setIsComputeOnecs(bool isComputeOnecs)
{
isComputeOnecs_ = isComputeOnecs;
setCoreParameter("IsComputeOnecs", isComputeOnecs ? "true" : "false");
}
std::string CreateClusterRequest::getVolumeProtocol()const
{
return volumeProtocol_;

View File

@@ -0,0 +1,51 @@
/*
* 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/ehpc/model/GetIfEcsTypeSupportHtConfigRequest.h>
using AlibabaCloud::EHPC::Model::GetIfEcsTypeSupportHtConfigRequest;
GetIfEcsTypeSupportHtConfigRequest::GetIfEcsTypeSupportHtConfigRequest() :
RpcServiceRequest("ehpc", "2018-04-12", "GetIfEcsTypeSupportHtConfig")
{
setMethod(HttpRequest::Method::Get);
}
GetIfEcsTypeSupportHtConfigRequest::~GetIfEcsTypeSupportHtConfigRequest()
{}
std::string GetIfEcsTypeSupportHtConfigRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetIfEcsTypeSupportHtConfigRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string GetIfEcsTypeSupportHtConfigRequest::getInstanceType()const
{
return instanceType_;
}
void GetIfEcsTypeSupportHtConfigRequest::setInstanceType(const std::string& instanceType)
{
instanceType_ = instanceType;
setCoreParameter("InstanceType", instanceType);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/ehpc/model/GetIfEcsTypeSupportHtConfigResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
GetIfEcsTypeSupportHtConfigResult::GetIfEcsTypeSupportHtConfigResult() :
ServiceResult()
{}
GetIfEcsTypeSupportHtConfigResult::GetIfEcsTypeSupportHtConfigResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetIfEcsTypeSupportHtConfigResult::~GetIfEcsTypeSupportHtConfigResult()
{}
void GetIfEcsTypeSupportHtConfigResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["InstanceType"].isNull())
instanceType_ = value["InstanceType"].asString();
if(!value["SupportHtConfig"].isNull())
supportHtConfig_ = value["SupportHtConfig"].asString() == "true";
if(!value["DefaultHtEnabled"].isNull())
defaultHtEnabled_ = value["DefaultHtEnabled"].asString() == "true";
}
bool GetIfEcsTypeSupportHtConfigResult::getDefaultHtEnabled()const
{
return defaultHtEnabled_;
}
bool GetIfEcsTypeSupportHtConfigResult::getSupportHtConfig()const
{
return supportHtConfig_;
}
std::string GetIfEcsTypeSupportHtConfigResult::getInstanceType()const
{
return instanceType_;
}

View File

@@ -83,6 +83,10 @@ void ListClustersResult::parse(const std::string &payload)
clustersObject.location = valueClustersClusterInfoSimple["Location"].asString();
if(!valueClustersClusterInfoSimple["EhpcVersion"].isNull())
clustersObject.ehpcVersion = valueClustersClusterInfoSimple["EhpcVersion"].asString();
if(!valueClustersClusterInfoSimple["NodePrefix"].isNull())
clustersObject.nodePrefix = valueClustersClusterInfoSimple["NodePrefix"].asString();
if(!valueClustersClusterInfoSimple["NodeSuffix"].isNull())
clustersObject.nodeSuffix = valueClustersClusterInfoSimple["NodeSuffix"].asString();
auto managersNode = value["Managers"];
if(!managersNode["Total"].isNull())
clustersObject.managers.total = std::stoi(managersNode["Total"].asString());

View File

@@ -52,7 +52,7 @@ void ListJobsResult::parse(const std::string &payload)
if(!valueJobsJobInfo["NodeList"].isNull())
jobsObject.nodeList = valueJobsJobInfo["NodeList"].asString();
if(!valueJobsJobInfo["Priority"].isNull())
jobsObject.priority = std::stoi(valueJobsJobInfo["Priority"].asString());
jobsObject.priority = valueJobsJobInfo["Priority"].asString();
if(!valueJobsJobInfo["State"].isNull())
jobsObject.state = valueJobsJobInfo["State"].asString();
if(!valueJobsJobInfo["SubmitTime"].isNull())

View File

@@ -60,6 +60,17 @@ void MountNFSRequest::setInstanceId(const std::string& instanceId)
setCoreParameter("InstanceId", instanceId);
}
std::string MountNFSRequest::getRemoteDir()const
{
return remoteDir_;
}
void MountNFSRequest::setRemoteDir(const std::string& remoteDir)
{
remoteDir_ = remoteDir;
setCoreParameter("RemoteDir", remoteDir);
}
std::string MountNFSRequest::getNfsDir()const
{
return nfsDir_;

View File

@@ -0,0 +1,62 @@
/*
* 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/ehpc/model/SetGWSInstanceNameRequest.h>
using AlibabaCloud::EHPC::Model::SetGWSInstanceNameRequest;
SetGWSInstanceNameRequest::SetGWSInstanceNameRequest() :
RpcServiceRequest("ehpc", "2018-04-12", "SetGWSInstanceName")
{
setMethod(HttpRequest::Method::Get);
}
SetGWSInstanceNameRequest::~SetGWSInstanceNameRequest()
{}
std::string SetGWSInstanceNameRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void SetGWSInstanceNameRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string SetGWSInstanceNameRequest::getInstanceId()const
{
return instanceId_;
}
void SetGWSInstanceNameRequest::setInstanceId(const std::string& instanceId)
{
instanceId_ = instanceId;
setCoreParameter("InstanceId", instanceId);
}
std::string SetGWSInstanceNameRequest::getName()const
{
return name_;
}
void SetGWSInstanceNameRequest::setName(const std::string& name)
{
name_ = name;
setCoreParameter("Name", name);
}

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/ehpc/model/SetGWSInstanceNameResult.h>
#include <json/json.h>
using namespace AlibabaCloud::EHPC;
using namespace AlibabaCloud::EHPC::Model;
SetGWSInstanceNameResult::SetGWSInstanceNameResult() :
ServiceResult()
{}
SetGWSInstanceNameResult::SetGWSInstanceNameResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SetGWSInstanceNameResult::~SetGWSInstanceNameResult()
{}
void SetGWSInstanceNameResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}