Add UpdateAnycastEipAddressAssociations Interface.

This commit is contained in:
sdk-team
2022-02-24 03:54:57 +00:00
parent fa0fe1ae07
commit 5fb8057a45
23 changed files with 523 additions and 101 deletions

View File

@@ -1,3 +1,6 @@
2022-02-24 Version: 1.36.1068
- Add UpdateAnycastEipAddressAssociations Interface.
2022-02-23 Version: 1.36.1067
- SDK.

View File

@@ -1 +1 @@
1.36.1067
1.36.1068

View File

@@ -40,7 +40,9 @@ set(eipanycast_public_header_model
include/alibabacloud/eipanycast/model/ReleaseAnycastEipAddressRequest.h
include/alibabacloud/eipanycast/model/ReleaseAnycastEipAddressResult.h
include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressRequest.h
include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressResult.h )
include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressResult.h
include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsRequest.h
include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsResult.h )
set(eipanycast_src
src/EipanycastClient.cc
@@ -63,7 +65,9 @@ set(eipanycast_src
src/model/ReleaseAnycastEipAddressRequest.cc
src/model/ReleaseAnycastEipAddressResult.cc
src/model/UnassociateAnycastEipAddressRequest.cc
src/model/UnassociateAnycastEipAddressResult.cc )
src/model/UnassociateAnycastEipAddressResult.cc
src/model/UpdateAnycastEipAddressAssociationsRequest.cc
src/model/UpdateAnycastEipAddressAssociationsResult.cc )
add_library(eipanycast ${LIB_TYPE}
${eipanycast_public_header}

View File

@@ -42,6 +42,8 @@
#include "model/ReleaseAnycastEipAddressResult.h"
#include "model/UnassociateAnycastEipAddressRequest.h"
#include "model/UnassociateAnycastEipAddressResult.h"
#include "model/UpdateAnycastEipAddressAssociationsRequest.h"
#include "model/UpdateAnycastEipAddressAssociationsResult.h"
namespace AlibabaCloud
@@ -81,6 +83,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::UnassociateAnycastEipAddressResult> UnassociateAnycastEipAddressOutcome;
typedef std::future<UnassociateAnycastEipAddressOutcome> UnassociateAnycastEipAddressOutcomeCallable;
typedef std::function<void(const EipanycastClient*, const Model::UnassociateAnycastEipAddressRequest&, const UnassociateAnycastEipAddressOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnassociateAnycastEipAddressAsyncHandler;
typedef Outcome<Error, Model::UpdateAnycastEipAddressAssociationsResult> UpdateAnycastEipAddressAssociationsOutcome;
typedef std::future<UpdateAnycastEipAddressAssociationsOutcome> UpdateAnycastEipAddressAssociationsOutcomeCallable;
typedef std::function<void(const EipanycastClient*, const Model::UpdateAnycastEipAddressAssociationsRequest&, const UpdateAnycastEipAddressAssociationsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAnycastEipAddressAssociationsAsyncHandler;
EipanycastClient(const Credentials &credentials, const ClientConfiguration &configuration);
EipanycastClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -116,6 +121,9 @@ namespace AlibabaCloud
UnassociateAnycastEipAddressOutcome unassociateAnycastEipAddress(const Model::UnassociateAnycastEipAddressRequest &request)const;
void unassociateAnycastEipAddressAsync(const Model::UnassociateAnycastEipAddressRequest& request, const UnassociateAnycastEipAddressAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UnassociateAnycastEipAddressOutcomeCallable unassociateAnycastEipAddressCallable(const Model::UnassociateAnycastEipAddressRequest& request) const;
UpdateAnycastEipAddressAssociationsOutcome updateAnycastEipAddressAssociations(const Model::UpdateAnycastEipAddressAssociationsRequest &request)const;
void updateAnycastEipAddressAssociationsAsync(const Model::UpdateAnycastEipAddressAssociationsRequest& request, const UpdateAnycastEipAddressAssociationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateAnycastEipAddressAssociationsOutcomeCallable updateAnycastEipAddressAssociationsCallable(const Model::UpdateAnycastEipAddressAssociationsRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -37,12 +37,18 @@ namespace AlibabaCloud
bool getDryRun()const;
void setDryRun(bool dryRun);
std::string getAssociationMode()const;
void setAssociationMode(const std::string& associationMode);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
Array getPopLocations()const;
void setPopLocations(const Array& popLocations);
std::string getBindInstanceType()const;
void setBindInstanceType(const std::string& bindInstanceType);
std::string getBindInstanceRegionId()const;
void setBindInstanceRegionId(const std::string& bindInstanceRegionId);
std::string getPrivateIpAddress()const;
void setPrivateIpAddress(const std::string& privateIpAddress);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAnycastId()const;
@@ -52,9 +58,12 @@ namespace AlibabaCloud
private:
bool dryRun_;
std::string associationMode_;
std::string clientToken_;
Array popLocations_;
std::string bindInstanceType_;
std::string bindInstanceRegionId_;
std::string privateIpAddress_;
std::string regionId_;
std::string anycastId_;
std::string bindInstanceId_;

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
DescribeAnycastEipAddressRequest();
~DescribeAnycastEipAddressRequest();
std::string getIp()const;
void setIp(const std::string& ip);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAnycastId()const;
@@ -43,6 +45,7 @@ namespace AlibabaCloud
void setBindInstanceId(const std::string& bindInstanceId);
private:
std::string ip_;
std::string regionId_;
std::string anycastId_;
std::string bindInstanceId_;

View File

@@ -34,10 +34,18 @@ namespace AlibabaCloud
public:
struct AnycastEipBindInfo
{
struct PopLocation
{
std::string popLocation;
};
std::string status;
std::string bindInstanceId;
std::string bindTime;
std::string privateIpAddress;
std::string bindInstanceType;
std::string bindInstanceRegionId;
std::vector<AnycastEipBindInfo::PopLocation> popLocations;
std::string associationMode;
};
@@ -50,8 +58,8 @@ namespace AlibabaCloud
std::string getCreateTime()const;
std::vector<AnycastEipBindInfo> getAnycastEipBindInfoList()const;
std::string getBusinessStatus()const;
std::string getName()const;
std::string getInternetChargeType()const;
std::string getName()const;
std::string getAnycastId()const;
std::string getServiceLocation()const;
int getBandwidth()const;
@@ -68,8 +76,8 @@ namespace AlibabaCloud
std::string createTime_;
std::vector<AnycastEipBindInfo> anycastEipBindInfoList_;
std::string businessStatus_;
std::string name_;
std::string internetChargeType_;
std::string name_;
std::string anycastId_;
std::string serviceLocation_;
int bandwidth_;

View File

@@ -35,16 +35,18 @@ namespace AlibabaCloud
ListAnycastEipAddressesRequest();
~ListAnycastEipAddressesRequest();
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
std::string getInstanceChargeType()const;
void setInstanceChargeType(const std::string& instanceChargeType);
std::string getBusinessStatus()const;
void setBusinessStatus(const std::string& businessStatus);
std::string getServiceLocation()const;
void setServiceLocation(const std::string& serviceLocation);
std::string getAnycastEipAddress()const;
void setAnycastEipAddress(const std::string& anycastEipAddress);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getNextToken()const;
void setNextToken(const std::string& nextToken);
std::string getInternetChargeType()const;
void setInternetChargeType(const std::string& internetChargeType);
std::string getAnycastId()const;
@@ -55,23 +57,21 @@ namespace AlibabaCloud
void setBindInstanceIds(const std::vector<std::string>& bindInstanceIds);
int getMaxResults()const;
void setMaxResults(int maxResults);
std::string getInstanceChargeType()const;
void setInstanceChargeType(const std::string& instanceChargeType);
std::string getStatus()const;
void setStatus(const std::string& status);
private:
std::string regionId_;
std::string nextToken_;
std::string instanceChargeType_;
std::string businessStatus_;
std::string serviceLocation_;
std::string anycastEipAddress_;
std::string regionId_;
std::string nextToken_;
std::string internetChargeType_;
std::string anycastId_;
std::string name_;
std::vector<std::string> bindInstanceIds_;
int maxResults_;
std::string instanceChargeType_;
std::string status_;
};

View File

@@ -47,8 +47,8 @@ namespace AlibabaCloud
std::string createTime;
std::vector<Anycast::AnycastEipBindInfo> anycastEipBindInfoList;
std::string businessStatus;
std::string name;
std::string internetChargeType;
std::string name;
std::string anycastId;
std::string serviceLocation;
int bandwidth;

View File

@@ -43,6 +43,8 @@ namespace AlibabaCloud
void setBindInstanceType(const std::string& bindInstanceType);
std::string getBindInstanceRegionId()const;
void setBindInstanceRegionId(const std::string& bindInstanceRegionId);
std::string getPrivateIpAddress()const;
void setPrivateIpAddress(const std::string& privateIpAddress);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAnycastId()const;
@@ -55,6 +57,7 @@ namespace AlibabaCloud
std::string clientToken_;
std::string bindInstanceType_;
std::string bindInstanceRegionId_;
std::string privateIpAddress_;
std::string regionId_;
std::string anycastId_;
std::string bindInstanceId_;

View File

@@ -0,0 +1,69 @@
/*
* 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_EIPANYCAST_MODEL_UPDATEANYCASTEIPADDRESSASSOCIATIONSREQUEST_H_
#define ALIBABACLOUD_EIPANYCAST_MODEL_UPDATEANYCASTEIPADDRESSASSOCIATIONSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/eipanycast/EipanycastExport.h>
namespace AlibabaCloud
{
namespace Eipanycast
{
namespace Model
{
class ALIBABACLOUD_EIPANYCAST_EXPORT UpdateAnycastEipAddressAssociationsRequest : public RpcServiceRequest
{
public:
UpdateAnycastEipAddressAssociationsRequest();
~UpdateAnycastEipAddressAssociationsRequest();
bool getDryRun()const;
void setDryRun(bool dryRun);
std::string getAssociationMode()const;
void setAssociationMode(const std::string& associationMode);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
Array getPopLocationDeleteList()const;
void setPopLocationDeleteList(const Array& popLocationDeleteList);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
std::string getAnycastId()const;
void setAnycastId(const std::string& anycastId);
Array getPopLocationAddList()const;
void setPopLocationAddList(const Array& popLocationAddList);
std::string getBindInstanceId()const;
void setBindInstanceId(const std::string& bindInstanceId);
private:
bool dryRun_;
std::string associationMode_;
std::string clientToken_;
Array popLocationDeleteList_;
std::string regionId_;
std::string anycastId_;
Array popLocationAddList_;
std::string bindInstanceId_;
};
}
}
}
#endif // !ALIBABACLOUD_EIPANYCAST_MODEL_UPDATEANYCASTEIPADDRESSASSOCIATIONSREQUEST_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_EIPANYCAST_MODEL_UPDATEANYCASTEIPADDRESSASSOCIATIONSRESULT_H_
#define ALIBABACLOUD_EIPANYCAST_MODEL_UPDATEANYCASTEIPADDRESSASSOCIATIONSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/eipanycast/EipanycastExport.h>
namespace AlibabaCloud
{
namespace Eipanycast
{
namespace Model
{
class ALIBABACLOUD_EIPANYCAST_EXPORT UpdateAnycastEipAddressAssociationsResult : public ServiceResult
{
public:
UpdateAnycastEipAddressAssociationsResult();
explicit UpdateAnycastEipAddressAssociationsResult(const std::string &payload);
~UpdateAnycastEipAddressAssociationsResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_EIPANYCAST_MODEL_UPDATEANYCASTEIPADDRESSASSOCIATIONSRESULT_H_

View File

@@ -411,3 +411,39 @@ EipanycastClient::UnassociateAnycastEipAddressOutcomeCallable EipanycastClient::
return task->get_future();
}
EipanycastClient::UpdateAnycastEipAddressAssociationsOutcome EipanycastClient::updateAnycastEipAddressAssociations(const UpdateAnycastEipAddressAssociationsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateAnycastEipAddressAssociationsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateAnycastEipAddressAssociationsOutcome(UpdateAnycastEipAddressAssociationsResult(outcome.result()));
else
return UpdateAnycastEipAddressAssociationsOutcome(outcome.error());
}
void EipanycastClient::updateAnycastEipAddressAssociationsAsync(const UpdateAnycastEipAddressAssociationsRequest& request, const UpdateAnycastEipAddressAssociationsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateAnycastEipAddressAssociations(request), context);
};
asyncExecute(new Runnable(fn));
}
EipanycastClient::UpdateAnycastEipAddressAssociationsOutcomeCallable EipanycastClient::updateAnycastEipAddressAssociationsCallable(const UpdateAnycastEipAddressAssociationsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateAnycastEipAddressAssociationsOutcome()>>(
[this, request]()
{
return this->updateAnycastEipAddressAssociations(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -38,6 +38,17 @@ void AssociateAnycastEipAddressRequest::setDryRun(bool dryRun)
setParameter("DryRun", dryRun ? "true" : "false");
}
std::string AssociateAnycastEipAddressRequest::getAssociationMode()const
{
return associationMode_;
}
void AssociateAnycastEipAddressRequest::setAssociationMode(const std::string& associationMode)
{
associationMode_ = associationMode;
setParameter("AssociationMode", associationMode);
}
std::string AssociateAnycastEipAddressRequest::getClientToken()const
{
return clientToken_;
@@ -49,6 +60,17 @@ void AssociateAnycastEipAddressRequest::setClientToken(const std::string& client
setParameter("ClientToken", clientToken);
}
Array AssociateAnycastEipAddressRequest::getPopLocations()const
{
return popLocations_;
}
void AssociateAnycastEipAddressRequest::setPopLocations(const Array& popLocations)
{
popLocations_ = popLocations;
setParameter("PopLocations", std::to_string(popLocations));
}
std::string AssociateAnycastEipAddressRequest::getBindInstanceType()const
{
return bindInstanceType_;
@@ -71,6 +93,17 @@ void AssociateAnycastEipAddressRequest::setBindInstanceRegionId(const std::strin
setParameter("BindInstanceRegionId", bindInstanceRegionId);
}
std::string AssociateAnycastEipAddressRequest::getPrivateIpAddress()const
{
return privateIpAddress_;
}
void AssociateAnycastEipAddressRequest::setPrivateIpAddress(const std::string& privateIpAddress)
{
privateIpAddress_ = privateIpAddress;
setParameter("PrivateIpAddress", privateIpAddress);
}
std::string AssociateAnycastEipAddressRequest::getRegionId()const
{
return regionId_;

View File

@@ -27,6 +27,17 @@ DescribeAnycastEipAddressRequest::DescribeAnycastEipAddressRequest() :
DescribeAnycastEipAddressRequest::~DescribeAnycastEipAddressRequest()
{}
std::string DescribeAnycastEipAddressRequest::getIp()const
{
return ip_;
}
void DescribeAnycastEipAddressRequest::setIp(const std::string& ip)
{
ip_ = ip;
setParameter("Ip", ip);
}
std::string DescribeAnycastEipAddressRequest::getRegionId()const
{
return regionId_;

View File

@@ -43,42 +43,56 @@ void DescribeAnycastEipAddressResult::parse(const std::string &payload)
for (auto valueAnycastEipBindInfoListAnycastEipBindInfo : allAnycastEipBindInfoListNode)
{
AnycastEipBindInfo anycastEipBindInfoListObject;
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].isNull())
anycastEipBindInfoListObject.bindInstanceId = valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceType"].isNull())
anycastEipBindInfoListObject.bindInstanceType = valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceType"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["BindTime"].isNull())
anycastEipBindInfoListObject.bindTime = valueAnycastEipBindInfoListAnycastEipBindInfo["BindTime"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["Status"].isNull())
anycastEipBindInfoListObject.status = valueAnycastEipBindInfoListAnycastEipBindInfo["Status"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceRegionId"].isNull())
anycastEipBindInfoListObject.bindInstanceRegionId = valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceRegionId"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].isNull())
anycastEipBindInfoListObject.bindInstanceId = valueAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["AssociationMode"].isNull())
anycastEipBindInfoListObject.associationMode = valueAnycastEipBindInfoListAnycastEipBindInfo["AssociationMode"].asString();
if(!valueAnycastEipBindInfoListAnycastEipBindInfo["PrivateIpAddress"].isNull())
anycastEipBindInfoListObject.privateIpAddress = valueAnycastEipBindInfoListAnycastEipBindInfo["PrivateIpAddress"].asString();
auto allPopLocationsNode = valueAnycastEipBindInfoListAnycastEipBindInfo["PopLocations"]["PopLocation"];
for (auto valueAnycastEipBindInfoListAnycastEipBindInfoPopLocationsPopLocation : allPopLocationsNode)
{
AnycastEipBindInfo::PopLocation popLocationsObject;
if(!valueAnycastEipBindInfoListAnycastEipBindInfoPopLocationsPopLocation["PopLocation"].isNull())
popLocationsObject.popLocation = valueAnycastEipBindInfoListAnycastEipBindInfoPopLocationsPopLocation["PopLocation"].asString();
anycastEipBindInfoListObject.popLocations.push_back(popLocationsObject);
}
anycastEipBindInfoList_.push_back(anycastEipBindInfoListObject);
}
if(!value["AnycastId"].isNull())
anycastId_ = value["AnycastId"].asString();
if(!value["IpAddress"].isNull())
ipAddress_ = value["IpAddress"].asString();
if(!value["Name"].isNull())
name_ = value["Name"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["Bandwidth"].isNull())
bandwidth_ = std::stoi(value["Bandwidth"].asString());
if(!value["InstanceChargeType"].isNull())
instanceChargeType_ = value["InstanceChargeType"].asString();
if(!value["InternetChargeType"].isNull())
internetChargeType_ = value["InternetChargeType"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["ServiceLocation"].isNull())
serviceLocation_ = value["ServiceLocation"].asString();
if(!value["AliUid"].isNull())
aliUid_ = std::stol(value["AliUid"].asString());
if(!value["Bid"].isNull())
bid_ = value["Bid"].asString();
if(!value["Description"].isNull())
description_ = value["Description"].asString();
if(!value["InstanceChargeType"].isNull())
instanceChargeType_ = value["InstanceChargeType"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["BusinessStatus"].isNull())
businessStatus_ = value["BusinessStatus"].asString();
if(!value["InternetChargeType"].isNull())
internetChargeType_ = value["InternetChargeType"].asString();
if(!value["Name"].isNull())
name_ = value["Name"].asString();
if(!value["AnycastId"].isNull())
anycastId_ = value["AnycastId"].asString();
if(!value["ServiceLocation"].isNull())
serviceLocation_ = value["ServiceLocation"].asString();
if(!value["Bandwidth"].isNull())
bandwidth_ = std::stoi(value["Bandwidth"].asString());
if(!value["IpAddress"].isNull())
ipAddress_ = value["IpAddress"].asString();
if(!value["Bid"].isNull())
bid_ = value["Bid"].asString();
if(!value["AliUid"].isNull())
aliUid_ = std::stol(value["AliUid"].asString());
}
@@ -112,16 +126,16 @@ std::string DescribeAnycastEipAddressResult::getBusinessStatus()const
return businessStatus_;
}
std::string DescribeAnycastEipAddressResult::getName()const
{
return name_;
}
std::string DescribeAnycastEipAddressResult::getInternetChargeType()const
{
return internetChargeType_;
}
std::string DescribeAnycastEipAddressResult::getName()const
{
return name_;
}
std::string DescribeAnycastEipAddressResult::getAnycastId()const
{
return anycastId_;

View File

@@ -43,10 +43,10 @@ void DescribeAnycastPopLocationsResult::parse(const std::string &payload)
for (auto valueAnycastPopLocationListAnycastPopLocation : allAnycastPopLocationListNode)
{
AnycastPopLocation anycastPopLocationListObject;
if(!valueAnycastPopLocationListAnycastPopLocation["RegionId"].isNull())
anycastPopLocationListObject.regionId = valueAnycastPopLocationListAnycastPopLocation["RegionId"].asString();
if(!valueAnycastPopLocationListAnycastPopLocation["RegionName"].isNull())
anycastPopLocationListObject.regionName = valueAnycastPopLocationListAnycastPopLocation["RegionName"].asString();
if(!valueAnycastPopLocationListAnycastPopLocation["RegionId"].isNull())
anycastPopLocationListObject.regionId = valueAnycastPopLocationListAnycastPopLocation["RegionId"].asString();
anycastPopLocationList_.push_back(anycastPopLocationListObject);
}
if(!value["Count"].isNull())

View File

@@ -43,10 +43,10 @@ void DescribeAnycastServerRegionsResult::parse(const std::string &payload)
for (auto valueAnycastServerRegionListAnycastServerRegion : allAnycastServerRegionListNode)
{
AnycastServerRegion anycastServerRegionListObject;
if(!valueAnycastServerRegionListAnycastServerRegion["RegionId"].isNull())
anycastServerRegionListObject.regionId = valueAnycastServerRegionListAnycastServerRegion["RegionId"].asString();
if(!valueAnycastServerRegionListAnycastServerRegion["RegionName"].isNull())
anycastServerRegionListObject.regionName = valueAnycastServerRegionListAnycastServerRegion["RegionName"].asString();
if(!valueAnycastServerRegionListAnycastServerRegion["RegionId"].isNull())
anycastServerRegionListObject.regionId = valueAnycastServerRegionListAnycastServerRegion["RegionId"].asString();
anycastServerRegionList_.push_back(anycastServerRegionListObject);
}
if(!value["Count"].isNull())

View File

@@ -27,6 +27,39 @@ ListAnycastEipAddressesRequest::ListAnycastEipAddressesRequest() :
ListAnycastEipAddressesRequest::~ListAnycastEipAddressesRequest()
{}
std::string ListAnycastEipAddressesRequest::getRegionId()const
{
return regionId_;
}
void ListAnycastEipAddressesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ListAnycastEipAddressesRequest::getNextToken()const
{
return nextToken_;
}
void ListAnycastEipAddressesRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
std::string ListAnycastEipAddressesRequest::getInstanceChargeType()const
{
return instanceChargeType_;
}
void ListAnycastEipAddressesRequest::setInstanceChargeType(const std::string& instanceChargeType)
{
instanceChargeType_ = instanceChargeType;
setParameter("InstanceChargeType", instanceChargeType);
}
std::string ListAnycastEipAddressesRequest::getBusinessStatus()const
{
return businessStatus_;
@@ -60,28 +93,6 @@ void ListAnycastEipAddressesRequest::setAnycastEipAddress(const std::string& any
setParameter("AnycastEipAddress", anycastEipAddress);
}
std::string ListAnycastEipAddressesRequest::getRegionId()const
{
return regionId_;
}
void ListAnycastEipAddressesRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string ListAnycastEipAddressesRequest::getNextToken()const
{
return nextToken_;
}
void ListAnycastEipAddressesRequest::setNextToken(const std::string& nextToken)
{
nextToken_ = nextToken;
setParameter("NextToken", nextToken);
}
std::string ListAnycastEipAddressesRequest::getInternetChargeType()const
{
return internetChargeType_;
@@ -139,17 +150,6 @@ void ListAnycastEipAddressesRequest::setMaxResults(int maxResults)
setParameter("MaxResults", std::to_string(maxResults));
}
std::string ListAnycastEipAddressesRequest::getInstanceChargeType()const
{
return instanceChargeType_;
}
void ListAnycastEipAddressesRequest::setInstanceChargeType(const std::string& instanceChargeType)
{
instanceChargeType_ = instanceChargeType;
setParameter("InstanceChargeType", instanceChargeType);
}
std::string ListAnycastEipAddressesRequest::getStatus()const
{
return status_;

View File

@@ -43,44 +43,44 @@ void ListAnycastEipAddressesResult::parse(const std::string &payload)
for (auto valueAnycastListAnycast : allAnycastListNode)
{
Anycast anycastListObject;
if(!valueAnycastListAnycast["AnycastId"].isNull())
anycastListObject.anycastId = valueAnycastListAnycast["AnycastId"].asString();
if(!valueAnycastListAnycast["IpAddress"].isNull())
anycastListObject.ipAddress = valueAnycastListAnycast["IpAddress"].asString();
if(!valueAnycastListAnycast["Name"].isNull())
anycastListObject.name = valueAnycastListAnycast["Name"].asString();
if(!valueAnycastListAnycast["Description"].isNull())
anycastListObject.description = valueAnycastListAnycast["Description"].asString();
if(!valueAnycastListAnycast["Bandwidth"].isNull())
anycastListObject.bandwidth = std::stoi(valueAnycastListAnycast["Bandwidth"].asString());
if(!valueAnycastListAnycast["InstanceChargeType"].isNull())
anycastListObject.instanceChargeType = valueAnycastListAnycast["InstanceChargeType"].asString();
if(!valueAnycastListAnycast["InternetChargeType"].isNull())
anycastListObject.internetChargeType = valueAnycastListAnycast["InternetChargeType"].asString();
if(!valueAnycastListAnycast["CreateTime"].isNull())
anycastListObject.createTime = valueAnycastListAnycast["CreateTime"].asString();
if(!valueAnycastListAnycast["Status"].isNull())
anycastListObject.status = valueAnycastListAnycast["Status"].asString();
if(!valueAnycastListAnycast["ServiceLocation"].isNull())
anycastListObject.serviceLocation = valueAnycastListAnycast["ServiceLocation"].asString();
if(!valueAnycastListAnycast["CreateTime"].isNull())
anycastListObject.createTime = valueAnycastListAnycast["CreateTime"].asString();
if(!valueAnycastListAnycast["AnycastId"].isNull())
anycastListObject.anycastId = valueAnycastListAnycast["AnycastId"].asString();
if(!valueAnycastListAnycast["AliUid"].isNull())
anycastListObject.aliUid = std::stol(valueAnycastListAnycast["AliUid"].asString());
if(!valueAnycastListAnycast["Bid"].isNull())
anycastListObject.bid = valueAnycastListAnycast["Bid"].asString();
if(!valueAnycastListAnycast["ServiceLocation"].isNull())
anycastListObject.serviceLocation = valueAnycastListAnycast["ServiceLocation"].asString();
if(!valueAnycastListAnycast["InstanceChargeType"].isNull())
anycastListObject.instanceChargeType = valueAnycastListAnycast["InstanceChargeType"].asString();
if(!valueAnycastListAnycast["IpAddress"].isNull())
anycastListObject.ipAddress = valueAnycastListAnycast["IpAddress"].asString();
if(!valueAnycastListAnycast["Bandwidth"].isNull())
anycastListObject.bandwidth = std::stoi(valueAnycastListAnycast["Bandwidth"].asString());
if(!valueAnycastListAnycast["Description"].isNull())
anycastListObject.description = valueAnycastListAnycast["Description"].asString();
if(!valueAnycastListAnycast["InternetChargeType"].isNull())
anycastListObject.internetChargeType = valueAnycastListAnycast["InternetChargeType"].asString();
if(!valueAnycastListAnycast["BusinessStatus"].isNull())
anycastListObject.businessStatus = valueAnycastListAnycast["BusinessStatus"].asString();
if(!valueAnycastListAnycast["Name"].isNull())
anycastListObject.name = valueAnycastListAnycast["Name"].asString();
auto allAnycastEipBindInfoListNode = valueAnycastListAnycast["AnycastEipBindInfoList"]["AnycastEipBindInfo"];
for (auto valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo : allAnycastEipBindInfoListNode)
{
Anycast::AnycastEipBindInfo anycastEipBindInfoListObject;
if(!valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].isNull())
anycastEipBindInfoListObject.bindInstanceId = valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].asString();
if(!valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceType"].isNull())
anycastEipBindInfoListObject.bindInstanceType = valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceType"].asString();
if(!valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindTime"].isNull())
anycastEipBindInfoListObject.bindTime = valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindTime"].asString();
if(!valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceRegionId"].isNull())
anycastEipBindInfoListObject.bindInstanceRegionId = valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceRegionId"].asString();
if(!valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].isNull())
anycastEipBindInfoListObject.bindInstanceId = valueAnycastListAnycastAnycastEipBindInfoListAnycastEipBindInfo["BindInstanceId"].asString();
anycastListObject.anycastEipBindInfoList.push_back(anycastEipBindInfoListObject);
}
anycastList_.push_back(anycastListObject);

View File

@@ -71,6 +71,17 @@ void UnassociateAnycastEipAddressRequest::setBindInstanceRegionId(const std::str
setParameter("BindInstanceRegionId", bindInstanceRegionId);
}
std::string UnassociateAnycastEipAddressRequest::getPrivateIpAddress()const
{
return privateIpAddress_;
}
void UnassociateAnycastEipAddressRequest::setPrivateIpAddress(const std::string& privateIpAddress)
{
privateIpAddress_ = privateIpAddress;
setParameter("PrivateIpAddress", privateIpAddress);
}
std::string UnassociateAnycastEipAddressRequest::getRegionId()const
{
return regionId_;

View File

@@ -0,0 +1,117 @@
/*
* 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/eipanycast/model/UpdateAnycastEipAddressAssociationsRequest.h>
using AlibabaCloud::Eipanycast::Model::UpdateAnycastEipAddressAssociationsRequest;
UpdateAnycastEipAddressAssociationsRequest::UpdateAnycastEipAddressAssociationsRequest() :
RpcServiceRequest("eipanycast", "2020-03-09", "UpdateAnycastEipAddressAssociations")
{
setMethod(HttpRequest::Method::Post);
}
UpdateAnycastEipAddressAssociationsRequest::~UpdateAnycastEipAddressAssociationsRequest()
{}
bool UpdateAnycastEipAddressAssociationsRequest::getDryRun()const
{
return dryRun_;
}
void UpdateAnycastEipAddressAssociationsRequest::setDryRun(bool dryRun)
{
dryRun_ = dryRun;
setParameter("DryRun", dryRun ? "true" : "false");
}
std::string UpdateAnycastEipAddressAssociationsRequest::getAssociationMode()const
{
return associationMode_;
}
void UpdateAnycastEipAddressAssociationsRequest::setAssociationMode(const std::string& associationMode)
{
associationMode_ = associationMode;
setParameter("AssociationMode", associationMode);
}
std::string UpdateAnycastEipAddressAssociationsRequest::getClientToken()const
{
return clientToken_;
}
void UpdateAnycastEipAddressAssociationsRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
Array UpdateAnycastEipAddressAssociationsRequest::getPopLocationDeleteList()const
{
return popLocationDeleteList_;
}
void UpdateAnycastEipAddressAssociationsRequest::setPopLocationDeleteList(const Array& popLocationDeleteList)
{
popLocationDeleteList_ = popLocationDeleteList;
setParameter("PopLocationDeleteList", std::to_string(popLocationDeleteList));
}
std::string UpdateAnycastEipAddressAssociationsRequest::getRegionId()const
{
return regionId_;
}
void UpdateAnycastEipAddressAssociationsRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}
std::string UpdateAnycastEipAddressAssociationsRequest::getAnycastId()const
{
return anycastId_;
}
void UpdateAnycastEipAddressAssociationsRequest::setAnycastId(const std::string& anycastId)
{
anycastId_ = anycastId;
setParameter("AnycastId", anycastId);
}
Array UpdateAnycastEipAddressAssociationsRequest::getPopLocationAddList()const
{
return popLocationAddList_;
}
void UpdateAnycastEipAddressAssociationsRequest::setPopLocationAddList(const Array& popLocationAddList)
{
popLocationAddList_ = popLocationAddList;
setParameter("PopLocationAddList", std::to_string(popLocationAddList));
}
std::string UpdateAnycastEipAddressAssociationsRequest::getBindInstanceId()const
{
return bindInstanceId_;
}
void UpdateAnycastEipAddressAssociationsRequest::setBindInstanceId(const std::string& bindInstanceId)
{
bindInstanceId_ = bindInstanceId;
setParameter("BindInstanceId", bindInstanceId);
}

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/eipanycast/model/UpdateAnycastEipAddressAssociationsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Eipanycast;
using namespace AlibabaCloud::Eipanycast::Model;
UpdateAnycastEipAddressAssociationsResult::UpdateAnycastEipAddressAssociationsResult() :
ServiceResult()
{}
UpdateAnycastEipAddressAssociationsResult::UpdateAnycastEipAddressAssociationsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateAnycastEipAddressAssociationsResult::~UpdateAnycastEipAddressAssociationsResult()
{}
void UpdateAnycastEipAddressAssociationsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}