Add CheckProductOpen.
This commit is contained in:
@@ -195,6 +195,42 @@ PrivatelinkClient::AttachSecurityGroupToVpcEndpointOutcomeCallable PrivatelinkCl
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PrivatelinkClient::CheckProductOpenOutcome PrivatelinkClient::checkProductOpen(const CheckProductOpenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CheckProductOpenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CheckProductOpenOutcome(CheckProductOpenResult(outcome.result()));
|
||||
else
|
||||
return CheckProductOpenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void PrivatelinkClient::checkProductOpenAsync(const CheckProductOpenRequest& request, const CheckProductOpenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, checkProductOpen(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
PrivatelinkClient::CheckProductOpenOutcomeCallable PrivatelinkClient::checkProductOpenCallable(const CheckProductOpenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CheckProductOpenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->checkProductOpen(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
PrivatelinkClient::CreateVpcEndpointOutcome PrivatelinkClient::createVpcEndpoint(const CreateVpcEndpointRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -38,15 +38,15 @@ void AddUserToVpcEndpointServiceRequest::setClientToken(const std::string& clien
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string AddUserToVpcEndpointServiceRequest::getUserId()const
|
||||
long AddUserToVpcEndpointServiceRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void AddUserToVpcEndpointServiceRequest::setUserId(const std::string& userId)
|
||||
void AddUserToVpcEndpointServiceRequest::setUserId(long userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
setParameter("UserId", std::to_string(userId));
|
||||
}
|
||||
|
||||
std::string AddUserToVpcEndpointServiceRequest::getRegionId()const
|
||||
|
||||
@@ -71,6 +71,17 @@ void AddZoneToVpcEndpointRequest::setDryRun(bool dryRun)
|
||||
setParameter("DryRun", dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string AddZoneToVpcEndpointRequest::getIp()const
|
||||
{
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void AddZoneToVpcEndpointRequest::setIp(const std::string& ip)
|
||||
{
|
||||
ip_ = ip;
|
||||
setParameter("Ip", ip);
|
||||
}
|
||||
|
||||
std::string AddZoneToVpcEndpointRequest::getVSwitchId()const
|
||||
{
|
||||
return vSwitchId_;
|
||||
|
||||
40
privatelink/src/model/CheckProductOpenRequest.cc
Normal file
40
privatelink/src/model/CheckProductOpenRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/privatelink/model/CheckProductOpenRequest.h>
|
||||
|
||||
using AlibabaCloud::Privatelink::Model::CheckProductOpenRequest;
|
||||
|
||||
CheckProductOpenRequest::CheckProductOpenRequest() :
|
||||
RpcServiceRequest("privatelink", "2020-04-15", "CheckProductOpen")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CheckProductOpenRequest::~CheckProductOpenRequest()
|
||||
{}
|
||||
|
||||
std::string CheckProductOpenRequest::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CheckProductOpenRequest::setRegionId(const std::string& regionId)
|
||||
{
|
||||
regionId_ = regionId;
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
51
privatelink/src/model/CheckProductOpenResult.cc
Normal file
51
privatelink/src/model/CheckProductOpenResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/privatelink/model/CheckProductOpenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Privatelink;
|
||||
using namespace AlibabaCloud::Privatelink::Model;
|
||||
|
||||
CheckProductOpenResult::CheckProductOpenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CheckProductOpenResult::CheckProductOpenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CheckProductOpenResult::~CheckProductOpenResult()
|
||||
{}
|
||||
|
||||
void CheckProductOpenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
bool CheckProductOpenResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ void CreateVpcEndpointRequest::setZone(const std::vector<Zone>& zone)
|
||||
std::string zoneObjStr = "Zone." + std::to_string(dep1 + 1);
|
||||
setParameter(zoneObjStr + ".VSwitchId", zoneObj.vSwitchId);
|
||||
setParameter(zoneObjStr + ".ZoneId", zoneObj.zoneId);
|
||||
setParameter(zoneObjStr + ".Ip", zoneObj.ip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,30 +39,30 @@ void CreateVpcEndpointResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["EndpointId"].isNull())
|
||||
endpointId_ = value["EndpointId"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["EndpointStatus"].isNull())
|
||||
endpointStatus_ = value["EndpointStatus"].asString();
|
||||
if(!value["EndpointName"].isNull())
|
||||
endpointName_ = value["EndpointName"].asString();
|
||||
if(!value["VpcId"].isNull())
|
||||
vpcId_ = value["VpcId"].asString();
|
||||
if(!value["EndpointDescription"].isNull())
|
||||
endpointDescription_ = value["EndpointDescription"].asString();
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["EndpointBusinessStatus"].isNull())
|
||||
endpointBusinessStatus_ = value["EndpointBusinessStatus"].asString();
|
||||
if(!value["EndpointStatus"].isNull())
|
||||
endpointStatus_ = value["EndpointStatus"].asString();
|
||||
if(!value["ConnectionStatus"].isNull())
|
||||
connectionStatus_ = value["ConnectionStatus"].asString();
|
||||
if(!value["EndpointDomain"].isNull())
|
||||
endpointDomain_ = value["EndpointDomain"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["EndpointId"].isNull())
|
||||
endpointId_ = value["EndpointId"].asString();
|
||||
if(!value["Bandwidth"].isNull())
|
||||
bandwidth_ = std::stol(value["Bandwidth"].asString());
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["EndpointBusinessStatus"].isNull())
|
||||
endpointBusinessStatus_ = value["EndpointBusinessStatus"].asString();
|
||||
if(!value["EndpointDescription"].isNull())
|
||||
endpointDescription_ = value["EndpointDescription"].asString();
|
||||
if(!value["ConnectionStatus"].isNull())
|
||||
connectionStatus_ = value["ConnectionStatus"].asString();
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -96,16 +96,16 @@ std::string CreateVpcEndpointResult::getEndpointId()const
|
||||
return endpointId_;
|
||||
}
|
||||
|
||||
std::string CreateVpcEndpointResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
long CreateVpcEndpointResult::getBandwidth()const
|
||||
{
|
||||
return bandwidth_;
|
||||
}
|
||||
|
||||
std::string CreateVpcEndpointResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string CreateVpcEndpointResult::getEndpointBusinessStatus()const
|
||||
{
|
||||
return endpointBusinessStatus_;
|
||||
|
||||
@@ -71,6 +71,17 @@ void CreateVpcEndpointServiceRequest::setRegionId(const std::string& regionId)
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
bool CreateVpcEndpointServiceRequest::getZoneAffinityEnabled()const
|
||||
{
|
||||
return zoneAffinityEnabled_;
|
||||
}
|
||||
|
||||
void CreateVpcEndpointServiceRequest::setZoneAffinityEnabled(bool zoneAffinityEnabled)
|
||||
{
|
||||
zoneAffinityEnabled_ = zoneAffinityEnabled;
|
||||
setParameter("ZoneAffinityEnabled", zoneAffinityEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
bool CreateVpcEndpointServiceRequest::getDryRun()const
|
||||
{
|
||||
return dryRun_;
|
||||
@@ -93,8 +104,8 @@ void CreateVpcEndpointServiceRequest::setResource(const std::vector<Resource>& r
|
||||
for(int dep1 = 0; dep1!= resource.size(); dep1++) {
|
||||
auto resourceObj = resource.at(dep1);
|
||||
std::string resourceObjStr = "Resource." + std::to_string(dep1 + 1);
|
||||
setParameter(resourceObjStr + ".ResourceId", resourceObj.resourceId);
|
||||
setParameter(resourceObjStr + ".ResourceType", resourceObj.resourceType);
|
||||
setParameter(resourceObjStr + ".ResourceId", resourceObj.resourceId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,22 +39,24 @@ void CreateVpcEndpointServiceResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AutoAcceptEnabled"].isNull())
|
||||
autoAcceptEnabled_ = value["AutoAcceptEnabled"].asString() == "true";
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ServiceBusinessStatus"].isNull())
|
||||
serviceBusinessStatus_ = value["ServiceBusinessStatus"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["ServiceDescription"].isNull())
|
||||
serviceDescription_ = value["ServiceDescription"].asString();
|
||||
if(!value["ServiceStatus"].isNull())
|
||||
serviceStatus_ = value["ServiceStatus"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ZoneAffinityEnabled"].isNull())
|
||||
zoneAffinityEnabled_ = value["ZoneAffinityEnabled"].asString() == "true";
|
||||
if(!value["ServiceDomain"].isNull())
|
||||
serviceDomain_ = value["ServiceDomain"].asString();
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["ServiceStatus"].isNull())
|
||||
serviceStatus_ = value["ServiceStatus"].asString();
|
||||
if(!value["AutoAcceptEnabled"].isNull())
|
||||
autoAcceptEnabled_ = value["AutoAcceptEnabled"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
@@ -83,18 +85,23 @@ std::string CreateVpcEndpointServiceResult::getCreateTime()const
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
bool CreateVpcEndpointServiceResult::getZoneAffinityEnabled()const
|
||||
{
|
||||
return zoneAffinityEnabled_;
|
||||
}
|
||||
|
||||
std::string CreateVpcEndpointServiceResult::getServiceDomain()const
|
||||
{
|
||||
return serviceDomain_;
|
||||
}
|
||||
|
||||
bool CreateVpcEndpointServiceResult::getAutoAcceptEnabled()const
|
||||
{
|
||||
return autoAcceptEnabled_;
|
||||
}
|
||||
|
||||
std::string CreateVpcEndpointServiceResult::getServiceId()const
|
||||
{
|
||||
return serviceId_;
|
||||
}
|
||||
|
||||
bool CreateVpcEndpointServiceResult::getAutoAcceptEnabled()const
|
||||
{
|
||||
return autoAcceptEnabled_;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,36 +39,38 @@ void GetVpcEndpointAttributeResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Bandwidth"].isNull())
|
||||
bandwidth_ = std::stoi(value["Bandwidth"].asString());
|
||||
if(!value["ConnectionStatus"].isNull())
|
||||
connectionStatus_ = value["ConnectionStatus"].asString();
|
||||
if(!value["Payer"].isNull())
|
||||
payer_ = value["Payer"].asString();
|
||||
if(!value["EndpointDomain"].isNull())
|
||||
endpointDomain_ = value["EndpointDomain"].asString();
|
||||
if(!value["ResourceOwner"].isNull())
|
||||
resourceOwner_ = value["ResourceOwner"].asString() == "true";
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["EndpointBusinessStatus"].isNull())
|
||||
endpointBusinessStatus_ = value["EndpointBusinessStatus"].asString();
|
||||
if(!value["EndpointDescription"].isNull())
|
||||
endpointDescription_ = value["EndpointDescription"].asString();
|
||||
if(!value["EndpointDomain"].isNull())
|
||||
endpointDomain_ = value["EndpointDomain"].asString();
|
||||
if(!value["EndpointId"].isNull())
|
||||
endpointId_ = value["EndpointId"].asString();
|
||||
if(!value["EndpointName"].isNull())
|
||||
endpointName_ = value["EndpointName"].asString();
|
||||
if(!value["EndpointStatus"].isNull())
|
||||
endpointStatus_ = value["EndpointStatus"].asString();
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["EndpointStatus"].isNull())
|
||||
endpointStatus_ = value["EndpointStatus"].asString();
|
||||
if(!value["EndpointName"].isNull())
|
||||
endpointName_ = value["EndpointName"].asString();
|
||||
if(!value["VpcId"].isNull())
|
||||
vpcId_ = value["VpcId"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["EndpointId"].isNull())
|
||||
endpointId_ = value["EndpointId"].asString();
|
||||
if(!value["Bandwidth"].isNull())
|
||||
bandwidth_ = std::stoi(value["Bandwidth"].asString());
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
if(!value["Payer"].isNull())
|
||||
payer_ = value["Payer"].asString();
|
||||
if(!value["ResourceOwner"].isNull())
|
||||
resourceOwner_ = value["ResourceOwner"].asString() == "true";
|
||||
if(!value["ConnectionStatus"].isNull())
|
||||
connectionStatus_ = value["ConnectionStatus"].asString();
|
||||
if(!value["ZoneAffinityEnabled"].isNull())
|
||||
zoneAffinityEnabled_ = value["ZoneAffinityEnabled"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
@@ -82,16 +84,16 @@ std::string GetVpcEndpointAttributeResult::getEndpointDomain()const
|
||||
return endpointDomain_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointAttributeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
bool GetVpcEndpointAttributeResult::getResourceOwner()const
|
||||
{
|
||||
return resourceOwner_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointAttributeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointAttributeResult::getEndpointBusinessStatus()const
|
||||
{
|
||||
return endpointBusinessStatus_;
|
||||
@@ -127,16 +129,16 @@ std::string GetVpcEndpointAttributeResult::getServiceName()const
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
int GetVpcEndpointAttributeResult::getBandwidth()const
|
||||
{
|
||||
return bandwidth_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointAttributeResult::getEndpointId()const
|
||||
{
|
||||
return endpointId_;
|
||||
}
|
||||
|
||||
int GetVpcEndpointAttributeResult::getBandwidth()const
|
||||
{
|
||||
return bandwidth_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointAttributeResult::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
@@ -147,3 +149,8 @@ std::string GetVpcEndpointAttributeResult::getConnectionStatus()const
|
||||
return connectionStatus_;
|
||||
}
|
||||
|
||||
bool GetVpcEndpointAttributeResult::getZoneAffinityEnabled()const
|
||||
{
|
||||
return zoneAffinityEnabled_;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,32 +42,34 @@ void GetVpcEndpointServiceAttributeResult::parse(const std::string &payload)
|
||||
auto allZones = value["Zones"]["Zone"];
|
||||
for (const auto &item : allZones)
|
||||
zones_.push_back(item.asString());
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["ServiceDomain"].isNull())
|
||||
serviceDomain_ = value["ServiceDomain"].asString();
|
||||
if(!value["Payer"].isNull())
|
||||
payer_ = value["Payer"].asString();
|
||||
if(!value["ServiceDescription"].isNull())
|
||||
serviceDescription_ = value["ServiceDescription"].asString();
|
||||
if(!value["ServiceBusinessStatus"].isNull())
|
||||
serviceBusinessStatus_ = value["ServiceBusinessStatus"].asString();
|
||||
if(!value["ServiceStatus"].isNull())
|
||||
serviceStatus_ = value["ServiceStatus"].asString();
|
||||
if(!value["AutoAcceptEnabled"].isNull())
|
||||
autoAcceptEnabled_ = value["AutoAcceptEnabled"].asString() == "true";
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["MaxBandwidth"].isNull())
|
||||
maxBandwidth_ = std::stoi(value["MaxBandwidth"].asString());
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["ServiceDomain"].isNull())
|
||||
serviceDomain_ = value["ServiceDomain"].asString();
|
||||
if(!value["MinBandwidth"].isNull())
|
||||
minBandwidth_ = std::stoi(value["MinBandwidth"].asString());
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
if(!value["AutoAcceptEnabled"].isNull())
|
||||
autoAcceptEnabled_ = value["AutoAcceptEnabled"].asString() == "true";
|
||||
if(!value["ServiceBusinessStatus"].isNull())
|
||||
serviceBusinessStatus_ = value["ServiceBusinessStatus"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["ServiceStatus"].isNull())
|
||||
serviceStatus_ = value["ServiceStatus"].asString();
|
||||
if(!value["ConnectBandwidth"].isNull())
|
||||
connectBandwidth_ = std::stoi(value["ConnectBandwidth"].asString());
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
if(!value["Payer"].isNull())
|
||||
payer_ = value["Payer"].asString();
|
||||
if(!value["ZoneAffinityEnabled"].isNull())
|
||||
zoneAffinityEnabled_ = value["ZoneAffinityEnabled"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
@@ -81,16 +83,16 @@ std::string GetVpcEndpointServiceAttributeResult::getServiceDescription()const
|
||||
return serviceDescription_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointServiceAttributeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
int GetVpcEndpointServiceAttributeResult::getMaxBandwidth()const
|
||||
{
|
||||
return maxBandwidth_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointServiceAttributeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string GetVpcEndpointServiceAttributeResult::getServiceDomain()const
|
||||
{
|
||||
return serviceDomain_;
|
||||
@@ -141,3 +143,8 @@ std::string GetVpcEndpointServiceAttributeResult::getRegionId()const
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
bool GetVpcEndpointServiceAttributeResult::getZoneAffinityEnabled()const
|
||||
{
|
||||
return zoneAffinityEnabled_;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,6 +82,17 @@ void ListVpcEndpointServicesRequest::setNextToken(const std::string& nextToken)
|
||||
setParameter("NextToken", nextToken);
|
||||
}
|
||||
|
||||
bool ListVpcEndpointServicesRequest::getZoneAffinityEnabled()const
|
||||
{
|
||||
return zoneAffinityEnabled_;
|
||||
}
|
||||
|
||||
void ListVpcEndpointServicesRequest::setZoneAffinityEnabled(bool zoneAffinityEnabled)
|
||||
{
|
||||
zoneAffinityEnabled_ = zoneAffinityEnabled;
|
||||
setParameter("ZoneAffinityEnabled", zoneAffinityEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListVpcEndpointServicesRequest::getServiceName()const
|
||||
{
|
||||
return serviceName_;
|
||||
|
||||
@@ -43,38 +43,40 @@ void ListVpcEndpointServicesResult::parse(const std::string &payload)
|
||||
for (auto valueServicesService : allServicesNode)
|
||||
{
|
||||
Service servicesObject;
|
||||
if(!valueServicesService["AutoAcceptEnabled"].isNull())
|
||||
servicesObject.autoAcceptEnabled = valueServicesService["AutoAcceptEnabled"].asString() == "true";
|
||||
if(!valueServicesService["ConnectBandwidth"].isNull())
|
||||
servicesObject.connectBandwidth = std::stoi(valueServicesService["ConnectBandwidth"].asString());
|
||||
if(!valueServicesService["CreateTime"].isNull())
|
||||
servicesObject.createTime = valueServicesService["CreateTime"].asString();
|
||||
if(!valueServicesService["MaxBandwidth"].isNull())
|
||||
servicesObject.maxBandwidth = std::stoi(valueServicesService["MaxBandwidth"].asString());
|
||||
if(!valueServicesService["MinBandwidth"].isNull())
|
||||
servicesObject.minBandwidth = std::stoi(valueServicesService["MinBandwidth"].asString());
|
||||
if(!valueServicesService["RegionId"].isNull())
|
||||
servicesObject.regionId = valueServicesService["RegionId"].asString();
|
||||
if(!valueServicesService["ServiceBusinessStatus"].isNull())
|
||||
servicesObject.serviceBusinessStatus = valueServicesService["ServiceBusinessStatus"].asString();
|
||||
if(!valueServicesService["Payer"].isNull())
|
||||
servicesObject.payer = valueServicesService["Payer"].asString();
|
||||
if(!valueServicesService["ServiceDescription"].isNull())
|
||||
servicesObject.serviceDescription = valueServicesService["ServiceDescription"].asString();
|
||||
if(!valueServicesService["MaxBandwidth"].isNull())
|
||||
servicesObject.maxBandwidth = std::stoi(valueServicesService["MaxBandwidth"].asString());
|
||||
if(!valueServicesService["CreateTime"].isNull())
|
||||
servicesObject.createTime = valueServicesService["CreateTime"].asString();
|
||||
if(!valueServicesService["ServiceDomain"].isNull())
|
||||
servicesObject.serviceDomain = valueServicesService["ServiceDomain"].asString();
|
||||
if(!valueServicesService["MinBandwidth"].isNull())
|
||||
servicesObject.minBandwidth = std::stoi(valueServicesService["MinBandwidth"].asString());
|
||||
if(!valueServicesService["ServiceId"].isNull())
|
||||
servicesObject.serviceId = valueServicesService["ServiceId"].asString();
|
||||
if(!valueServicesService["AutoAcceptEnabled"].isNull())
|
||||
servicesObject.autoAcceptEnabled = valueServicesService["AutoAcceptEnabled"].asString() == "true";
|
||||
if(!valueServicesService["ServiceBusinessStatus"].isNull())
|
||||
servicesObject.serviceBusinessStatus = valueServicesService["ServiceBusinessStatus"].asString();
|
||||
if(!valueServicesService["ServiceName"].isNull())
|
||||
servicesObject.serviceName = valueServicesService["ServiceName"].asString();
|
||||
if(!valueServicesService["ServiceStatus"].isNull())
|
||||
servicesObject.serviceStatus = valueServicesService["ServiceStatus"].asString();
|
||||
if(!valueServicesService["Payer"].isNull())
|
||||
servicesObject.payer = valueServicesService["Payer"].asString();
|
||||
if(!valueServicesService["ConnectBandwidth"].isNull())
|
||||
servicesObject.connectBandwidth = std::stoi(valueServicesService["ConnectBandwidth"].asString());
|
||||
if(!valueServicesService["RegionId"].isNull())
|
||||
servicesObject.regionId = valueServicesService["RegionId"].asString();
|
||||
if(!valueServicesService["ZoneAffinityEnabled"].isNull())
|
||||
servicesObject.zoneAffinityEnabled = valueServicesService["ZoneAffinityEnabled"].asString() == "true";
|
||||
services_.push_back(servicesObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,26 +43,28 @@ void ListVpcEndpointZonesResult::parse(const std::string &payload)
|
||||
for (auto valueZonesZone : allZonesNode)
|
||||
{
|
||||
Zone zonesObject;
|
||||
if(!valueZonesZone["ZoneDomain"].isNull())
|
||||
zonesObject.zoneDomain = valueZonesZone["ZoneDomain"].asString();
|
||||
if(!valueZonesZone["ZoneStatus"].isNull())
|
||||
zonesObject.zoneStatus = valueZonesZone["ZoneStatus"].asString();
|
||||
if(!valueZonesZone["EniId"].isNull())
|
||||
zonesObject.eniId = valueZonesZone["EniId"].asString();
|
||||
if(!valueZonesZone["EniIp"].isNull())
|
||||
zonesObject.eniIp = valueZonesZone["EniIp"].asString();
|
||||
if(!valueZonesZone["VSwitchId"].isNull())
|
||||
zonesObject.vSwitchId = valueZonesZone["VSwitchId"].asString();
|
||||
if(!valueZonesZone["ZoneId"].isNull())
|
||||
zonesObject.zoneId = valueZonesZone["ZoneId"].asString();
|
||||
if(!valueZonesZone["ServiceStatus"].isNull())
|
||||
zonesObject.serviceStatus = valueZonesZone["ServiceStatus"].asString();
|
||||
if(!valueZonesZone["VSwitchId"].isNull())
|
||||
zonesObject.vSwitchId = valueZonesZone["VSwitchId"].asString();
|
||||
if(!valueZonesZone["EniIp"].isNull())
|
||||
zonesObject.eniIp = valueZonesZone["EniIp"].asString();
|
||||
if(!valueZonesZone["ZoneStatus"].isNull())
|
||||
zonesObject.zoneStatus = valueZonesZone["ZoneStatus"].asString();
|
||||
if(!valueZonesZone["RegionId"].isNull())
|
||||
zonesObject.regionId = valueZonesZone["RegionId"].asString();
|
||||
if(!valueZonesZone["ZoneDomain"].isNull())
|
||||
zonesObject.zoneDomain = valueZonesZone["ZoneDomain"].asString();
|
||||
zones_.push_back(zonesObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,40 +43,42 @@ void ListVpcEndpointsResult::parse(const std::string &payload)
|
||||
for (auto valueEndpointsEndpoint : allEndpointsNode)
|
||||
{
|
||||
Endpoint endpointsObject;
|
||||
if(!valueEndpointsEndpoint["EndpointId"].isNull())
|
||||
endpointsObject.endpointId = valueEndpointsEndpoint["EndpointId"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointName"].isNull())
|
||||
endpointsObject.endpointName = valueEndpointsEndpoint["EndpointName"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointDescription"].isNull())
|
||||
endpointsObject.endpointDescription = valueEndpointsEndpoint["EndpointDescription"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointStatus"].isNull())
|
||||
endpointsObject.endpointStatus = valueEndpointsEndpoint["EndpointStatus"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointBusinessStatus"].isNull())
|
||||
endpointsObject.endpointBusinessStatus = valueEndpointsEndpoint["EndpointBusinessStatus"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointDomain"].isNull())
|
||||
endpointsObject.endpointDomain = valueEndpointsEndpoint["EndpointDomain"].asString();
|
||||
if(!valueEndpointsEndpoint["Bandwidth"].isNull())
|
||||
endpointsObject.bandwidth = std::stol(valueEndpointsEndpoint["Bandwidth"].asString());
|
||||
if(!valueEndpointsEndpoint["ConnectionStatus"].isNull())
|
||||
endpointsObject.connectionStatus = valueEndpointsEndpoint["ConnectionStatus"].asString();
|
||||
if(!valueEndpointsEndpoint["ServiceId"].isNull())
|
||||
endpointsObject.serviceId = valueEndpointsEndpoint["ServiceId"].asString();
|
||||
if(!valueEndpointsEndpoint["ServiceName"].isNull())
|
||||
endpointsObject.serviceName = valueEndpointsEndpoint["ServiceName"].asString();
|
||||
if(!valueEndpointsEndpoint["VpcId"].isNull())
|
||||
endpointsObject.vpcId = valueEndpointsEndpoint["VpcId"].asString();
|
||||
if(!valueEndpointsEndpoint["CreateTime"].isNull())
|
||||
endpointsObject.createTime = valueEndpointsEndpoint["CreateTime"].asString();
|
||||
if(!valueEndpointsEndpoint["RegionId"].isNull())
|
||||
endpointsObject.regionId = valueEndpointsEndpoint["RegionId"].asString();
|
||||
if(!valueEndpointsEndpoint["ResourceOwner"].isNull())
|
||||
endpointsObject.resourceOwner = valueEndpointsEndpoint["ResourceOwner"].asString() == "true";
|
||||
if(!valueEndpointsEndpoint["CreateTime"].isNull())
|
||||
endpointsObject.createTime = valueEndpointsEndpoint["CreateTime"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointBusinessStatus"].isNull())
|
||||
endpointsObject.endpointBusinessStatus = valueEndpointsEndpoint["EndpointBusinessStatus"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointDescription"].isNull())
|
||||
endpointsObject.endpointDescription = valueEndpointsEndpoint["EndpointDescription"].asString();
|
||||
if(!valueEndpointsEndpoint["ServiceId"].isNull())
|
||||
endpointsObject.serviceId = valueEndpointsEndpoint["ServiceId"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointStatus"].isNull())
|
||||
endpointsObject.endpointStatus = valueEndpointsEndpoint["EndpointStatus"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointName"].isNull())
|
||||
endpointsObject.endpointName = valueEndpointsEndpoint["EndpointName"].asString();
|
||||
if(!valueEndpointsEndpoint["VpcId"].isNull())
|
||||
endpointsObject.vpcId = valueEndpointsEndpoint["VpcId"].asString();
|
||||
if(!valueEndpointsEndpoint["ServiceName"].isNull())
|
||||
endpointsObject.serviceName = valueEndpointsEndpoint["ServiceName"].asString();
|
||||
if(!valueEndpointsEndpoint["EndpointId"].isNull())
|
||||
endpointsObject.endpointId = valueEndpointsEndpoint["EndpointId"].asString();
|
||||
if(!valueEndpointsEndpoint["Bandwidth"].isNull())
|
||||
endpointsObject.bandwidth = std::stol(valueEndpointsEndpoint["Bandwidth"].asString());
|
||||
if(!valueEndpointsEndpoint["RegionId"].isNull())
|
||||
endpointsObject.regionId = valueEndpointsEndpoint["RegionId"].asString();
|
||||
if(!valueEndpointsEndpoint["ConnectionStatus"].isNull())
|
||||
endpointsObject.connectionStatus = valueEndpointsEndpoint["ConnectionStatus"].asString();
|
||||
if(!valueEndpointsEndpoint["ZoneAffinityEnabled"].isNull())
|
||||
endpointsObject.zoneAffinityEnabled = valueEndpointsEndpoint["ZoneAffinityEnabled"].asString() == "true";
|
||||
endpoints_.push_back(endpointsObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = value["MaxResults"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,17 @@ void UpdateVpcEndpointServiceAttributeRequest::setRegionId(const std::string& re
|
||||
setParameter("RegionId", regionId);
|
||||
}
|
||||
|
||||
bool UpdateVpcEndpointServiceAttributeRequest::getZoneAffinityEnabled()const
|
||||
{
|
||||
return zoneAffinityEnabled_;
|
||||
}
|
||||
|
||||
void UpdateVpcEndpointServiceAttributeRequest::setZoneAffinityEnabled(bool zoneAffinityEnabled)
|
||||
{
|
||||
zoneAffinityEnabled_ = zoneAffinityEnabled;
|
||||
setParameter("ZoneAffinityEnabled", zoneAffinityEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
bool UpdateVpcEndpointServiceAttributeRequest::getDryRun()const
|
||||
{
|
||||
return dryRun_;
|
||||
|
||||
Reference in New Issue
Block a user