由鸿逸发起的HSM SDK自动发布, 版本号:1.7.1
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
93
hsm/src/model/ConfigNetworkRequest.cc
Normal file
93
hsm/src/model/ConfigNetworkRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/hsm/model/ConfigNetworkRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::ConfigNetworkRequest;
|
||||
|
||||
ConfigNetworkRequest::ConfigNetworkRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "ConfigNetwork")
|
||||
{}
|
||||
|
||||
ConfigNetworkRequest::~ConfigNetworkRequest()
|
||||
{}
|
||||
|
||||
std::string ConfigNetworkRequest::getVSwitchId()const
|
||||
{
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
void ConfigNetworkRequest::setVSwitchId(const std::string& vSwitchId)
|
||||
{
|
||||
vSwitchId_ = vSwitchId;
|
||||
setParameter("VSwitchId", vSwitchId);
|
||||
}
|
||||
|
||||
long ConfigNetworkRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ConfigNetworkRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ConfigNetworkRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ConfigNetworkRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ConfigNetworkRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ConfigNetworkRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string ConfigNetworkRequest::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void ConfigNetworkRequest::setVpcId(const std::string& vpcId)
|
||||
{
|
||||
vpcId_ = vpcId;
|
||||
setParameter("VpcId", vpcId);
|
||||
}
|
||||
|
||||
std::string ConfigNetworkRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void ConfigNetworkRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
45
hsm/src/model/ConfigNetworkResult.cc
Normal file
45
hsm/src/model/ConfigNetworkResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/hsm/model/ConfigNetworkResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
ConfigNetworkResult::ConfigNetworkResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ConfigNetworkResult::ConfigNetworkResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ConfigNetworkResult::~ConfigNetworkResult()
|
||||
{}
|
||||
|
||||
void ConfigNetworkResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
71
hsm/src/model/ConfigWhiteListRequest.cc
Normal file
71
hsm/src/model/ConfigWhiteListRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/hsm/model/ConfigWhiteListRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::ConfigWhiteListRequest;
|
||||
|
||||
ConfigWhiteListRequest::ConfigWhiteListRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "ConfigWhiteList")
|
||||
{}
|
||||
|
||||
ConfigWhiteListRequest::~ConfigWhiteListRequest()
|
||||
{}
|
||||
|
||||
long ConfigWhiteListRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ConfigWhiteListRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ConfigWhiteListRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ConfigWhiteListRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ConfigWhiteListRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ConfigWhiteListRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string ConfigWhiteListRequest::getWhiteList()const
|
||||
{
|
||||
return whiteList_;
|
||||
}
|
||||
|
||||
void ConfigWhiteListRequest::setWhiteList(const std::string& whiteList)
|
||||
{
|
||||
whiteList_ = whiteList;
|
||||
setParameter("WhiteList", whiteList);
|
||||
}
|
||||
|
||||
45
hsm/src/model/ConfigWhiteListResult.cc
Normal file
45
hsm/src/model/ConfigWhiteListResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/hsm/model/ConfigWhiteListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
ConfigWhiteListResult::ConfigWhiteListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ConfigWhiteListResult::ConfigWhiteListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ConfigWhiteListResult::~ConfigWhiteListResult()
|
||||
{}
|
||||
|
||||
void ConfigWhiteListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
115
hsm/src/model/CreateInstanceRequest.cc
Normal file
115
hsm/src/model/CreateInstanceRequest.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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/hsm/model/CreateInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::CreateInstanceRequest;
|
||||
|
||||
CreateInstanceRequest::CreateInstanceRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "CreateInstance")
|
||||
{}
|
||||
|
||||
CreateInstanceRequest::~CreateInstanceRequest()
|
||||
{}
|
||||
|
||||
int CreateInstanceRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setPeriod(int period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getPeriodUnit()const
|
||||
{
|
||||
return periodUnit_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setPeriodUnit(const std::string& periodUnit)
|
||||
{
|
||||
periodUnit_ = periodUnit;
|
||||
setParameter("PeriodUnit", periodUnit);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setResourceOwnerId(const std::string& resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", resourceOwnerId);
|
||||
}
|
||||
|
||||
int CreateInstanceRequest::getQuantity()const
|
||||
{
|
||||
return quantity_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setQuantity(int quantity)
|
||||
{
|
||||
quantity_ = quantity;
|
||||
setParameter("Quantity", std::to_string(quantity));
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getHsmDeviceType()const
|
||||
{
|
||||
return hsmDeviceType_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setHsmDeviceType(const std::string& hsmDeviceType)
|
||||
{
|
||||
hsmDeviceType_ = hsmDeviceType;
|
||||
setParameter("HsmDeviceType", hsmDeviceType);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getZoneId()const
|
||||
{
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setZoneId(const std::string& zoneId)
|
||||
{
|
||||
zoneId_ = zoneId;
|
||||
setParameter("ZoneId", zoneId);
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getHsmOem()const
|
||||
{
|
||||
return hsmOem_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setHsmOem(const std::string& hsmOem)
|
||||
{
|
||||
hsmOem_ = hsmOem;
|
||||
setParameter("HsmOem", hsmOem);
|
||||
}
|
||||
|
||||
53
hsm/src/model/CreateInstanceResult.cc
Normal file
53
hsm/src/model/CreateInstanceResult.cc
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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/hsm/model/CreateInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
CreateInstanceResult::CreateInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateInstanceResult::CreateInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateInstanceResult::~CreateInstanceResult()
|
||||
{}
|
||||
|
||||
void CreateInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allInstanceIds = value["InstanceIds"]["InstanceId"];
|
||||
for (const auto &item : allInstanceIds)
|
||||
instanceIds_.push_back(item.asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<std::string> CreateInstanceResult::getInstanceIds()const
|
||||
{
|
||||
return instanceIds_;
|
||||
}
|
||||
|
||||
93
hsm/src/model/DescribeInstancesRequest.cc
Normal file
93
hsm/src/model/DescribeInstancesRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/hsm/model/DescribeInstancesRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::DescribeInstancesRequest;
|
||||
|
||||
DescribeInstancesRequest::DescribeInstancesRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "DescribeInstances")
|
||||
{}
|
||||
|
||||
DescribeInstancesRequest::~DescribeInstancesRequest()
|
||||
{}
|
||||
|
||||
long DescribeInstancesRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeInstancesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DescribeInstancesRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeInstancesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int DescribeInstancesRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
int DescribeInstancesRequest::getHsmStatus()const
|
||||
{
|
||||
return hsmStatus_;
|
||||
}
|
||||
|
||||
void DescribeInstancesRequest::setHsmStatus(int hsmStatus)
|
||||
{
|
||||
hsmStatus_ = hsmStatus;
|
||||
setParameter("HsmStatus", std::to_string(hsmStatus));
|
||||
}
|
||||
|
||||
90
hsm/src/model/DescribeInstancesResult.cc
Normal file
90
hsm/src/model/DescribeInstancesResult.cc
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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/hsm/model/DescribeInstancesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
DescribeInstancesResult::DescribeInstancesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeInstancesResult::DescribeInstancesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeInstancesResult::~DescribeInstancesResult()
|
||||
{}
|
||||
|
||||
void DescribeInstancesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allInstances = value["Instances"]["Instance"];
|
||||
for (auto value : allInstances)
|
||||
{
|
||||
Instance instancesObject;
|
||||
if(!value["InstanceId"].isNull())
|
||||
instancesObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["RegionId"].isNull())
|
||||
instancesObject.regionId = value["RegionId"].asString();
|
||||
if(!value["ZoneId"].isNull())
|
||||
instancesObject.zoneId = value["ZoneId"].asString();
|
||||
if(!value["HsmStatus"].isNull())
|
||||
instancesObject.hsmStatus = std::stoi(value["HsmStatus"].asString());
|
||||
if(!value["HsmOem"].isNull())
|
||||
instancesObject.hsmOem = value["HsmOem"].asString();
|
||||
if(!value["HsmDeviceType"].isNull())
|
||||
instancesObject.hsmDeviceType = value["HsmDeviceType"].asString();
|
||||
if(!value["VpcId"].isNull())
|
||||
instancesObject.vpcId = value["VpcId"].asString();
|
||||
if(!value["VswitchId"].isNull())
|
||||
instancesObject.vswitchId = value["VswitchId"].asString();
|
||||
if(!value["Ip"].isNull())
|
||||
instancesObject.ip = value["Ip"].asString();
|
||||
if(!value["Remark"].isNull())
|
||||
instancesObject.remark = value["Remark"].asString();
|
||||
if(!value["ExpiredTime"].isNull())
|
||||
instancesObject.expiredTime = std::stol(value["ExpiredTime"].asString());
|
||||
if(!value["CreateTime"].isNull())
|
||||
instancesObject.createTime = std::stol(value["CreateTime"].asString());
|
||||
auto allWhiteList = value["WhiteList"]["WhiteListItem"];
|
||||
for (auto value : allWhiteList)
|
||||
instancesObject.whiteList.push_back(value.asString());
|
||||
instances_.push_back(instancesObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeInstancesResult::Instance> DescribeInstancesResult::getInstances()const
|
||||
{
|
||||
return instances_;
|
||||
}
|
||||
|
||||
int DescribeInstancesResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
49
hsm/src/model/DescribeRegionsRequest.cc
Normal file
49
hsm/src/model/DescribeRegionsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/hsm/model/DescribeRegionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::DescribeRegionsRequest;
|
||||
|
||||
DescribeRegionsRequest::DescribeRegionsRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "DescribeRegions")
|
||||
{}
|
||||
|
||||
DescribeRegionsRequest::~DescribeRegionsRequest()
|
||||
{}
|
||||
|
||||
long DescribeRegionsRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeRegionsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeRegionsRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeRegionsRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
66
hsm/src/model/DescribeRegionsResult.cc
Normal file
66
hsm/src/model/DescribeRegionsResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/hsm/model/DescribeRegionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRegionsResult::~DescribeRegionsResult()
|
||||
{}
|
||||
|
||||
void DescribeRegionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRegions = value["Regions"]["Region"];
|
||||
for (auto value : allRegions)
|
||||
{
|
||||
Region regionsObject;
|
||||
if(!value["RegionId"].isNull())
|
||||
regionsObject.regionId = value["RegionId"].asString();
|
||||
auto allZones = value["Zones"]["Zone"];
|
||||
for (auto value : allZones)
|
||||
{
|
||||
Region::Zone zonesObject;
|
||||
if(!value["ZoneId"].isNull())
|
||||
zonesObject.zoneId = value["ZoneId"].asString();
|
||||
regionsObject.zones.push_back(zonesObject);
|
||||
}
|
||||
regions_.push_back(regionsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeRegionsResult::Region> DescribeRegionsResult::getRegions()const
|
||||
{
|
||||
return regions_;
|
||||
}
|
||||
|
||||
71
hsm/src/model/ModifyInstanceRequest.cc
Normal file
71
hsm/src/model/ModifyInstanceRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/hsm/model/ModifyInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::ModifyInstanceRequest;
|
||||
|
||||
ModifyInstanceRequest::ModifyInstanceRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "ModifyInstance")
|
||||
{}
|
||||
|
||||
ModifyInstanceRequest::~ModifyInstanceRequest()
|
||||
{}
|
||||
|
||||
long ModifyInstanceRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyInstanceRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ModifyInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ModifyInstanceRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void ModifyInstanceRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
45
hsm/src/model/ModifyInstanceResult.cc
Normal file
45
hsm/src/model/ModifyInstanceResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/hsm/model/ModifyInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
ModifyInstanceResult::ModifyInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyInstanceResult::ModifyInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyInstanceResult::~ModifyInstanceResult()
|
||||
{}
|
||||
|
||||
void ModifyInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
49
hsm/src/model/ReleaseInstanceRequest.cc
Normal file
49
hsm/src/model/ReleaseInstanceRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/hsm/model/ReleaseInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::ReleaseInstanceRequest;
|
||||
|
||||
ReleaseInstanceRequest::ReleaseInstanceRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "ReleaseInstance")
|
||||
{}
|
||||
|
||||
ReleaseInstanceRequest::~ReleaseInstanceRequest()
|
||||
{}
|
||||
|
||||
std::string ReleaseInstanceRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ReleaseInstanceRequest::setResourceOwnerId(const std::string& resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", resourceOwnerId);
|
||||
}
|
||||
|
||||
std::string ReleaseInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ReleaseInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
45
hsm/src/model/ReleaseInstanceResult.cc
Normal file
45
hsm/src/model/ReleaseInstanceResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/hsm/model/ReleaseInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
ReleaseInstanceResult::ReleaseInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReleaseInstanceResult::ReleaseInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReleaseInstanceResult::~ReleaseInstanceResult()
|
||||
{}
|
||||
|
||||
void ReleaseInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
82
hsm/src/model/RenewInstanceRequest.cc
Normal file
82
hsm/src/model/RenewInstanceRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/hsm/model/RenewInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Hsm::Model::RenewInstanceRequest;
|
||||
|
||||
RenewInstanceRequest::RenewInstanceRequest() :
|
||||
RpcServiceRequest("hsm", "2018-01-11", "RenewInstance")
|
||||
{}
|
||||
|
||||
RenewInstanceRequest::~RenewInstanceRequest()
|
||||
{}
|
||||
|
||||
int RenewInstanceRequest::getPeriod()const
|
||||
{
|
||||
return period_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setPeriod(int period)
|
||||
{
|
||||
period_ = period;
|
||||
setParameter("Period", std::to_string(period));
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getPeriodUnit()const
|
||||
{
|
||||
return periodUnit_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setPeriodUnit(const std::string& periodUnit)
|
||||
{
|
||||
periodUnit_ = periodUnit;
|
||||
setParameter("PeriodUnit", periodUnit);
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setResourceOwnerId(const std::string& resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", resourceOwnerId);
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
45
hsm/src/model/RenewInstanceResult.cc
Normal file
45
hsm/src/model/RenewInstanceResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/hsm/model/RenewInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Hsm;
|
||||
using namespace AlibabaCloud::Hsm::Model;
|
||||
|
||||
RenewInstanceResult::RenewInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RenewInstanceResult::RenewInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RenewInstanceResult::~RenewInstanceResult()
|
||||
{}
|
||||
|
||||
void RenewInstanceResult::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