-Supported DeleteEip

This commit is contained in:
sdk-team
2024-12-25 06:26:47 +00:00
parent 1d1099683e
commit 0c2f5f41c4
24 changed files with 530 additions and 5 deletions

View File

@@ -1 +1 @@
1.36.2033
1.36.2034

View File

@@ -135,6 +135,8 @@ set(ens_public_header_model
include/alibabacloud/ens/model/DeleteDeviceInternetPortResult.h
include/alibabacloud/ens/model/DeleteDiskRequest.h
include/alibabacloud/ens/model/DeleteDiskResult.h
include/alibabacloud/ens/model/DeleteEipRequest.h
include/alibabacloud/ens/model/DeleteEipResult.h
include/alibabacloud/ens/model/DeleteEnsRouteEntryRequest.h
include/alibabacloud/ens/model/DeleteEnsRouteEntryResult.h
include/alibabacloud/ens/model/DeleteEnsSaleConditionControlRequest.h
@@ -459,6 +461,8 @@ set(ens_public_header_model
include/alibabacloud/ens/model/ModifySecurityGroupAttributeResult.h
include/alibabacloud/ens/model/ModifySnapshotAttributeRequest.h
include/alibabacloud/ens/model/ModifySnapshotAttributeResult.h
include/alibabacloud/ens/model/ModifySnatEntryRequest.h
include/alibabacloud/ens/model/ModifySnatEntryResult.h
include/alibabacloud/ens/model/ModifyVSwitchAttributeRequest.h
include/alibabacloud/ens/model/ModifyVSwitchAttributeResult.h
include/alibabacloud/ens/model/MountInstanceSDGRequest.h
@@ -712,6 +716,8 @@ set(ens_src
src/model/DeleteDeviceInternetPortResult.cc
src/model/DeleteDiskRequest.cc
src/model/DeleteDiskResult.cc
src/model/DeleteEipRequest.cc
src/model/DeleteEipResult.cc
src/model/DeleteEnsRouteEntryRequest.cc
src/model/DeleteEnsRouteEntryResult.cc
src/model/DeleteEnsSaleConditionControlRequest.cc
@@ -1036,6 +1042,8 @@ set(ens_src
src/model/ModifySecurityGroupAttributeResult.cc
src/model/ModifySnapshotAttributeRequest.cc
src/model/ModifySnapshotAttributeResult.cc
src/model/ModifySnatEntryRequest.cc
src/model/ModifySnatEntryResult.cc
src/model/ModifyVSwitchAttributeRequest.cc
src/model/ModifyVSwitchAttributeResult.cc
src/model/MountInstanceSDGRequest.cc

View File

@@ -136,6 +136,8 @@
#include "model/DeleteDeviceInternetPortResult.h"
#include "model/DeleteDiskRequest.h"
#include "model/DeleteDiskResult.h"
#include "model/DeleteEipRequest.h"
#include "model/DeleteEipResult.h"
#include "model/DeleteEnsRouteEntryRequest.h"
#include "model/DeleteEnsRouteEntryResult.h"
#include "model/DeleteEnsSaleConditionControlRequest.h"
@@ -460,6 +462,8 @@
#include "model/ModifySecurityGroupAttributeResult.h"
#include "model/ModifySnapshotAttributeRequest.h"
#include "model/ModifySnapshotAttributeResult.h"
#include "model/ModifySnatEntryRequest.h"
#include "model/ModifySnatEntryResult.h"
#include "model/ModifyVSwitchAttributeRequest.h"
#include "model/ModifyVSwitchAttributeResult.h"
#include "model/MountInstanceSDGRequest.h"
@@ -776,6 +780,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DeleteDiskResult> DeleteDiskOutcome;
typedef std::future<DeleteDiskOutcome> DeleteDiskOutcomeCallable;
typedef std::function<void(const EnsClient*, const Model::DeleteDiskRequest&, const DeleteDiskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteDiskAsyncHandler;
typedef Outcome<Error, Model::DeleteEipResult> DeleteEipOutcome;
typedef std::future<DeleteEipOutcome> DeleteEipOutcomeCallable;
typedef std::function<void(const EnsClient*, const Model::DeleteEipRequest&, const DeleteEipOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteEipAsyncHandler;
typedef Outcome<Error, Model::DeleteEnsRouteEntryResult> DeleteEnsRouteEntryOutcome;
typedef std::future<DeleteEnsRouteEntryOutcome> DeleteEnsRouteEntryOutcomeCallable;
typedef std::function<void(const EnsClient*, const Model::DeleteEnsRouteEntryRequest&, const DeleteEnsRouteEntryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteEnsRouteEntryAsyncHandler;
@@ -1262,6 +1269,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ModifySnapshotAttributeResult> ModifySnapshotAttributeOutcome;
typedef std::future<ModifySnapshotAttributeOutcome> ModifySnapshotAttributeOutcomeCallable;
typedef std::function<void(const EnsClient*, const Model::ModifySnapshotAttributeRequest&, const ModifySnapshotAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifySnapshotAttributeAsyncHandler;
typedef Outcome<Error, Model::ModifySnatEntryResult> ModifySnatEntryOutcome;
typedef std::future<ModifySnatEntryOutcome> ModifySnatEntryOutcomeCallable;
typedef std::function<void(const EnsClient*, const Model::ModifySnatEntryRequest&, const ModifySnatEntryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifySnatEntryAsyncHandler;
typedef Outcome<Error, Model::ModifyVSwitchAttributeResult> ModifyVSwitchAttributeOutcome;
typedef std::future<ModifyVSwitchAttributeOutcome> ModifyVSwitchAttributeOutcomeCallable;
typedef std::function<void(const EnsClient*, const Model::ModifyVSwitchAttributeRequest&, const ModifyVSwitchAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyVSwitchAttributeAsyncHandler;
@@ -1642,6 +1652,9 @@ namespace AlibabaCloud
DeleteDiskOutcome deleteDisk(const Model::DeleteDiskRequest &request)const;
void deleteDiskAsync(const Model::DeleteDiskRequest& request, const DeleteDiskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteDiskOutcomeCallable deleteDiskCallable(const Model::DeleteDiskRequest& request) const;
DeleteEipOutcome deleteEip(const Model::DeleteEipRequest &request)const;
void deleteEipAsync(const Model::DeleteEipRequest& request, const DeleteEipAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteEipOutcomeCallable deleteEipCallable(const Model::DeleteEipRequest& request) const;
DeleteEnsRouteEntryOutcome deleteEnsRouteEntry(const Model::DeleteEnsRouteEntryRequest &request)const;
void deleteEnsRouteEntryAsync(const Model::DeleteEnsRouteEntryRequest& request, const DeleteEnsRouteEntryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteEnsRouteEntryOutcomeCallable deleteEnsRouteEntryCallable(const Model::DeleteEnsRouteEntryRequest& request) const;
@@ -2128,6 +2141,9 @@ namespace AlibabaCloud
ModifySnapshotAttributeOutcome modifySnapshotAttribute(const Model::ModifySnapshotAttributeRequest &request)const;
void modifySnapshotAttributeAsync(const Model::ModifySnapshotAttributeRequest& request, const ModifySnapshotAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifySnapshotAttributeOutcomeCallable modifySnapshotAttributeCallable(const Model::ModifySnapshotAttributeRequest& request) const;
ModifySnatEntryOutcome modifySnatEntry(const Model::ModifySnatEntryRequest &request)const;
void modifySnatEntryAsync(const Model::ModifySnatEntryRequest& request, const ModifySnatEntryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifySnatEntryOutcomeCallable modifySnatEntryCallable(const Model::ModifySnatEntryRequest& request) const;
ModifyVSwitchAttributeOutcome modifyVSwitchAttribute(const Model::ModifyVSwitchAttributeRequest &request)const;
void modifyVSwitchAttributeAsync(const Model::ModifyVSwitchAttributeRequest& request, const ModifyVSwitchAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ModifyVSwitchAttributeOutcomeCallable modifyVSwitchAttributeCallable(const Model::ModifyVSwitchAttributeRequest& request) const;

View File

@@ -50,6 +50,8 @@ public:
void setIdleTimeout(int idleTimeout);
std::string getSnatEntryName() const;
void setSnatEntryName(const std::string &snatEntryName);
bool getIspAffinity() const;
void setIspAffinity(bool ispAffinity);
private:
std::string snatIp_;
@@ -62,6 +64,7 @@ private:
std::string natGatewayId_;
int idleTimeout_;
std::string snatEntryName_;
bool ispAffinity_;
};
} // namespace Model
} // namespace Ens

View File

@@ -0,0 +1,42 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_ENS_MODEL_DELETEEIPREQUEST_H_
#define ALIBABACLOUD_ENS_MODEL_DELETEEIPREQUEST_H_
#include <alibabacloud/ens/EnsExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ens {
namespace Model {
class ALIBABACLOUD_ENS_EXPORT DeleteEipRequest : public RpcServiceRequest {
public:
DeleteEipRequest();
~DeleteEipRequest();
std::string getInstanceId() const;
void setInstanceId(const std::string &instanceId);
private:
std::string instanceId_;
};
} // namespace Model
} // namespace Ens
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ENS_MODEL_DELETEEIPREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_ENS_MODEL_DELETEEIPRESULT_H_
#define ALIBABACLOUD_ENS_MODEL_DELETEEIPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ens/EnsExport.h>
namespace AlibabaCloud
{
namespace Ens
{
namespace Model
{
class ALIBABACLOUD_ENS_EXPORT DeleteEipResult : public ServiceResult
{
public:
DeleteEipResult();
explicit DeleteEipResult(const std::string &payload);
~DeleteEipResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_ENS_MODEL_DELETEEIPRESULT_H_

View File

@@ -34,6 +34,8 @@ public:
};
DescribeInstancesRequest();
~DescribeInstancesRequest();
std::vector<std::string> getServiceStatus() const;
void setServiceStatus(const std::vector<std::string> &serviceStatus);
std::string getOrderByParams() const;
void setOrderByParams(const std::string &orderByParams);
std::string getEnsRegionId() const;
@@ -74,6 +76,7 @@ public:
void setEnsRegionIds(const std::string &ensRegionIds);
private:
std::vector<std::string> serviceStatus_;
std::string orderByParams_;
std::string ensRegionId_;
std::string instanceResourceType_;

View File

@@ -111,6 +111,7 @@ namespace AlibabaCloud
std::vector<std::string> publicIpAddress;
NetworkAttributes networkAttributes;
std::vector<std::string> innerIpAddress;
std::string serviceStatus;
std::vector<Instance::NetworkInterfacesItem> networkInterfaces;
std::string expiredTime;
std::string imageId;

View File

@@ -52,6 +52,7 @@ namespace AlibabaCloud
std::string getDestCIDR()const;
std::string getSnatEntryName()const;
std::string getCreationTime()const;
bool getIspAffinity()const;
std::vector<Snatip> getSnatIps()const;
std::string getSnatEntryId()const;
std::string getStandbyStatus()const;
@@ -69,6 +70,7 @@ namespace AlibabaCloud
std::string destCIDR_;
std::string snatEntryName_;
std::string creationTime_;
bool ispAffinity_;
std::vector<Snatip> snatIps_;
std::string snatEntryId_;
std::string standbyStatus_;

View File

@@ -42,17 +42,18 @@ namespace AlibabaCloud
bool standby;
};
std::string status;
std::string sourceCIDR;
int idleTimeout;
std::string snatIp;
std::string standbySnatIp;
std::string type;
std::string destCIDR;
std::string snatEntryName;
std::string sourceCIDR;
bool ispAffinity;
std::vector<SnatTableEntry::SnatIp> snatIps;
std::string snatEntryId;
int idleTimeout;
std::string snatIp;
std::string standbyStatus;
std::string natGatewayId;
std::string standbySnatIp;
};

View File

@@ -40,6 +40,11 @@ namespace AlibabaCloud
long size;
std::string key;
};
struct CommonPrefixInfo
{
std::string lastModified;
std::string prefix;
};
ListObjectsResult();
@@ -53,6 +58,7 @@ namespace AlibabaCloud
bool getIsTruncated()const;
std::string getPrefix()const;
std::string getMarker()const;
std::vector<CommonPrefixInfo> getCommonPrefixInfos()const;
std::vector<Content> getContents()const;
std::string getBucketName()const;
long getKeyCount()const;
@@ -70,6 +76,7 @@ namespace AlibabaCloud
bool isTruncated_;
std::string prefix_;
std::string marker_;
std::vector<CommonPrefixInfo> commonPrefixInfos_;
std::vector<Content> contents_;
std::string bucketName_;
long keyCount_;

View File

@@ -0,0 +1,48 @@
/*
* 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.
*/
#ifndef ALIBABACLOUD_ENS_MODEL_MODIFYSNATENTRYREQUEST_H_
#define ALIBABACLOUD_ENS_MODEL_MODIFYSNATENTRYREQUEST_H_
#include <alibabacloud/ens/EnsExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Ens {
namespace Model {
class ALIBABACLOUD_ENS_EXPORT ModifySnatEntryRequest : public RpcServiceRequest {
public:
ModifySnatEntryRequest();
~ModifySnatEntryRequest();
std::string getSnatEntryId() const;
void setSnatEntryId(const std::string &snatEntryId);
std::string getSnatEntryName() const;
void setSnatEntryName(const std::string &snatEntryName);
bool getIspAffinity() const;
void setIspAffinity(bool ispAffinity);
private:
std::string snatEntryId_;
std::string snatEntryName_;
bool ispAffinity_;
};
} // namespace Model
} // namespace Ens
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_ENS_MODEL_MODIFYSNATENTRYREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_ENS_MODEL_MODIFYSNATENTRYRESULT_H_
#define ALIBABACLOUD_ENS_MODEL_MODIFYSNATENTRYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ens/EnsExport.h>
namespace AlibabaCloud
{
namespace Ens
{
namespace Model
{
class ALIBABACLOUD_ENS_EXPORT ModifySnatEntryResult : public ServiceResult
{
public:
ModifySnatEntryResult();
explicit ModifySnatEntryResult(const std::string &payload);
~ModifySnatEntryResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_ENS_MODEL_MODIFYSNATENTRYRESULT_H_

View File

@@ -2103,6 +2103,42 @@ EnsClient::DeleteDiskOutcomeCallable EnsClient::deleteDiskCallable(const DeleteD
return task->get_future();
}
EnsClient::DeleteEipOutcome EnsClient::deleteEip(const DeleteEipRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteEipOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteEipOutcome(DeleteEipResult(outcome.result()));
else
return DeleteEipOutcome(outcome.error());
}
void EnsClient::deleteEipAsync(const DeleteEipRequest& request, const DeleteEipAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteEip(request), context);
};
asyncExecute(new Runnable(fn));
}
EnsClient::DeleteEipOutcomeCallable EnsClient::deleteEipCallable(const DeleteEipRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteEipOutcome()>>(
[this, request]()
{
return this->deleteEip(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EnsClient::DeleteEnsRouteEntryOutcome EnsClient::deleteEnsRouteEntry(const DeleteEnsRouteEntryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -7935,6 +7971,42 @@ EnsClient::ModifySnapshotAttributeOutcomeCallable EnsClient::modifySnapshotAttri
return task->get_future();
}
EnsClient::ModifySnatEntryOutcome EnsClient::modifySnatEntry(const ModifySnatEntryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ModifySnatEntryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ModifySnatEntryOutcome(ModifySnatEntryResult(outcome.result()));
else
return ModifySnatEntryOutcome(outcome.error());
}
void EnsClient::modifySnatEntryAsync(const ModifySnatEntryRequest& request, const ModifySnatEntryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, modifySnatEntry(request), context);
};
asyncExecute(new Runnable(fn));
}
EnsClient::ModifySnatEntryOutcomeCallable EnsClient::modifySnatEntryCallable(const ModifySnatEntryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ModifySnatEntryOutcome()>>(
[this, request]()
{
return this->modifySnatEntry(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
EnsClient::ModifyVSwitchAttributeOutcome EnsClient::modifyVSwitchAttribute(const ModifyVSwitchAttributeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -115,3 +115,12 @@ void CreateSnatEntryRequest::setSnatEntryName(const std::string &snatEntryName)
setParameter(std::string("SnatEntryName"), snatEntryName);
}
bool CreateSnatEntryRequest::getIspAffinity() const {
return ispAffinity_;
}
void CreateSnatEntryRequest::setIspAffinity(bool ispAffinity) {
ispAffinity_ = ispAffinity;
setParameter(std::string("IspAffinity"), ispAffinity ? "true" : "false");
}

View File

@@ -0,0 +1,36 @@
/*
* 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/ens/model/DeleteEipRequest.h>
using AlibabaCloud::Ens::Model::DeleteEipRequest;
DeleteEipRequest::DeleteEipRequest()
: RpcServiceRequest("ens", "2017-11-10", "DeleteEip") {
setMethod(HttpRequest::Method::Post);
}
DeleteEipRequest::~DeleteEipRequest() {}
std::string DeleteEipRequest::getInstanceId() const {
return instanceId_;
}
void DeleteEipRequest::setInstanceId(const std::string &instanceId) {
instanceId_ = instanceId;
setParameter(std::string("InstanceId"), instanceId);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ens/model/DeleteEipResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ens;
using namespace AlibabaCloud::Ens::Model;
DeleteEipResult::DeleteEipResult() :
ServiceResult()
{}
DeleteEipResult::DeleteEipResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteEipResult::~DeleteEipResult()
{}
void DeleteEipResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -25,6 +25,17 @@ DescribeInstancesRequest::DescribeInstancesRequest()
DescribeInstancesRequest::~DescribeInstancesRequest() {}
std::vector<DescribeInstancesRequest::std::string> DescribeInstancesRequest::getServiceStatus() const {
return serviceStatus_;
}
void DescribeInstancesRequest::setServiceStatus(const std::vector<DescribeInstancesRequest::std::string> &serviceStatus) {
serviceStatus_ = serviceStatus;
for(int dep1 = 0; dep1 != serviceStatus.size(); dep1++) {
setParameter(std::string("ServiceStatus") + "." + std::to_string(dep1 + 1), serviceStatus[dep1]);
}
}
std::string DescribeInstancesRequest::getOrderByParams() const {
return orderByParams_;
}

View File

@@ -83,6 +83,8 @@ void DescribeInstancesResult::parse(const std::string &payload)
instancesObject.spotStrategy = valueInstancesInstance["SpotStrategy"].asString();
if(!valueInstancesInstance["KeyPairName"].isNull())
instancesObject.keyPairName = valueInstancesInstance["KeyPairName"].asString();
if(!valueInstancesInstance["ServiceStatus"].isNull())
instancesObject.serviceStatus = valueInstancesInstance["ServiceStatus"].asString();
auto allDataDiskNode = valueInstancesInstance["DataDisk"]["DataDiskItem"];
for (auto valueInstancesInstanceDataDiskDataDiskItem : allDataDiskNode)
{

View File

@@ -75,6 +75,8 @@ void DescribeSnatAttributeResult::parse(const std::string &payload)
idleTimeout_ = std::stoi(value["IdleTimeout"].asString());
if(!value["DestCIDR"].isNull())
destCIDR_ = value["DestCIDR"].asString();
if(!value["IspAffinity"].isNull())
ispAffinity_ = value["IspAffinity"].asString() == "true";
}
@@ -123,6 +125,11 @@ std::string DescribeSnatAttributeResult::getCreationTime()const
return creationTime_;
}
bool DescribeSnatAttributeResult::getIspAffinity()const
{
return ispAffinity_;
}
std::vector<DescribeSnatAttributeResult::Snatip> DescribeSnatAttributeResult::getSnatIps()const
{
return snatIps_;

View File

@@ -65,6 +65,8 @@ void DescribeSnatTableEntriesResult::parse(const std::string &payload)
snatTableEntriesObject.idleTimeout = std::stoi(valueSnatTableEntriesSnatTableEntry["IdleTimeout"].asString());
if(!valueSnatTableEntriesSnatTableEntry["DestCIDR"].isNull())
snatTableEntriesObject.destCIDR = valueSnatTableEntriesSnatTableEntry["DestCIDR"].asString();
if(!valueSnatTableEntriesSnatTableEntry["IspAffinity"].isNull())
snatTableEntriesObject.ispAffinity = valueSnatTableEntriesSnatTableEntry["IspAffinity"].asString() == "true";
auto allSnatIpsNode = valueSnatTableEntriesSnatTableEntry["SnatIps"]["snatIp"];
for (auto valueSnatTableEntriesSnatTableEntrySnatIpssnatIp : allSnatIpsNode)
{

View File

@@ -55,6 +55,16 @@ void ListObjectsResult::parse(const std::string &payload)
contentsObject.size = std::stol(valueContentsContent["Size"].asString());
contents_.push_back(contentsObject);
}
auto allCommonPrefixInfosNode = value["CommonPrefixInfos"]["CommonPrefixInfo"];
for (auto valueCommonPrefixInfosCommonPrefixInfo : allCommonPrefixInfosNode)
{
CommonPrefixInfo commonPrefixInfosObject;
if(!valueCommonPrefixInfosCommonPrefixInfo["Prefix"].isNull())
commonPrefixInfosObject.prefix = valueCommonPrefixInfosCommonPrefixInfo["Prefix"].asString();
if(!valueCommonPrefixInfosCommonPrefixInfo["LastModified"].isNull())
commonPrefixInfosObject.lastModified = valueCommonPrefixInfosCommonPrefixInfo["LastModified"].asString();
commonPrefixInfos_.push_back(commonPrefixInfosObject);
}
auto allCommonPrefixes = value["CommonPrefixes"]["Prefix"];
for (const auto &item : allCommonPrefixes)
commonPrefixes_.push_back(item.asString());
@@ -123,6 +133,11 @@ std::string ListObjectsResult::getMarker()const
return marker_;
}
std::vector<ListObjectsResult::CommonPrefixInfo> ListObjectsResult::getCommonPrefixInfos()const
{
return commonPrefixInfos_;
}
std::vector<ListObjectsResult::Content> ListObjectsResult::getContents()const
{
return contents_;

View File

@@ -0,0 +1,54 @@
/*
* 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/ens/model/ModifySnatEntryRequest.h>
using AlibabaCloud::Ens::Model::ModifySnatEntryRequest;
ModifySnatEntryRequest::ModifySnatEntryRequest()
: RpcServiceRequest("ens", "2017-11-10", "ModifySnatEntry") {
setMethod(HttpRequest::Method::Post);
}
ModifySnatEntryRequest::~ModifySnatEntryRequest() {}
std::string ModifySnatEntryRequest::getSnatEntryId() const {
return snatEntryId_;
}
void ModifySnatEntryRequest::setSnatEntryId(const std::string &snatEntryId) {
snatEntryId_ = snatEntryId;
setParameter(std::string("SnatEntryId"), snatEntryId);
}
std::string ModifySnatEntryRequest::getSnatEntryName() const {
return snatEntryName_;
}
void ModifySnatEntryRequest::setSnatEntryName(const std::string &snatEntryName) {
snatEntryName_ = snatEntryName;
setParameter(std::string("SnatEntryName"), snatEntryName);
}
bool ModifySnatEntryRequest::getIspAffinity() const {
return ispAffinity_;
}
void ModifySnatEntryRequest::setIspAffinity(bool ispAffinity) {
ispAffinity_ = ispAffinity;
setParameter(std::string("IspAffinity"), ispAffinity ? "true" : "false");
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/ens/model/ModifySnatEntryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ens;
using namespace AlibabaCloud::Ens::Model;
ModifySnatEntryResult::ModifySnatEntryResult() :
ServiceResult()
{}
ModifySnatEntryResult::ModifySnatEntryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ModifySnatEntryResult::~ModifySnatEntryResult()
{}
void ModifySnatEntryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}