Describe describeAvailableResource.
This commit is contained in:
62
hbase/src/model/DescribeDeletedInstancesRequest.cc
Normal file
62
hbase/src/model/DescribeDeletedInstancesRequest.cc
Normal 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/hbase/model/DescribeDeletedInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::DescribeDeletedInstancesRequest;
|
||||
|
||||
DescribeDeletedInstancesRequest::DescribeDeletedInstancesRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "DescribeDeletedInstances")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeDeletedInstancesRequest::~DescribeDeletedInstancesRequest()
|
||||
{}
|
||||
|
||||
int DescribeDeletedInstancesRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void DescribeDeletedInstancesRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeDeletedInstancesRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeDeletedInstancesRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
int DescribeDeletedInstancesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeDeletedInstancesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
100
hbase/src/model/DescribeDeletedInstancesResult.cc
Normal file
100
hbase/src/model/DescribeDeletedInstancesResult.cc
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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/DescribeDeletedInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
DescribeDeletedInstancesResult::DescribeDeletedInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDeletedInstancesResult::DescribeDeletedInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDeletedInstancesResult::~DescribeDeletedInstancesResult()
|
||||
{}
|
||||
|
||||
void DescribeDeletedInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allInstancesNode = value["Instances"]["Instance"];
|
||||
for (auto valueInstancesInstance : allInstancesNode)
|
||||
{
|
||||
Instance instancesObject;
|
||||
if(!valueInstancesInstance["InstanceId"].isNull())
|
||||
instancesObject.instanceId = valueInstancesInstance["InstanceId"].asString();
|
||||
if(!valueInstancesInstance["InstanceName"].isNull())
|
||||
instancesObject.instanceName = valueInstancesInstance["InstanceName"].asString();
|
||||
if(!valueInstancesInstance["Status"].isNull())
|
||||
instancesObject.status = valueInstancesInstance["Status"].asString();
|
||||
if(!valueInstancesInstance["MajorVersion"].isNull())
|
||||
instancesObject.majorVersion = valueInstancesInstance["MajorVersion"].asString();
|
||||
if(!valueInstancesInstance["Engine"].isNull())
|
||||
instancesObject.engine = valueInstancesInstance["Engine"].asString();
|
||||
if(!valueInstancesInstance["RegionId"].isNull())
|
||||
instancesObject.regionId = valueInstancesInstance["RegionId"].asString();
|
||||
if(!valueInstancesInstance["ZoneId"].isNull())
|
||||
instancesObject.zoneId = valueInstancesInstance["ZoneId"].asString();
|
||||
if(!valueInstancesInstance["CreatedTime"].isNull())
|
||||
instancesObject.createdTime = valueInstancesInstance["CreatedTime"].asString();
|
||||
if(!valueInstancesInstance["DeleteTime"].isNull())
|
||||
instancesObject.deleteTime = valueInstancesInstance["DeleteTime"].asString();
|
||||
if(!valueInstancesInstance["ClusterType"].isNull())
|
||||
instancesObject.clusterType = valueInstancesInstance["ClusterType"].asString();
|
||||
if(!valueInstancesInstance["ModuleStackVersion"].isNull())
|
||||
instancesObject.moduleStackVersion = valueInstancesInstance["ModuleStackVersion"].asString();
|
||||
if(!valueInstancesInstance["ParentId"].isNull())
|
||||
instancesObject.parentId = valueInstancesInstance["ParentId"].asString();
|
||||
instances_.push_back(instancesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeDeletedInstancesResult::Instance> DescribeDeletedInstancesResult::getInstances()const
|
||||
{
|
||||
return instances_;
|
||||
}
|
||||
|
||||
long DescribeDeletedInstancesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeDeletedInstancesResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeDeletedInstancesResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
@@ -127,6 +127,10 @@ void DescribeInstanceResult::parse(const std::string &payload)
|
||||
moduleId_ = std::stoi(value["ModuleId"].asString());
|
||||
if(!value["ModuleStackVersion"].isNull())
|
||||
moduleStackVersion_ = value["ModuleStackVersion"].asString();
|
||||
if(!value["AutoRenewal"].isNull())
|
||||
autoRenewal_ = value["AutoRenewal"].asString() == "true";
|
||||
if(!value["Duration"].isNull())
|
||||
duration_ = std::stoi(value["Duration"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -270,6 +274,11 @@ std::string DescribeInstanceResult::getCreatedTimeUTC()const
|
||||
return createdTimeUTC_;
|
||||
}
|
||||
|
||||
int DescribeInstanceResult::getDuration()const
|
||||
{
|
||||
return duration_;
|
||||
}
|
||||
|
||||
std::string DescribeInstanceResult::getPayType()const
|
||||
{
|
||||
return payType_;
|
||||
@@ -305,6 +314,11 @@ std::string DescribeInstanceResult::getVpcId()const
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
bool DescribeInstanceResult::getAutoRenewal()const
|
||||
{
|
||||
return autoRenewal_;
|
||||
}
|
||||
|
||||
std::string DescribeInstanceResult::getCoreDiskType()const
|
||||
{
|
||||
return coreDiskType_;
|
||||
|
||||
@@ -111,6 +111,10 @@ void DescribeInstancesResult::parse(const std::string &payload)
|
||||
instancesObject.moduleStackVersion = valueInstancesInstance["ModuleStackVersion"].asString();
|
||||
if(!valueInstancesInstance["CoreDiskCount"].isNull())
|
||||
instancesObject.coreDiskCount = valueInstancesInstance["CoreDiskCount"].asString();
|
||||
if(!valueInstancesInstance["AutoRenewal"].isNull())
|
||||
instancesObject.autoRenewal = valueInstancesInstance["AutoRenewal"].asString() == "true";
|
||||
if(!valueInstancesInstance["Duration"].isNull())
|
||||
instancesObject.duration = std::stoi(valueInstancesInstance["Duration"].asString());
|
||||
auto allTagsNode = allInstancesNode["Tags"]["Tag"];
|
||||
for (auto allInstancesNodeTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
40
hbase/src/model/PurgeInstanceRequest.cc
Normal file
40
hbase/src/model/PurgeInstanceRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/PurgeInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::HBase::Model::PurgeInstanceRequest;
|
||||
|
||||
PurgeInstanceRequest::PurgeInstanceRequest() :
|
||||
RpcServiceRequest("hbase", "2019-01-01", "PurgeInstance")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
PurgeInstanceRequest::~PurgeInstanceRequest()
|
||||
{}
|
||||
|
||||
std::string PurgeInstanceRequest::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void PurgeInstanceRequest::setClusterId(const std::string& clusterId)
|
||||
{
|
||||
clusterId_ = clusterId;
|
||||
setParameter("ClusterId", clusterId);
|
||||
}
|
||||
|
||||
44
hbase/src/model/PurgeInstanceResult.cc
Normal file
44
hbase/src/model/PurgeInstanceResult.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/hbase/model/PurgeInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::HBase;
|
||||
using namespace AlibabaCloud::HBase::Model;
|
||||
|
||||
PurgeInstanceResult::PurgeInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
PurgeInstanceResult::PurgeInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
PurgeInstanceResult::~PurgeInstanceResult()
|
||||
{}
|
||||
|
||||
void PurgeInstanceResult::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