Supported Eni Trunking.
This commit is contained in:
@@ -4947,6 +4947,42 @@ EcsClient::DescribeNatGatewaysOutcomeCallable EcsClient::describeNatGatewaysCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EcsClient::DescribeNetworkInterfaceAttributeOutcome EcsClient::describeNetworkInterfaceAttribute(const DescribeNetworkInterfaceAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeNetworkInterfaceAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeNetworkInterfaceAttributeOutcome(DescribeNetworkInterfaceAttributeResult(outcome.result()));
|
||||
else
|
||||
return DescribeNetworkInterfaceAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EcsClient::describeNetworkInterfaceAttributeAsync(const DescribeNetworkInterfaceAttributeRequest& request, const DescribeNetworkInterfaceAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeNetworkInterfaceAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EcsClient::DescribeNetworkInterfaceAttributeOutcomeCallable EcsClient::describeNetworkInterfaceAttributeCallable(const DescribeNetworkInterfaceAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeNetworkInterfaceAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeNetworkInterfaceAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EcsClient::DescribeNetworkInterfacePermissionsOutcome EcsClient::describeNetworkInterfacePermissions(const DescribeNetworkInterfacePermissionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -49,6 +49,17 @@ void AttachNetworkInterfaceRequest::setRegionId(const std::string& regionId)
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string AttachNetworkInterfaceRequest::getTrunkNetworkInstanceId()const
|
||||
{
|
||||
return trunkNetworkInstanceId_;
|
||||
}
|
||||
|
||||
void AttachNetworkInterfaceRequest::setTrunkNetworkInstanceId(const std::string& trunkNetworkInstanceId)
|
||||
{
|
||||
trunkNetworkInstanceId_ = trunkNetworkInstanceId;
|
||||
setParameter("TrunkNetworkInstanceId", trunkNetworkInstanceId);
|
||||
}
|
||||
|
||||
std::string AttachNetworkInterfaceRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
|
||||
@@ -38,6 +38,17 @@ void CreateAutoSnapshotPolicyRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
int CreateAutoSnapshotPolicyRequest::getCopiedSnapshotsRetentionDays()const
|
||||
{
|
||||
return copiedSnapshotsRetentionDays_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setCopiedSnapshotsRetentionDays(int copiedSnapshotsRetentionDays)
|
||||
{
|
||||
copiedSnapshotsRetentionDays_ = copiedSnapshotsRetentionDays;
|
||||
setParameter("CopiedSnapshotsRetentionDays", std::to_string(copiedSnapshotsRetentionDays));
|
||||
}
|
||||
|
||||
std::string CreateAutoSnapshotPolicyRequest::getTimePoints()const
|
||||
{
|
||||
return timePoints_;
|
||||
@@ -87,6 +98,17 @@ void CreateAutoSnapshotPolicyRequest::setTag(const std::vector<Tag>& tag)
|
||||
}
|
||||
}
|
||||
|
||||
bool CreateAutoSnapshotPolicyRequest::getEnableCrossRegionCopy()const
|
||||
{
|
||||
return enableCrossRegionCopy_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setEnableCrossRegionCopy(bool enableCrossRegionCopy)
|
||||
{
|
||||
enableCrossRegionCopy_ = enableCrossRegionCopy;
|
||||
setParameter("EnableCrossRegionCopy", enableCrossRegionCopy ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateAutoSnapshotPolicyRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
@@ -131,3 +153,14 @@ void CreateAutoSnapshotPolicyRequest::setRetentionDays(int retentionDays)
|
||||
setParameter("RetentionDays", std::to_string(retentionDays));
|
||||
}
|
||||
|
||||
std::string CreateAutoSnapshotPolicyRequest::getTargetCopyRegions()const
|
||||
{
|
||||
return targetCopyRegions_;
|
||||
}
|
||||
|
||||
void CreateAutoSnapshotPolicyRequest::setTargetCopyRegions(const std::string& targetCopyRegions)
|
||||
{
|
||||
targetCopyRegions_ = targetCopyRegions;
|
||||
setParameter("TargetCopyRegions", targetCopyRegions);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,17 @@ void CreateNetworkInterfaceRequest::setRegionId(const std::string& regionId)
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string CreateNetworkInterfaceRequest::getInstanceType()const
|
||||
{
|
||||
return instanceType_;
|
||||
}
|
||||
|
||||
void CreateNetworkInterfaceRequest::setInstanceType(const std::string& instanceType)
|
||||
{
|
||||
instanceType_ = instanceType;
|
||||
setParameter("InstanceType", instanceType);
|
||||
}
|
||||
|
||||
std::vector<CreateNetworkInterfaceRequest::Tag> CreateNetworkInterfaceRequest::getTag()const
|
||||
{
|
||||
return tag_;
|
||||
|
||||
@@ -63,6 +63,12 @@ void DescribeAutoSnapshotPolicyExResult::parse(const std::string &payload)
|
||||
autoSnapshotPoliciesObject.creationTime = valueAutoSnapshotPoliciesAutoSnapshotPolicy["CreationTime"].asString();
|
||||
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicy["Status"].isNull())
|
||||
autoSnapshotPoliciesObject.status = valueAutoSnapshotPoliciesAutoSnapshotPolicy["Status"].asString();
|
||||
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicy["EnableCrossRegionCopy"].isNull())
|
||||
autoSnapshotPoliciesObject.enableCrossRegionCopy = valueAutoSnapshotPoliciesAutoSnapshotPolicy["EnableCrossRegionCopy"].asString() == "true";
|
||||
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicy["TargetCopyRegions"].isNull())
|
||||
autoSnapshotPoliciesObject.targetCopyRegions = valueAutoSnapshotPoliciesAutoSnapshotPolicy["TargetCopyRegions"].asString();
|
||||
if(!valueAutoSnapshotPoliciesAutoSnapshotPolicy["CopiedSnapshotsRetentionDays"].isNull())
|
||||
autoSnapshotPoliciesObject.copiedSnapshotsRetentionDays = std::stoi(valueAutoSnapshotPoliciesAutoSnapshotPolicy["CopiedSnapshotsRetentionDays"].asString());
|
||||
auto allTagsNode = allAutoSnapshotPoliciesNode["Tags"]["Tag"];
|
||||
for (auto allAutoSnapshotPoliciesNodeTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
@@ -59,6 +59,8 @@ void DescribeDisksFullStatusResult::parse(const std::string &payload)
|
||||
diskEventSetObject.eventTime = allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventTime"].asString();
|
||||
if(!allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventEndTime"].isNull())
|
||||
diskEventSetObject.eventEndTime = allDiskFullStatusSetNodeDiskEventSetDiskEventType["EventEndTime"].asString();
|
||||
if(!allDiskFullStatusSetNodeDiskEventSetDiskEventType["ImpactLevel"].isNull())
|
||||
diskEventSetObject.impactLevel = allDiskFullStatusSetNodeDiskEventSetDiskEventType["ImpactLevel"].asString();
|
||||
auto eventTypeNode = value["EventType"];
|
||||
if(!eventTypeNode["Code"].isNull())
|
||||
diskEventSetObject.eventType.code = std::stoi(eventTypeNode["Code"].asString());
|
||||
|
||||
@@ -73,6 +73,17 @@ void DescribeInstanceHistoryEventsRequest::setPageNumber(int pageNumber)
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string DescribeInstanceHistoryEventsRequest::getImpactLevel()const
|
||||
{
|
||||
return impactLevel_;
|
||||
}
|
||||
|
||||
void DescribeInstanceHistoryEventsRequest::setImpactLevel(const std::string& impactLevel)
|
||||
{
|
||||
impactLevel_ = impactLevel;
|
||||
setParameter("ImpactLevel", impactLevel);
|
||||
}
|
||||
|
||||
std::string DescribeInstanceHistoryEventsRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
|
||||
@@ -55,6 +55,8 @@ void DescribeInstanceHistoryEventsResult::parse(const std::string &payload)
|
||||
instanceSystemEventSetObject.eventFinishTime = valueInstanceSystemEventSetInstanceSystemEventType["EventFinishTime"].asString();
|
||||
if(!valueInstanceSystemEventSetInstanceSystemEventType["Reason"].isNull())
|
||||
instanceSystemEventSetObject.reason = valueInstanceSystemEventSetInstanceSystemEventType["Reason"].asString();
|
||||
if(!valueInstanceSystemEventSetInstanceSystemEventType["ImpactLevel"].isNull())
|
||||
instanceSystemEventSetObject.impactLevel = valueInstanceSystemEventSetInstanceSystemEventType["ImpactLevel"].asString();
|
||||
auto eventTypeNode = value["EventType"];
|
||||
if(!eventTypeNode["Code"].isNull())
|
||||
instanceSystemEventSetObject.eventType.code = std::stoi(eventTypeNode["Code"].asString());
|
||||
|
||||
@@ -83,6 +83,10 @@ void DescribeInstanceTypesResult::parse(const std::string &payload)
|
||||
instanceTypesObject.instanceFamilyLevel = valueInstanceTypesInstanceType["InstanceFamilyLevel"].asString();
|
||||
if(!valueInstanceTypesInstanceType["TotalEniQueueQuantity"].isNull())
|
||||
instanceTypesObject.totalEniQueueQuantity = std::stoi(valueInstanceTypesInstanceType["TotalEniQueueQuantity"].asString());
|
||||
if(!valueInstanceTypesInstanceType["EniTrunkSupported"].isNull())
|
||||
instanceTypesObject.eniTrunkSupported = valueInstanceTypesInstanceType["EniTrunkSupported"].asString() == "true";
|
||||
if(!valueInstanceTypesInstanceType["EniTotalQuantity"].isNull())
|
||||
instanceTypesObject.eniTotalQuantity = std::stoi(valueInstanceTypesInstanceType["EniTotalQuantity"].asString());
|
||||
instanceTypes_.push_back(instanceTypesObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ void DescribeInstancesFullStatusResult::parse(const std::string &payload)
|
||||
scheduledSystemEventSetObject.notBefore = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["NotBefore"].asString();
|
||||
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["Reason"].isNull())
|
||||
scheduledSystemEventSetObject.reason = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["Reason"].asString();
|
||||
if(!allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["ImpactLevel"].isNull())
|
||||
scheduledSystemEventSetObject.impactLevel = allInstanceFullStatusSetNodeScheduledSystemEventSetScheduledSystemEventType["ImpactLevel"].asString();
|
||||
auto eventCycleStatusNode = value["EventCycleStatus"];
|
||||
if(!eventCycleStatusNode["Code"].isNull())
|
||||
scheduledSystemEventSetObject.eventCycleStatus.code = std::stoi(eventCycleStatusNode["Code"].asString());
|
||||
|
||||
@@ -71,6 +71,17 @@ void DescribeInvocationResultsRequest::setRegionId(const std::string& regionId)
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DescribeInvocationResultsRequest::getContentEncoding()const
|
||||
{
|
||||
return contentEncoding_;
|
||||
}
|
||||
|
||||
void DescribeInvocationResultsRequest::setContentEncoding(const std::string& contentEncoding)
|
||||
{
|
||||
contentEncoding_ = contentEncoding;
|
||||
setParameter("ContentEncoding", contentEncoding);
|
||||
}
|
||||
|
||||
long DescribeInvocationResultsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
|
||||
@@ -58,14 +58,26 @@ void DescribeInvocationResultsResult::parse(const std::string &payload)
|
||||
invocationResultObject.instanceId = invocationNodeInvocationResultsInvocationResult["InstanceId"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["StartTime"].isNull())
|
||||
invocationResultObject.startTime = invocationNodeInvocationResultsInvocationResult["StartTime"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["StopTime"].isNull())
|
||||
invocationResultObject.stopTime = invocationNodeInvocationResultsInvocationResult["StopTime"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["FinishedTime"].isNull())
|
||||
invocationResultObject.finishedTime = invocationNodeInvocationResultsInvocationResult["FinishedTime"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["Repeats"].isNull())
|
||||
invocationResultObject.repeats = std::stoi(invocationNodeInvocationResultsInvocationResult["Repeats"].asString());
|
||||
if(!invocationNodeInvocationResultsInvocationResult["Output"].isNull())
|
||||
invocationResultObject.output = invocationNodeInvocationResultsInvocationResult["Output"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["Dropped"].isNull())
|
||||
invocationResultObject.dropped = std::stoi(invocationNodeInvocationResultsInvocationResult["Dropped"].asString());
|
||||
if(!invocationNodeInvocationResultsInvocationResult["InvokeRecordStatus"].isNull())
|
||||
invocationResultObject.invokeRecordStatus = invocationNodeInvocationResultsInvocationResult["InvokeRecordStatus"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["InvocationStatus"].isNull())
|
||||
invocationResultObject.invocationStatus = invocationNodeInvocationResultsInvocationResult["InvocationStatus"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["ExitCode"].isNull())
|
||||
invocationResultObject.exitCode = std::stol(invocationNodeInvocationResultsInvocationResult["ExitCode"].asString());
|
||||
if(!invocationNodeInvocationResultsInvocationResult["ErrorCode"].isNull())
|
||||
invocationResultObject.errorCode = invocationNodeInvocationResultsInvocationResult["ErrorCode"].asString();
|
||||
if(!invocationNodeInvocationResultsInvocationResult["ErrorInfo"].isNull())
|
||||
invocationResultObject.errorInfo = invocationNodeInvocationResultsInvocationResult["ErrorInfo"].asString();
|
||||
invocation_.invocationResults.push_back(invocationResultObject);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ void DescribeInvocationsResult::parse(const std::string &payload)
|
||||
invocationsObject.timed = valueInvocationsInvocation["Timed"].asString() == "true";
|
||||
if(!valueInvocationsInvocation["InvokeStatus"].isNull())
|
||||
invocationsObject.invokeStatus = valueInvocationsInvocation["InvokeStatus"].asString();
|
||||
if(!valueInvocationsInvocation["InvocationStatus"].isNull())
|
||||
invocationsObject.invocationStatus = valueInvocationsInvocation["InvocationStatus"].asString();
|
||||
if(!valueInvocationsInvocation["Parameters"].isNull())
|
||||
invocationsObject.parameters = valueInvocationsInvocation["Parameters"].asString();
|
||||
auto allInvokeInstancesNode = allInvocationsNode["InvokeInstances"]["InvokeInstance"];
|
||||
|
||||
122
ecs/src/model/DescribeNetworkInterfaceAttributeRequest.cc
Normal file
122
ecs/src/model/DescribeNetworkInterfaceAttributeRequest.cc
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* 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/ecs/model/DescribeNetworkInterfaceAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Ecs::Model::DescribeNetworkInterfaceAttributeRequest;
|
||||
|
||||
DescribeNetworkInterfaceAttributeRequest::DescribeNetworkInterfaceAttributeRequest() :
|
||||
RpcServiceRequest("ecs", "2014-05-26", "DescribeNetworkInterfaceAttribute")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeNetworkInterfaceAttributeRequest::~DescribeNetworkInterfaceAttributeRequest()
|
||||
{}
|
||||
|
||||
long DescribeNetworkInterfaceAttributeRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::vector<DescribeNetworkInterfaceAttributeRequest::Tag> DescribeNetworkInterfaceAttributeRequest::getTag()const
|
||||
{
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setTag(const std::vector<Tag>& tag)
|
||||
{
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1!= tag.size(); dep1++) {
|
||||
auto tagObj = tag.at(dep1);
|
||||
std::string tagObjStr = "Tag." + std::to_string(dep1 + 1);
|
||||
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeRequest::getAttribute()const
|
||||
{
|
||||
return attribute_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setAttribute(const std::string& attribute)
|
||||
{
|
||||
attribute_ = attribute;
|
||||
setParameter("Attribute", attribute);
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||
{
|
||||
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeRequest::getOwnerAccount()const
|
||||
{
|
||||
return ownerAccount_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||
{
|
||||
ownerAccount_ = ownerAccount;
|
||||
setParameter("OwnerAccount", ownerAccount);
|
||||
}
|
||||
|
||||
long DescribeNetworkInterfaceAttributeRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeRequest::getNetworkInterfaceId()const
|
||||
{
|
||||
return networkInterfaceId_;
|
||||
}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeRequest::setNetworkInterfaceId(const std::string& networkInterfaceId)
|
||||
{
|
||||
networkInterfaceId_ = networkInterfaceId;
|
||||
setParameter("NetworkInterfaceId", networkInterfaceId);
|
||||
}
|
||||
|
||||
244
ecs/src/model/DescribeNetworkInterfaceAttributeResult.cc
Normal file
244
ecs/src/model/DescribeNetworkInterfaceAttributeResult.cc
Normal file
@@ -0,0 +1,244 @@
|
||||
/*
|
||||
* 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/ecs/model/DescribeNetworkInterfaceAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Ecs;
|
||||
using namespace AlibabaCloud::Ecs::Model;
|
||||
|
||||
DescribeNetworkInterfaceAttributeResult::DescribeNetworkInterfaceAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeNetworkInterfaceAttributeResult::DescribeNetworkInterfaceAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeNetworkInterfaceAttributeResult::~DescribeNetworkInterfaceAttributeResult()
|
||||
{}
|
||||
|
||||
void DescribeNetworkInterfaceAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPrivateIpSetsNode = value["PrivateIpSets"]["PrivateIpSet"];
|
||||
for (auto valuePrivateIpSetsPrivateIpSet : allPrivateIpSetsNode)
|
||||
{
|
||||
PrivateIpSet privateIpSetsObject;
|
||||
if(!valuePrivateIpSetsPrivateIpSet["PrivateIpAddress"].isNull())
|
||||
privateIpSetsObject.privateIpAddress = valuePrivateIpSetsPrivateIpSet["PrivateIpAddress"].asString();
|
||||
if(!valuePrivateIpSetsPrivateIpSet["Primary"].isNull())
|
||||
privateIpSetsObject.primary = valuePrivateIpSetsPrivateIpSet["Primary"].asString() == "true";
|
||||
auto associatedPublicIp1Node = value["AssociatedPublicIp"];
|
||||
if(!associatedPublicIp1Node["PublicIpAddress"].isNull())
|
||||
privateIpSetsObject.associatedPublicIp1.publicIpAddress = associatedPublicIp1Node["PublicIpAddress"].asString();
|
||||
if(!associatedPublicIp1Node["AllocationId"].isNull())
|
||||
privateIpSetsObject.associatedPublicIp1.allocationId = associatedPublicIp1Node["AllocationId"].asString();
|
||||
privateIpSets_.push_back(privateIpSetsObject);
|
||||
}
|
||||
auto allIpv6SetsNode = value["Ipv6Sets"]["Ipv6Set"];
|
||||
for (auto valueIpv6SetsIpv6Set : allIpv6SetsNode)
|
||||
{
|
||||
Ipv6Set ipv6SetsObject;
|
||||
if(!valueIpv6SetsIpv6Set["Ipv6Address"].isNull())
|
||||
ipv6SetsObject.ipv6Address = valueIpv6SetsIpv6Set["Ipv6Address"].asString();
|
||||
ipv6Sets_.push_back(ipv6SetsObject);
|
||||
}
|
||||
auto allTagsNode = value["Tags"]["Tag"];
|
||||
for (auto valueTagsTag : allTagsNode)
|
||||
{
|
||||
Tag tagsObject;
|
||||
if(!valueTagsTag["TagKey"].isNull())
|
||||
tagsObject.tagKey = valueTagsTag["TagKey"].asString();
|
||||
if(!valueTagsTag["TagValue"].isNull())
|
||||
tagsObject.tagValue = valueTagsTag["TagValue"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto associatedPublicIpNode = value["AssociatedPublicIp"];
|
||||
if(!associatedPublicIpNode["PublicIpAddress"].isNull())
|
||||
associatedPublicIp_.publicIpAddress = associatedPublicIpNode["PublicIpAddress"].asString();
|
||||
if(!associatedPublicIpNode["AllocationId"].isNull())
|
||||
associatedPublicIp_.allocationId = associatedPublicIpNode["AllocationId"].asString();
|
||||
auto attachmentNode = value["Attachment"];
|
||||
if(!attachmentNode["InstanceId"].isNull())
|
||||
attachment_.instanceId = attachmentNode["InstanceId"].asString();
|
||||
if(!attachmentNode["TrunkNetworkInterfaceId"].isNull())
|
||||
attachment_.trunkNetworkInterfaceId = attachmentNode["TrunkNetworkInterfaceId"].asString();
|
||||
if(!attachmentNode["DeviceIndex"].isNull())
|
||||
attachment_.deviceIndex = std::stoi(attachmentNode["DeviceIndex"].asString());
|
||||
auto allMemberNetworkInterfaceIds = attachmentNode["MemberNetworkInterfaceIds"]["MemberNetworkInterfaceId"];
|
||||
for (auto value : allMemberNetworkInterfaceIds)
|
||||
attachment_.memberNetworkInterfaceIds.push_back(value.asString());
|
||||
auto allSecurityGroupIds = value["SecurityGroupIds"]["SecurityGroupId"];
|
||||
for (const auto &item : allSecurityGroupIds)
|
||||
securityGroupIds_.push_back(item.asString());
|
||||
if(!value["NetworkInterfaceId"].isNull())
|
||||
networkInterfaceId_ = value["NetworkInterfaceId"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
type_ = value["Type"].asString();
|
||||
if(!value["VpcId"].isNull())
|
||||
vpcId_ = value["VpcId"].asString();
|
||||
if(!value["VSwitchId"].isNull())
|
||||
vSwitchId_ = value["VSwitchId"].asString();
|
||||
if(!value["ZoneId"].isNull())
|
||||
zoneId_ = value["ZoneId"].asString();
|
||||
if(!value["PrivateIpAddress"].isNull())
|
||||
privateIpAddress_ = value["PrivateIpAddress"].asString();
|
||||
if(!value["MacAddress"].isNull())
|
||||
macAddress_ = value["MacAddress"].asString();
|
||||
if(!value["NetworkInterfaceName"].isNull())
|
||||
networkInterfaceName_ = value["NetworkInterfaceName"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
if(!value["CreationTime"].isNull())
|
||||
creationTime_ = value["CreationTime"].asString();
|
||||
if(!value["ResourceGroupId"].isNull())
|
||||
resourceGroupId_ = value["ResourceGroupId"].asString();
|
||||
if(!value["ServiceID"].isNull())
|
||||
serviceID_ = std::stol(value["ServiceID"].asString());
|
||||
if(!value["ServiceManaged"].isNull())
|
||||
serviceManaged_ = value["ServiceManaged"].asString() == "true";
|
||||
if(!value["QueueNumber"].isNull())
|
||||
queueNumber_ = std::stoi(value["QueueNumber"].asString());
|
||||
if(!value["OwnerId"].isNull())
|
||||
ownerId_ = value["OwnerId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getPrivateIpAddress()const
|
||||
{
|
||||
return privateIpAddress_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getZoneId()const
|
||||
{
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
bool DescribeNetworkInterfaceAttributeResult::getServiceManaged()const
|
||||
{
|
||||
return serviceManaged_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getVSwitchId()const
|
||||
{
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getNetworkInterfaceName()const
|
||||
{
|
||||
return networkInterfaceName_;
|
||||
}
|
||||
|
||||
DescribeNetworkInterfaceAttributeResult::Attachment DescribeNetworkInterfaceAttributeResult::getAttachment()const
|
||||
{
|
||||
return attachment_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getNetworkInterfaceId()const
|
||||
{
|
||||
return networkInterfaceId_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getMacAddress()const
|
||||
{
|
||||
return macAddress_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeNetworkInterfaceAttributeResult::getSecurityGroupIds()const
|
||||
{
|
||||
return securityGroupIds_;
|
||||
}
|
||||
|
||||
long DescribeNetworkInterfaceAttributeResult::getServiceID()const
|
||||
{
|
||||
return serviceID_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
std::vector<DescribeNetworkInterfaceAttributeResult::Ipv6Set> DescribeNetworkInterfaceAttributeResult::getIpv6Sets()const
|
||||
{
|
||||
return ipv6Sets_;
|
||||
}
|
||||
|
||||
int DescribeNetworkInterfaceAttributeResult::getQueueNumber()const
|
||||
{
|
||||
return queueNumber_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
DescribeNetworkInterfaceAttributeResult::AssociatedPublicIp DescribeNetworkInterfaceAttributeResult::getAssociatedPublicIp()const
|
||||
{
|
||||
return associatedPublicIp_;
|
||||
}
|
||||
|
||||
std::string DescribeNetworkInterfaceAttributeResult::getCreationTime()const
|
||||
{
|
||||
return creationTime_;
|
||||
}
|
||||
|
||||
std::vector<DescribeNetworkInterfaceAttributeResult::Tag> DescribeNetworkInterfaceAttributeResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
std::vector<DescribeNetworkInterfaceAttributeResult::PrivateIpSet> DescribeNetworkInterfaceAttributeResult::getPrivateIpSets()const
|
||||
{
|
||||
return privateIpSets_;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,13 @@ void DescribeNetworkInterfacesResult::parse(const std::string &payload)
|
||||
networkInterfaceSetsObject.associatedPublicIp.publicIpAddress = associatedPublicIpNode["PublicIpAddress"].asString();
|
||||
if(!associatedPublicIpNode["AllocationId"].isNull())
|
||||
networkInterfaceSetsObject.associatedPublicIp.allocationId = associatedPublicIpNode["AllocationId"].asString();
|
||||
auto attachmentNode = value["Attachment"];
|
||||
if(!attachmentNode["InstanceId"].isNull())
|
||||
networkInterfaceSetsObject.attachment.instanceId = attachmentNode["InstanceId"].asString();
|
||||
if(!attachmentNode["TrunkNetworkInterfaceId"].isNull())
|
||||
networkInterfaceSetsObject.attachment.trunkNetworkInterfaceId = attachmentNode["TrunkNetworkInterfaceId"].asString();
|
||||
if(!attachmentNode["DeviceIndex"].isNull())
|
||||
networkInterfaceSetsObject.attachment.deviceIndex = std::stoi(attachmentNode["DeviceIndex"].asString());
|
||||
auto allSecurityGroupIds = value["SecurityGroupIds"]["SecurityGroupId"];
|
||||
for (auto value : allSecurityGroupIds)
|
||||
networkInterfaceSetsObject.securityGroupIds.push_back(value.asString());
|
||||
|
||||
@@ -208,6 +208,17 @@ void DescribeSecurityGroupsRequest::setSecurityGroupIds(const std::string& secur
|
||||
setParameter("SecurityGroupIds", securityGroupIds);
|
||||
}
|
||||
|
||||
std::string DescribeSecurityGroupsRequest::getSecurityGroupType()const
|
||||
{
|
||||
return securityGroupType_;
|
||||
}
|
||||
|
||||
void DescribeSecurityGroupsRequest::setSecurityGroupType(const std::string& securityGroupType)
|
||||
{
|
||||
securityGroupType_ = securityGroupType;
|
||||
setParameter("SecurityGroupType", securityGroupType);
|
||||
}
|
||||
|
||||
std::string DescribeSecurityGroupsRequest::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
|
||||
@@ -61,6 +61,10 @@ void DescribeSecurityGroupsResult::parse(const std::string &payload)
|
||||
securityGroupsObject.ecsCount = std::stoi(valueSecurityGroupsSecurityGroup["EcsCount"].asString());
|
||||
if(!valueSecurityGroupsSecurityGroup["ResourceGroupId"].isNull())
|
||||
securityGroupsObject.resourceGroupId = valueSecurityGroupsSecurityGroup["ResourceGroupId"].asString();
|
||||
if(!valueSecurityGroupsSecurityGroup["ServiceID"].isNull())
|
||||
securityGroupsObject.serviceID = std::stol(valueSecurityGroupsSecurityGroup["ServiceID"].asString());
|
||||
if(!valueSecurityGroupsSecurityGroup["ServiceManaged"].isNull())
|
||||
securityGroupsObject.serviceManaged = valueSecurityGroupsSecurityGroup["ServiceManaged"].asString() == "true";
|
||||
auto allTagsNode = allSecurityGroupsNode["Tags"]["Tag"];
|
||||
for (auto allSecurityGroupsNodeTagsTag : allTagsNode)
|
||||
{
|
||||
|
||||
@@ -296,6 +296,17 @@ void DescribeSnapshotsRequest::setKMSKeyId(const std::string& kMSKeyId)
|
||||
setParameter("KMSKeyId", kMSKeyId);
|
||||
}
|
||||
|
||||
std::string DescribeSnapshotsRequest::getCategory()const
|
||||
{
|
||||
return category_;
|
||||
}
|
||||
|
||||
void DescribeSnapshotsRequest::setCategory(const std::string& category)
|
||||
{
|
||||
category_ = category;
|
||||
setParameter("Category", category);
|
||||
}
|
||||
|
||||
std::string DescribeSnapshotsRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
|
||||
@@ -49,6 +49,17 @@ void DetachNetworkInterfaceRequest::setRegionId(const std::string& regionId)
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
std::string DetachNetworkInterfaceRequest::getTrunkNetworkInstanceId()const
|
||||
{
|
||||
return trunkNetworkInstanceId_;
|
||||
}
|
||||
|
||||
void DetachNetworkInterfaceRequest::setTrunkNetworkInstanceId(const std::string& trunkNetworkInstanceId)
|
||||
{
|
||||
trunkNetworkInstanceId_ = trunkNetworkInstanceId;
|
||||
setParameter("TrunkNetworkInstanceId", trunkNetworkInstanceId);
|
||||
}
|
||||
|
||||
std::string DetachNetworkInterfaceRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
|
||||
@@ -49,6 +49,17 @@ void ModifyAutoSnapshotPolicyExRequest::setAutoSnapshotPolicyId(const std::strin
|
||||
setParameter("AutoSnapshotPolicyId", autoSnapshotPolicyId);
|
||||
}
|
||||
|
||||
int ModifyAutoSnapshotPolicyExRequest::getCopiedSnapshotsRetentionDays()const
|
||||
{
|
||||
return copiedSnapshotsRetentionDays_;
|
||||
}
|
||||
|
||||
void ModifyAutoSnapshotPolicyExRequest::setCopiedSnapshotsRetentionDays(int copiedSnapshotsRetentionDays)
|
||||
{
|
||||
copiedSnapshotsRetentionDays_ = copiedSnapshotsRetentionDays;
|
||||
setParameter("CopiedSnapshotsRetentionDays", std::to_string(copiedSnapshotsRetentionDays));
|
||||
}
|
||||
|
||||
std::string ModifyAutoSnapshotPolicyExRequest::getTimePoints()const
|
||||
{
|
||||
return timePoints_;
|
||||
@@ -82,6 +93,17 @@ void ModifyAutoSnapshotPolicyExRequest::setRegionId(const std::string& regionId)
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
bool ModifyAutoSnapshotPolicyExRequest::getEnableCrossRegionCopy()const
|
||||
{
|
||||
return enableCrossRegionCopy_;
|
||||
}
|
||||
|
||||
void ModifyAutoSnapshotPolicyExRequest::setEnableCrossRegionCopy(bool enableCrossRegionCopy)
|
||||
{
|
||||
enableCrossRegionCopy_ = enableCrossRegionCopy;
|
||||
setParameter("EnableCrossRegionCopy", enableCrossRegionCopy ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ModifyAutoSnapshotPolicyExRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
@@ -126,3 +148,14 @@ void ModifyAutoSnapshotPolicyExRequest::setRetentionDays(int retentionDays)
|
||||
setParameter("RetentionDays", std::to_string(retentionDays));
|
||||
}
|
||||
|
||||
std::string ModifyAutoSnapshotPolicyExRequest::getTargetCopyRegions()const
|
||||
{
|
||||
return targetCopyRegions_;
|
||||
}
|
||||
|
||||
void ModifyAutoSnapshotPolicyExRequest::setTargetCopyRegions(const std::string& targetCopyRegions)
|
||||
{
|
||||
targetCopyRegions_ = targetCopyRegions;
|
||||
setParameter("TargetCopyRegions", targetCopyRegions);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,17 @@ void ModifyDiskSpecRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyDiskSpecRequest::getDiskCategory()const
|
||||
{
|
||||
return diskCategory_;
|
||||
}
|
||||
|
||||
void ModifyDiskSpecRequest::setDiskCategory(const std::string& diskCategory)
|
||||
{
|
||||
diskCategory_ = diskCategory;
|
||||
setParameter("DiskCategory", diskCategory);
|
||||
}
|
||||
|
||||
std::string ModifyDiskSpecRequest::getDiskId()const
|
||||
{
|
||||
return diskId_;
|
||||
@@ -49,6 +60,17 @@ void ModifyDiskSpecRequest::setDiskId(const std::string& diskId)
|
||||
setParameter("DiskId", diskId);
|
||||
}
|
||||
|
||||
bool ModifyDiskSpecRequest::getDryRun()const
|
||||
{
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void ModifyDiskSpecRequest::setDryRun(bool dryRun)
|
||||
{
|
||||
dryRun_ = dryRun;
|
||||
setParameter("DryRun", dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ModifyDiskSpecRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
|
||||
@@ -39,6 +39,13 @@ void ModifyDiskSpecResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["TaskId"].isNull())
|
||||
taskId_ = value["TaskId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyDiskSpecResult::getTaskId()const
|
||||
{
|
||||
return taskId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,17 @@ void ModifyImageAttributeRequest::setDescription(const std::string& description)
|
||||
setParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string ModifyImageAttributeRequest::getBootMode()const
|
||||
{
|
||||
return bootMode_;
|
||||
}
|
||||
|
||||
void ModifyImageAttributeRequest::setBootMode(const std::string& bootMode)
|
||||
{
|
||||
bootMode_ = bootMode;
|
||||
setParameter("BootMode", bootMode);
|
||||
}
|
||||
|
||||
std::string ModifyImageAttributeRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
|
||||
@@ -38,6 +38,19 @@ void ModifyInstanceVpcAttributeRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::vector<std::string> ModifyInstanceVpcAttributeRequest::getSecurityGroupId()const
|
||||
{
|
||||
return securityGroupId_;
|
||||
}
|
||||
|
||||
void ModifyInstanceVpcAttributeRequest::setSecurityGroupId(const std::vector<std::string>& securityGroupId)
|
||||
{
|
||||
securityGroupId_ = securityGroupId;
|
||||
for(int dep1 = 0; dep1!= securityGroupId.size(); dep1++) {
|
||||
setParameter("SecurityGroupId."+ std::to_string(dep1), securityGroupId.at(dep1));
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModifyInstanceVpcAttributeRequest::getResourceOwnerAccount()const
|
||||
{
|
||||
return resourceOwnerAccount_;
|
||||
@@ -104,3 +117,14 @@ void ModifyInstanceVpcAttributeRequest::setInstanceId(const std::string& instanc
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ModifyInstanceVpcAttributeRequest::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void ModifyInstanceVpcAttributeRequest::setVpcId(const std::string& vpcId)
|
||||
{
|
||||
vpcId_ = vpcId;
|
||||
setParameter("VpcId", vpcId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user