Support ResourceGroup.
This commit is contained in:
72
eais/src/model/ChangeResourceGroupRequest.cc
Normal file
72
eais/src/model/ChangeResourceGroupRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/eais/model/ChangeResourceGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::ChangeResourceGroupRequest;
|
||||
|
||||
ChangeResourceGroupRequest::ChangeResourceGroupRequest()
|
||||
: RpcServiceRequest("eais", "2019-06-24", "ChangeResourceGroup") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ChangeResourceGroupRequest::~ChangeResourceGroupRequest() {}
|
||||
|
||||
std::string ChangeResourceGroupRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void ChangeResourceGroupRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string ChangeResourceGroupRequest::getResourceRegionId() const {
|
||||
return resourceRegionId_;
|
||||
}
|
||||
|
||||
void ChangeResourceGroupRequest::setResourceRegionId(const std::string &resourceRegionId) {
|
||||
resourceRegionId_ = resourceRegionId;
|
||||
setParameter(std::string("ResourceRegionId"), resourceRegionId);
|
||||
}
|
||||
|
||||
std::string ChangeResourceGroupRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ChangeResourceGroupRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
std::string ChangeResourceGroupRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void ChangeResourceGroupRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string ChangeResourceGroupRequest::getService() const {
|
||||
return service_;
|
||||
}
|
||||
|
||||
void ChangeResourceGroupRequest::setService(const std::string &service) {
|
||||
service_ = service;
|
||||
setParameter(std::string("Service"), service);
|
||||
}
|
||||
|
||||
44
eais/src/model/ChangeResourceGroupResult.cc
Normal file
44
eais/src/model/ChangeResourceGroupResult.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/eais/model/ChangeResourceGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
ChangeResourceGroupResult::ChangeResourceGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ChangeResourceGroupResult::ChangeResourceGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ChangeResourceGroupResult::~ChangeResourceGroupResult()
|
||||
{}
|
||||
|
||||
void ChangeResourceGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,15 @@ void CreateEaiAllRequest::setClientToken(const std::string &clientToken) {
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiAllRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateEaiAllRequest::getClientInstanceName() const {
|
||||
return clientInstanceName_;
|
||||
}
|
||||
|
||||
107
eais/src/model/CreateEaiEciRequest.cc
Normal file
107
eais/src/model/CreateEaiEciRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/eais/model/CreateEaiEciRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::CreateEaiEciRequest;
|
||||
|
||||
CreateEaiEciRequest::CreateEaiEciRequest()
|
||||
: RpcServiceRequest("eais", "2019-06-24", "CreateEaiEci") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateEaiEciRequest::~CreateEaiEciRequest() {}
|
||||
|
||||
std::string CreateEaiEciRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateEaiEciRequest::getSecurityGroupId() const {
|
||||
return securityGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setSecurityGroupId(const std::string &securityGroupId) {
|
||||
securityGroupId_ = securityGroupId;
|
||||
setParameter(std::string("SecurityGroupId"), securityGroupId);
|
||||
}
|
||||
|
||||
CreateEaiEciRequest::Eci CreateEaiEciRequest::getEci() const {
|
||||
return eci_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setEci(const CreateEaiEciRequest::Eci &eci) {
|
||||
eci_ = eci;
|
||||
setParameter(std::string("Eci") + ".Container.Image", eci.container.image);
|
||||
setParameter(std::string("Eci") + ".Container.Arg", eci.container.arg);
|
||||
setParameter(std::string("Eci") + ".Container.Name", eci.container.name);
|
||||
setParameter(std::string("Eci") + ".Container.Volumes", eci.container.volumes);
|
||||
setParameter(std::string("Eci") + ".Container.Command", eci.container.command);
|
||||
setParameter(std::string("Eci") + ".Volume", eci.volume);
|
||||
setParameter(std::string("Eci") + ".EipId", eci.eipId);
|
||||
setParameter(std::string("Eci") + ".Name", eci.name);
|
||||
setParameter(std::string("Eci") + ".Type", eci.type);
|
||||
}
|
||||
|
||||
std::string CreateEaiEciRequest::getEaisType() const {
|
||||
return eaisType_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setEaisType(const std::string &eaisType) {
|
||||
eaisType_ = eaisType;
|
||||
setParameter(std::string("EaisType"), eaisType);
|
||||
}
|
||||
|
||||
std::string CreateEaiEciRequest::getVSwitchId() const {
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setVSwitchId(const std::string &vSwitchId) {
|
||||
vSwitchId_ = vSwitchId;
|
||||
setParameter(std::string("VSwitchId"), vSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateEaiEciRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateEaiEciRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string CreateEaiEciRequest::getEaisName() const {
|
||||
return eaisName_;
|
||||
}
|
||||
|
||||
void CreateEaiEciRequest::setEaisName(const std::string &eaisName) {
|
||||
eaisName_ = eaisName;
|
||||
setParameter(std::string("EaisName"), eaisName);
|
||||
}
|
||||
|
||||
58
eais/src/model/CreateEaiEciResult.cc
Normal file
58
eais/src/model/CreateEaiEciResult.cc
Normal 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/eais/model/CreateEaiEciResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
CreateEaiEciResult::CreateEaiEciResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateEaiEciResult::CreateEaiEciResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateEaiEciResult::~CreateEaiEciResult()
|
||||
{}
|
||||
|
||||
void CreateEaiEciResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ElasticAcceleratedInstanceId"].isNull())
|
||||
elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString();
|
||||
if(!value["ClientInstanceId"].isNull())
|
||||
clientInstanceId_ = value["ClientInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateEaiEciResult::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
std::string CreateEaiEciResult::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
107
eais/src/model/CreateEaiEcsRequest.cc
Normal file
107
eais/src/model/CreateEaiEcsRequest.cc
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* 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/eais/model/CreateEaiEcsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::CreateEaiEcsRequest;
|
||||
|
||||
CreateEaiEcsRequest::CreateEaiEcsRequest()
|
||||
: RpcServiceRequest("eais", "2019-06-24", "CreateEaiEcs") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateEaiEcsRequest::~CreateEaiEcsRequest() {}
|
||||
|
||||
std::string CreateEaiEcsRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsRequest::getSecurityGroupId() const {
|
||||
return securityGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setSecurityGroupId(const std::string &securityGroupId) {
|
||||
securityGroupId_ = securityGroupId;
|
||||
setParameter(std::string("SecurityGroupId"), securityGroupId);
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsRequest::getEaisType() const {
|
||||
return eaisType_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setEaisType(const std::string &eaisType) {
|
||||
eaisType_ = eaisType;
|
||||
setParameter(std::string("EaisType"), eaisType);
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsRequest::getVSwitchId() const {
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setVSwitchId(const std::string &vSwitchId) {
|
||||
vSwitchId_ = vSwitchId;
|
||||
setParameter(std::string("VSwitchId"), vSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
CreateEaiEcsRequest::Ecs CreateEaiEcsRequest::getEcs() const {
|
||||
return ecs_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setEcs(const CreateEaiEcsRequest::Ecs &ecs) {
|
||||
ecs_ = ecs;
|
||||
setParameter(std::string("Ecs") + ".Password", ecs.password);
|
||||
setParameter(std::string("Ecs") + ".ImageId", ecs.imageId);
|
||||
setParameter(std::string("Ecs") + ".SystemDiskCategory", ecs.systemDiskCategory);
|
||||
setParameter(std::string("Ecs") + ".InternetMaxBandwidthOut", ecs.internetMaxBandwidthOut);
|
||||
setParameter(std::string("Ecs") + ".Name", ecs.name);
|
||||
setParameter(std::string("Ecs") + ".SystemDiskSize", std::to_string(ecs.systemDiskSize));
|
||||
setParameter(std::string("Ecs") + ".ZoneId", ecs.zoneId);
|
||||
setParameter(std::string("Ecs") + ".Type", ecs.type);
|
||||
setParameter(std::string("Ecs") + ".InternetMaxBandwidthIn", ecs.internetMaxBandwidthIn);
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsRequest::getEaisName() const {
|
||||
return eaisName_;
|
||||
}
|
||||
|
||||
void CreateEaiEcsRequest::setEaisName(const std::string &eaisName) {
|
||||
eaisName_ = eaisName;
|
||||
setParameter(std::string("EaisName"), eaisName);
|
||||
}
|
||||
|
||||
58
eais/src/model/CreateEaiEcsResult.cc
Normal file
58
eais/src/model/CreateEaiEcsResult.cc
Normal 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/eais/model/CreateEaiEcsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
CreateEaiEcsResult::CreateEaiEcsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateEaiEcsResult::CreateEaiEcsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateEaiEcsResult::~CreateEaiEcsResult()
|
||||
{}
|
||||
|
||||
void CreateEaiEcsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ElasticAcceleratedInstanceId"].isNull())
|
||||
elasticAcceleratedInstanceId_ = value["ElasticAcceleratedInstanceId"].asString();
|
||||
if(!value["ClientInstanceId"].isNull())
|
||||
clientInstanceId_ = value["ClientInstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsResult::getClientInstanceId()const
|
||||
{
|
||||
return clientInstanceId_;
|
||||
}
|
||||
|
||||
std::string CreateEaiEcsResult::getElasticAcceleratedInstanceId()const
|
||||
{
|
||||
return elasticAcceleratedInstanceId_;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,15 @@ void CreateEaiJupyterRequest::setVSwitchId(const std::string &vSwitchId) {
|
||||
setParameter(std::string("VSwitchId"), vSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateEaiJupyterRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiJupyterRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateEaiJupyterRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,15 @@ void CreateEaiRequest::setVSwitchId(const std::string &vSwitchId) {
|
||||
setParameter(std::string("VSwitchId"), vSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateEaiRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateEaiRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateEaiRequest::getInstanceName() const {
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,15 @@ void DescribeEaisRequest::setPageNumber(int pageNumber) {
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeEaisRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void DescribeEaisRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string DescribeEaisRequest::getInstanceName() const {
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ void DescribeEaisResult::parse(const std::string &payload)
|
||||
instancesObject.securityGroupId = valueInstancesInstance["SecurityGroupId"].asString();
|
||||
if(!valueInstancesInstance["StartTime"].isNull())
|
||||
instancesObject.startTime = valueInstancesInstance["StartTime"].asString();
|
||||
if(!valueInstancesInstance["ResourceGroupId"].isNull())
|
||||
instancesObject.resourceGroupId = valueInstancesInstance["ResourceGroupId"].asString();
|
||||
auto allTagsNode = valueInstancesInstance["Tags"]["Tag"];
|
||||
for (auto valueInstancesInstanceTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
72
eais/src/model/GetInstanceMetricsRequest.cc
Normal file
72
eais/src/model/GetInstanceMetricsRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/eais/model/GetInstanceMetricsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eais::Model::GetInstanceMetricsRequest;
|
||||
|
||||
GetInstanceMetricsRequest::GetInstanceMetricsRequest()
|
||||
: RpcServiceRequest("eais", "2019-06-24", "GetInstanceMetrics") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetInstanceMetricsRequest::~GetInstanceMetricsRequest() {}
|
||||
|
||||
std::string GetInstanceMetricsRequest::getMetricType() const {
|
||||
return metricType_;
|
||||
}
|
||||
|
||||
void GetInstanceMetricsRequest::setMetricType(const std::string &metricType) {
|
||||
metricType_ = metricType;
|
||||
setParameter(std::string("MetricType"), metricType);
|
||||
}
|
||||
|
||||
std::string GetInstanceMetricsRequest::getTimeStep() const {
|
||||
return timeStep_;
|
||||
}
|
||||
|
||||
void GetInstanceMetricsRequest::setTimeStep(const std::string &timeStep) {
|
||||
timeStep_ = timeStep;
|
||||
setParameter(std::string("TimeStep"), timeStep);
|
||||
}
|
||||
|
||||
std::string GetInstanceMetricsRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetInstanceMetricsRequest::setEndTime(const std::string &endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), endTime);
|
||||
}
|
||||
|
||||
std::string GetInstanceMetricsRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetInstanceMetricsRequest::setStartTime(const std::string &startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), startTime);
|
||||
}
|
||||
|
||||
std::string GetInstanceMetricsRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetInstanceMetricsRequest::setInstanceId(const std::string &instanceId) {
|
||||
instanceId_ = instanceId;
|
||||
setParameter(std::string("InstanceId"), instanceId);
|
||||
}
|
||||
|
||||
74
eais/src/model/GetInstanceMetricsResult.cc
Normal file
74
eais/src/model/GetInstanceMetricsResult.cc
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* 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/eais/model/GetInstanceMetricsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eais;
|
||||
using namespace AlibabaCloud::Eais::Model;
|
||||
|
||||
GetInstanceMetricsResult::GetInstanceMetricsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetInstanceMetricsResult::GetInstanceMetricsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetInstanceMetricsResult::~GetInstanceMetricsResult()
|
||||
{}
|
||||
|
||||
void GetInstanceMetricsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPodMetricsNode = value["PodMetrics"]["PodMetric"];
|
||||
for (auto valuePodMetricsPodMetric : allPodMetricsNode)
|
||||
{
|
||||
PodMetric podMetricsObject;
|
||||
if(!valuePodMetricsPodMetric["PodId"].isNull())
|
||||
podMetricsObject.podId = valuePodMetricsPodMetric["PodId"].asString();
|
||||
auto allMetricsNode = valuePodMetricsPodMetric["Metrics"]["Metric"];
|
||||
for (auto valuePodMetricsPodMetricMetricsMetric : allMetricsNode)
|
||||
{
|
||||
PodMetric::Metric metricsObject;
|
||||
if(!valuePodMetricsPodMetricMetricsMetric["Time"].isNull())
|
||||
metricsObject.time = valuePodMetricsPodMetricMetricsMetric["Time"].asString();
|
||||
if(!valuePodMetricsPodMetricMetricsMetric["Value"].isNull())
|
||||
metricsObject.value = valuePodMetricsPodMetricMetricsMetric["Value"].asString();
|
||||
podMetricsObject.metrics.push_back(metricsObject);
|
||||
}
|
||||
podMetrics_.push_back(podMetricsObject);
|
||||
}
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetInstanceMetricsResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
std::vector<GetInstanceMetricsResult::PodMetric> GetInstanceMetricsResult::getPodMetrics()const
|
||||
{
|
||||
return podMetrics_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user