From 5fb8057a45dbda4f37464197627d973eaa9fe479 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Thu, 24 Feb 2022 03:54:57 +0000 Subject: [PATCH] Add UpdateAnycastEipAddressAssociations Interface. --- CHANGELOG | 3 + VERSION | 2 +- eipanycast/CMakeLists.txt | 8 +- .../eipanycast/EipanycastClient.h | 8 ++ .../model/AssociateAnycastEipAddressRequest.h | 9 ++ .../model/DescribeAnycastEipAddressRequest.h | 3 + .../model/DescribeAnycastEipAddressResult.h | 12 +- .../model/ListAnycastEipAddressesRequest.h | 18 +-- .../model/ListAnycastEipAddressesResult.h | 2 +- .../UnassociateAnycastEipAddressRequest.h | 3 + ...dateAnycastEipAddressAssociationsRequest.h | 69 +++++++++++ ...pdateAnycastEipAddressAssociationsResult.h | 49 ++++++++ eipanycast/src/EipanycastClient.cc | 36 ++++++ .../AssociateAnycastEipAddressRequest.cc | 33 +++++ .../model/DescribeAnycastEipAddressRequest.cc | 11 ++ .../model/DescribeAnycastEipAddressResult.cc | 72 ++++++----- .../DescribeAnycastPopLocationsResult.cc | 4 +- .../DescribeAnycastServerRegionsResult.cc | 4 +- .../model/ListAnycastEipAddressesRequest.cc | 66 +++++----- .../model/ListAnycastEipAddressesResult.cc | 40 +++--- .../UnassociateAnycastEipAddressRequest.cc | 11 ++ ...ateAnycastEipAddressAssociationsRequest.cc | 117 ++++++++++++++++++ ...dateAnycastEipAddressAssociationsResult.cc | 44 +++++++ 23 files changed, 523 insertions(+), 101 deletions(-) create mode 100644 eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsRequest.h create mode 100644 eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsResult.h create mode 100644 eipanycast/src/model/UpdateAnycastEipAddressAssociationsRequest.cc create mode 100644 eipanycast/src/model/UpdateAnycastEipAddressAssociationsResult.cc diff --git a/CHANGELOG b/CHANGELOG index 251bde7e3..0576de4c4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2022-02-24 Version: 1.36.1068 +- Add UpdateAnycastEipAddressAssociations Interface. + 2022-02-23 Version: 1.36.1067 - SDK. diff --git a/VERSION b/VERSION index 18c2b9655..2a0502ad3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1067 \ No newline at end of file +1.36.1068 \ No newline at end of file diff --git a/eipanycast/CMakeLists.txt b/eipanycast/CMakeLists.txt index 552d2fa4b..05d8cb9c4 100644 --- a/eipanycast/CMakeLists.txt +++ b/eipanycast/CMakeLists.txt @@ -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} diff --git a/eipanycast/include/alibabacloud/eipanycast/EipanycastClient.h b/eipanycast/include/alibabacloud/eipanycast/EipanycastClient.h index 2fb6e277a..0e32693bf 100644 --- a/eipanycast/include/alibabacloud/eipanycast/EipanycastClient.h +++ b/eipanycast/include/alibabacloud/eipanycast/EipanycastClient.h @@ -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 UnassociateAnycastEipAddressOutcome; typedef std::future UnassociateAnycastEipAddressOutcomeCallable; typedef std::function&)> UnassociateAnycastEipAddressAsyncHandler; + typedef Outcome UpdateAnycastEipAddressAssociationsOutcome; + typedef std::future UpdateAnycastEipAddressAssociationsOutcomeCallable; + typedef std::function&)> UpdateAnycastEipAddressAssociationsAsyncHandler; EipanycastClient(const Credentials &credentials, const ClientConfiguration &configuration); EipanycastClient(const std::shared_ptr &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& 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& context = nullptr) const; + UpdateAnycastEipAddressAssociationsOutcomeCallable updateAnycastEipAddressAssociationsCallable(const Model::UpdateAnycastEipAddressAssociationsRequest& request) const; private: std::shared_ptr endpointProvider_; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/AssociateAnycastEipAddressRequest.h b/eipanycast/include/alibabacloud/eipanycast/model/AssociateAnycastEipAddressRequest.h index 467871d49..841dc9ca9 100644 --- a/eipanycast/include/alibabacloud/eipanycast/model/AssociateAnycastEipAddressRequest.h +++ b/eipanycast/include/alibabacloud/eipanycast/model/AssociateAnycastEipAddressRequest.h @@ -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_; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressRequest.h b/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressRequest.h index b7df4dbd5..c189da958 100644 --- a/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressRequest.h +++ b/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressRequest.h @@ -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_; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressResult.h b/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressResult.h index 760229b3b..16a662458 100644 --- a/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressResult.h +++ b/eipanycast/include/alibabacloud/eipanycast/model/DescribeAnycastEipAddressResult.h @@ -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 popLocations; + std::string associationMode; }; @@ -50,8 +58,8 @@ namespace AlibabaCloud std::string getCreateTime()const; std::vector 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 anycastEipBindInfoList_; std::string businessStatus_; - std::string name_; std::string internetChargeType_; + std::string name_; std::string anycastId_; std::string serviceLocation_; int bandwidth_; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesRequest.h b/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesRequest.h index 284480226..9b4ebd572 100644 --- a/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesRequest.h +++ b/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesRequest.h @@ -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& 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 bindInstanceIds_; int maxResults_; - std::string instanceChargeType_; std::string status_; }; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesResult.h b/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesResult.h index 3924a7ccc..b3f593559 100644 --- a/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesResult.h +++ b/eipanycast/include/alibabacloud/eipanycast/model/ListAnycastEipAddressesResult.h @@ -47,8 +47,8 @@ namespace AlibabaCloud std::string createTime; std::vector anycastEipBindInfoList; std::string businessStatus; - std::string name; std::string internetChargeType; + std::string name; std::string anycastId; std::string serviceLocation; int bandwidth; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressRequest.h b/eipanycast/include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressRequest.h index 6bfff3ca0..c291a4181 100644 --- a/eipanycast/include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressRequest.h +++ b/eipanycast/include/alibabacloud/eipanycast/model/UnassociateAnycastEipAddressRequest.h @@ -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_; diff --git a/eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsRequest.h b/eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsRequest.h new file mode 100644 index 000000000..f00d06ff9 --- /dev/null +++ b/eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsRequest.h @@ -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 +#include +#include +#include + +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_ \ No newline at end of file diff --git a/eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsResult.h b/eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsResult.h new file mode 100644 index 000000000..5ff965655 --- /dev/null +++ b/eipanycast/include/alibabacloud/eipanycast/model/UpdateAnycastEipAddressAssociationsResult.h @@ -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 +#include +#include +#include +#include + +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_ \ No newline at end of file diff --git a/eipanycast/src/EipanycastClient.cc b/eipanycast/src/EipanycastClient.cc index 2b6d060db..075c3149c 100644 --- a/eipanycast/src/EipanycastClient.cc +++ b/eipanycast/src/EipanycastClient.cc @@ -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& 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>( + [this, request]() + { + return this->updateAnycastEipAddressAssociations(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/eipanycast/src/model/AssociateAnycastEipAddressRequest.cc b/eipanycast/src/model/AssociateAnycastEipAddressRequest.cc index 1ed770bf5..5087c5d50 100644 --- a/eipanycast/src/model/AssociateAnycastEipAddressRequest.cc +++ b/eipanycast/src/model/AssociateAnycastEipAddressRequest.cc @@ -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_; diff --git a/eipanycast/src/model/DescribeAnycastEipAddressRequest.cc b/eipanycast/src/model/DescribeAnycastEipAddressRequest.cc index 856ad52fd..fc99cadad 100644 --- a/eipanycast/src/model/DescribeAnycastEipAddressRequest.cc +++ b/eipanycast/src/model/DescribeAnycastEipAddressRequest.cc @@ -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_; diff --git a/eipanycast/src/model/DescribeAnycastEipAddressResult.cc b/eipanycast/src/model/DescribeAnycastEipAddressResult.cc index 51a008ad7..23fae809e 100644 --- a/eipanycast/src/model/DescribeAnycastEipAddressResult.cc +++ b/eipanycast/src/model/DescribeAnycastEipAddressResult.cc @@ -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_; diff --git a/eipanycast/src/model/DescribeAnycastPopLocationsResult.cc b/eipanycast/src/model/DescribeAnycastPopLocationsResult.cc index dc0f305aa..6d0d48e17 100644 --- a/eipanycast/src/model/DescribeAnycastPopLocationsResult.cc +++ b/eipanycast/src/model/DescribeAnycastPopLocationsResult.cc @@ -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()) diff --git a/eipanycast/src/model/DescribeAnycastServerRegionsResult.cc b/eipanycast/src/model/DescribeAnycastServerRegionsResult.cc index f6fc39d6c..79a150874 100644 --- a/eipanycast/src/model/DescribeAnycastServerRegionsResult.cc +++ b/eipanycast/src/model/DescribeAnycastServerRegionsResult.cc @@ -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()) diff --git a/eipanycast/src/model/ListAnycastEipAddressesRequest.cc b/eipanycast/src/model/ListAnycastEipAddressesRequest.cc index 053a22017..b83debe0a 100644 --- a/eipanycast/src/model/ListAnycastEipAddressesRequest.cc +++ b/eipanycast/src/model/ListAnycastEipAddressesRequest.cc @@ -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_; diff --git a/eipanycast/src/model/ListAnycastEipAddressesResult.cc b/eipanycast/src/model/ListAnycastEipAddressesResult.cc index 39dafa020..ec37a698c 100644 --- a/eipanycast/src/model/ListAnycastEipAddressesResult.cc +++ b/eipanycast/src/model/ListAnycastEipAddressesResult.cc @@ -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); diff --git a/eipanycast/src/model/UnassociateAnycastEipAddressRequest.cc b/eipanycast/src/model/UnassociateAnycastEipAddressRequest.cc index 6ae9ee71f..f35e43edf 100644 --- a/eipanycast/src/model/UnassociateAnycastEipAddressRequest.cc +++ b/eipanycast/src/model/UnassociateAnycastEipAddressRequest.cc @@ -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_; diff --git a/eipanycast/src/model/UpdateAnycastEipAddressAssociationsRequest.cc b/eipanycast/src/model/UpdateAnycastEipAddressAssociationsRequest.cc new file mode 100644 index 000000000..aa00c6102 --- /dev/null +++ b/eipanycast/src/model/UpdateAnycastEipAddressAssociationsRequest.cc @@ -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 + +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); +} + diff --git a/eipanycast/src/model/UpdateAnycastEipAddressAssociationsResult.cc b/eipanycast/src/model/UpdateAnycastEipAddressAssociationsResult.cc new file mode 100644 index 000000000..234a380a3 --- /dev/null +++ b/eipanycast/src/model/UpdateAnycastEipAddressAssociationsResult.cc @@ -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 +#include + +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()); + +} +