Add support for create hbaseue multizone instance.

This commit is contained in:
sdk-team
2020-05-27 14:17:37 +08:00
parent 95a93b89f1
commit ec5269015c
17 changed files with 878 additions and 1 deletions

View File

@@ -0,0 +1,337 @@
/*
* 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/hbase/model/CreateMultiZoneClusterRequest.h>
using AlibabaCloud::HBase::Model::CreateMultiZoneClusterRequest;
CreateMultiZoneClusterRequest::CreateMultiZoneClusterRequest() :
RpcServiceRequest("hbase", "2019-01-01", "CreateMultiZoneCluster")
{
setMethod(HttpRequest::Method::Post);
}
CreateMultiZoneClusterRequest::~CreateMultiZoneClusterRequest()
{}
std::string CreateMultiZoneClusterRequest::getArchVersion()const
{
return archVersion_;
}
void CreateMultiZoneClusterRequest::setArchVersion(const std::string& archVersion)
{
archVersion_ = archVersion;
setParameter("ArchVersion", archVersion);
}
std::string CreateMultiZoneClusterRequest::getClusterName()const
{
return clusterName_;
}
void CreateMultiZoneClusterRequest::setClusterName(const std::string& clusterName)
{
clusterName_ = clusterName;
setParameter("ClusterName", clusterName);
}
std::string CreateMultiZoneClusterRequest::getEngineVersion()const
{
return engineVersion_;
}
void CreateMultiZoneClusterRequest::setEngineVersion(const std::string& engineVersion)
{
engineVersion_ = engineVersion;
setParameter("EngineVersion", engineVersion);
}
std::string CreateMultiZoneClusterRequest::getLogDiskType()const
{
return logDiskType_;
}
void CreateMultiZoneClusterRequest::setLogDiskType(const std::string& logDiskType)
{
logDiskType_ = logDiskType;
setParameter("LogDiskType", logDiskType);
}
std::string CreateMultiZoneClusterRequest::getPrimaryVSwitchId()const
{
return primaryVSwitchId_;
}
void CreateMultiZoneClusterRequest::setPrimaryVSwitchId(const std::string& primaryVSwitchId)
{
primaryVSwitchId_ = primaryVSwitchId;
setParameter("PrimaryVSwitchId", primaryVSwitchId);
}
std::string CreateMultiZoneClusterRequest::getLogInstanceType()const
{
return logInstanceType_;
}
void CreateMultiZoneClusterRequest::setLogInstanceType(const std::string& logInstanceType)
{
logInstanceType_ = logInstanceType;
setParameter("LogInstanceType", logInstanceType);
}
int CreateMultiZoneClusterRequest::getAutoRenewPeriod()const
{
return autoRenewPeriod_;
}
void CreateMultiZoneClusterRequest::setAutoRenewPeriod(int autoRenewPeriod)
{
autoRenewPeriod_ = autoRenewPeriod;
setParameter("AutoRenewPeriod", std::to_string(autoRenewPeriod));
}
int CreateMultiZoneClusterRequest::getPeriod()const
{
return period_;
}
void CreateMultiZoneClusterRequest::setPeriod(int period)
{
period_ = period;
setParameter("Period", std::to_string(period));
}
int CreateMultiZoneClusterRequest::getLogNodeCount()const
{
return logNodeCount_;
}
void CreateMultiZoneClusterRequest::setLogNodeCount(int logNodeCount)
{
logNodeCount_ = logNodeCount;
setParameter("LogNodeCount", std::to_string(logNodeCount));
}
std::string CreateMultiZoneClusterRequest::getSecurityIPList()const
{
return securityIPList_;
}
void CreateMultiZoneClusterRequest::setSecurityIPList(const std::string& securityIPList)
{
securityIPList_ = securityIPList;
setParameter("SecurityIPList", securityIPList);
}
std::string CreateMultiZoneClusterRequest::getPeriodUnit()const
{
return periodUnit_;
}
void CreateMultiZoneClusterRequest::setPeriodUnit(const std::string& periodUnit)
{
periodUnit_ = periodUnit;
setParameter("PeriodUnit", periodUnit);
}
std::string CreateMultiZoneClusterRequest::getCoreDiskType()const
{
return coreDiskType_;
}
void CreateMultiZoneClusterRequest::setCoreDiskType(const std::string& coreDiskType)
{
coreDiskType_ = coreDiskType;
setParameter("CoreDiskType", coreDiskType);
}
std::string CreateMultiZoneClusterRequest::getArbiterZoneId()const
{
return arbiterZoneId_;
}
void CreateMultiZoneClusterRequest::setArbiterZoneId(const std::string& arbiterZoneId)
{
arbiterZoneId_ = arbiterZoneId;
setParameter("ArbiterZoneId", arbiterZoneId);
}
std::string CreateMultiZoneClusterRequest::getClientToken()const
{
return clientToken_;
}
void CreateMultiZoneClusterRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateMultiZoneClusterRequest::getMultiZoneCombination()const
{
return multiZoneCombination_;
}
void CreateMultiZoneClusterRequest::setMultiZoneCombination(const std::string& multiZoneCombination)
{
multiZoneCombination_ = multiZoneCombination;
setParameter("MultiZoneCombination", multiZoneCombination);
}
std::string CreateMultiZoneClusterRequest::getPrimaryZoneId()const
{
return primaryZoneId_;
}
void CreateMultiZoneClusterRequest::setPrimaryZoneId(const std::string& primaryZoneId)
{
primaryZoneId_ = primaryZoneId;
setParameter("PrimaryZoneId", primaryZoneId);
}
std::string CreateMultiZoneClusterRequest::getEngine()const
{
return engine_;
}
void CreateMultiZoneClusterRequest::setEngine(const std::string& engine)
{
engine_ = engine;
setParameter("Engine", engine);
}
std::string CreateMultiZoneClusterRequest::getRegionId()const
{
return regionId_;
}
void CreateMultiZoneClusterRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string CreateMultiZoneClusterRequest::getStandbyVSwitchId()const
{
return standbyVSwitchId_;
}
void CreateMultiZoneClusterRequest::setStandbyVSwitchId(const std::string& standbyVSwitchId)
{
standbyVSwitchId_ = standbyVSwitchId;
setParameter("StandbyVSwitchId", standbyVSwitchId);
}
std::string CreateMultiZoneClusterRequest::getStandbyZoneId()const
{
return standbyZoneId_;
}
void CreateMultiZoneClusterRequest::setStandbyZoneId(const std::string& standbyZoneId)
{
standbyZoneId_ = standbyZoneId;
setParameter("StandbyZoneId", standbyZoneId);
}
std::string CreateMultiZoneClusterRequest::getMasterInstanceType()const
{
return masterInstanceType_;
}
void CreateMultiZoneClusterRequest::setMasterInstanceType(const std::string& masterInstanceType)
{
masterInstanceType_ = masterInstanceType;
setParameter("MasterInstanceType", masterInstanceType);
}
int CreateMultiZoneClusterRequest::getCoreNodeCount()const
{
return coreNodeCount_;
}
void CreateMultiZoneClusterRequest::setCoreNodeCount(int coreNodeCount)
{
coreNodeCount_ = coreNodeCount;
setParameter("CoreNodeCount", std::to_string(coreNodeCount));
}
int CreateMultiZoneClusterRequest::getLogDiskSize()const
{
return logDiskSize_;
}
void CreateMultiZoneClusterRequest::setLogDiskSize(int logDiskSize)
{
logDiskSize_ = logDiskSize;
setParameter("LogDiskSize", std::to_string(logDiskSize));
}
std::string CreateMultiZoneClusterRequest::getCoreInstanceType()const
{
return coreInstanceType_;
}
void CreateMultiZoneClusterRequest::setCoreInstanceType(const std::string& coreInstanceType)
{
coreInstanceType_ = coreInstanceType;
setParameter("CoreInstanceType", coreInstanceType);
}
int CreateMultiZoneClusterRequest::getCoreDiskSize()const
{
return coreDiskSize_;
}
void CreateMultiZoneClusterRequest::setCoreDiskSize(int coreDiskSize)
{
coreDiskSize_ = coreDiskSize;
setParameter("CoreDiskSize", std::to_string(coreDiskSize));
}
std::string CreateMultiZoneClusterRequest::getVpcId()const
{
return vpcId_;
}
void CreateMultiZoneClusterRequest::setVpcId(const std::string& vpcId)
{
vpcId_ = vpcId;
setParameter("VpcId", vpcId);
}
std::string CreateMultiZoneClusterRequest::getPayType()const
{
return payType_;
}
void CreateMultiZoneClusterRequest::setPayType(const std::string& payType)
{
payType_ = payType;
setParameter("PayType", payType);
}
std::string CreateMultiZoneClusterRequest::getArbiterVSwitchId()const
{
return arbiterVSwitchId_;
}
void CreateMultiZoneClusterRequest::setArbiterVSwitchId(const std::string& arbiterVSwitchId)
{
arbiterVSwitchId_ = arbiterVSwitchId;
setParameter("ArbiterVSwitchId", arbiterVSwitchId);
}

View File

@@ -0,0 +1,58 @@
/*
* 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/hbase/model/CreateMultiZoneClusterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::HBase;
using namespace AlibabaCloud::HBase::Model;
CreateMultiZoneClusterResult::CreateMultiZoneClusterResult() :
ServiceResult()
{}
CreateMultiZoneClusterResult::CreateMultiZoneClusterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateMultiZoneClusterResult::~CreateMultiZoneClusterResult()
{}
void CreateMultiZoneClusterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["ClusterId"].isNull())
clusterId_ = value["ClusterId"].asString();
if(!value["OrderId"].isNull())
orderId_ = value["OrderId"].asString();
}
std::string CreateMultiZoneClusterResult::getClusterId()const
{
return clusterId_;
}
std::string CreateMultiZoneClusterResult::getOrderId()const
{
return orderId_;
}

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/hbase/model/DeleteMultiZoneClusterRequest.h>
using AlibabaCloud::HBase::Model::DeleteMultiZoneClusterRequest;
DeleteMultiZoneClusterRequest::DeleteMultiZoneClusterRequest() :
RpcServiceRequest("hbase", "2019-01-01", "DeleteMultiZoneCluster")
{
setMethod(HttpRequest::Method::Post);
}
DeleteMultiZoneClusterRequest::~DeleteMultiZoneClusterRequest()
{}
bool DeleteMultiZoneClusterRequest::getImmediateDeleteFlag()const
{
return immediateDeleteFlag_;
}
void DeleteMultiZoneClusterRequest::setImmediateDeleteFlag(bool immediateDeleteFlag)
{
immediateDeleteFlag_ = immediateDeleteFlag;
setParameter("ImmediateDeleteFlag", immediateDeleteFlag ? "true" : "false");
}
std::string DeleteMultiZoneClusterRequest::getClusterId()const
{
return clusterId_;
}
void DeleteMultiZoneClusterRequest::setClusterId(const std::string& clusterId)
{
clusterId_ = clusterId;
setParameter("ClusterId", clusterId);
}

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

View File

@@ -77,6 +77,8 @@ void DescribeAvailableResourceResult::parse(const std::string &payload)
AvailableZone::SupportedEngine::SupportedEngineVersion::SupportedCategoriesItem::SupportedStorageType::CoreResource coreResourcesObject;
if(!allSupportedStorageTypesNodeCoreResourcesCoreResource["InstanceType"].isNull())
coreResourcesObject.instanceType = allSupportedStorageTypesNodeCoreResourcesCoreResource["InstanceType"].asString();
if(!allSupportedStorageTypesNodeCoreResourcesCoreResource["MaxCoreCount"].isNull())
coreResourcesObject.maxCoreCount = std::stoi(allSupportedStorageTypesNodeCoreResourcesCoreResource["MaxCoreCount"].asString());
auto dBInstanceStorageRangeNode = value["DBInstanceStorageRange"];
if(!dBInstanceStorageRangeNode["MaxSize"].isNull())
coreResourcesObject.dBInstanceStorageRange.maxSize = std::stoi(dBInstanceStorageRangeNode["MaxSize"].asString());

View File

@@ -109,6 +109,8 @@ void DescribeInstancesResult::parse(const std::string &payload)
instancesObject.moduleId = std::stoi(valueInstancesInstance["ModuleId"].asString());
if(!valueInstancesInstance["ModuleStackVersion"].isNull())
instancesObject.moduleStackVersion = valueInstancesInstance["ModuleStackVersion"].asString();
if(!valueInstancesInstance["CoreDiskCount"].isNull())
instancesObject.coreDiskCount = valueInstancesInstance["CoreDiskCount"].asString();
auto allTagsNode = allInstancesNode["Tags"]["Tag"];
for (auto allInstancesNodeTagsTag : allTagsNode)
{