Gwlb Open API released.
This commit is contained in:
953
gwlb/src/GwlbClient.cc
Normal file
953
gwlb/src/GwlbClient.cc
Normal file
@@ -0,0 +1,953 @@
|
||||
/*
|
||||
* 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/gwlb/GwlbClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "Gwlb";
|
||||
}
|
||||
|
||||
GwlbClient::GwlbClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
GwlbClient::GwlbClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
GwlbClient::GwlbClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
GwlbClient::~GwlbClient()
|
||||
{}
|
||||
|
||||
GwlbClient::AddServersToServerGroupOutcome GwlbClient::addServersToServerGroup(const AddServersToServerGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddServersToServerGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddServersToServerGroupOutcome(AddServersToServerGroupResult(outcome.result()));
|
||||
else
|
||||
return AddServersToServerGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::addServersToServerGroupAsync(const AddServersToServerGroupRequest& request, const AddServersToServerGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addServersToServerGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::AddServersToServerGroupOutcomeCallable GwlbClient::addServersToServerGroupCallable(const AddServersToServerGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddServersToServerGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addServersToServerGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::CreateListenerOutcome GwlbClient::createListener(const CreateListenerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateListenerOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateListenerOutcome(CreateListenerResult(outcome.result()));
|
||||
else
|
||||
return CreateListenerOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::createListenerAsync(const CreateListenerRequest& request, const CreateListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createListener(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::CreateListenerOutcomeCallable GwlbClient::createListenerCallable(const CreateListenerRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateListenerOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createListener(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::CreateLoadBalancerOutcome GwlbClient::createLoadBalancer(const CreateLoadBalancerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateLoadBalancerOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateLoadBalancerOutcome(CreateLoadBalancerResult(outcome.result()));
|
||||
else
|
||||
return CreateLoadBalancerOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::createLoadBalancerAsync(const CreateLoadBalancerRequest& request, const CreateLoadBalancerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createLoadBalancer(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::CreateLoadBalancerOutcomeCallable GwlbClient::createLoadBalancerCallable(const CreateLoadBalancerRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateLoadBalancerOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createLoadBalancer(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::CreateServerGroupOutcome GwlbClient::createServerGroup(const CreateServerGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateServerGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateServerGroupOutcome(CreateServerGroupResult(outcome.result()));
|
||||
else
|
||||
return CreateServerGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::createServerGroupAsync(const CreateServerGroupRequest& request, const CreateServerGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createServerGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::CreateServerGroupOutcomeCallable GwlbClient::createServerGroupCallable(const CreateServerGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateServerGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createServerGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::DeleteListenerOutcome GwlbClient::deleteListener(const DeleteListenerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteListenerOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteListenerOutcome(DeleteListenerResult(outcome.result()));
|
||||
else
|
||||
return DeleteListenerOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::deleteListenerAsync(const DeleteListenerRequest& request, const DeleteListenerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteListener(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::DeleteListenerOutcomeCallable GwlbClient::deleteListenerCallable(const DeleteListenerRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteListenerOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteListener(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::DeleteLoadBalancerOutcome GwlbClient::deleteLoadBalancer(const DeleteLoadBalancerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteLoadBalancerOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteLoadBalancerOutcome(DeleteLoadBalancerResult(outcome.result()));
|
||||
else
|
||||
return DeleteLoadBalancerOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::deleteLoadBalancerAsync(const DeleteLoadBalancerRequest& request, const DeleteLoadBalancerAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteLoadBalancer(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::DeleteLoadBalancerOutcomeCallable GwlbClient::deleteLoadBalancerCallable(const DeleteLoadBalancerRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteLoadBalancerOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteLoadBalancer(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::DeleteServerGroupOutcome GwlbClient::deleteServerGroup(const DeleteServerGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteServerGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteServerGroupOutcome(DeleteServerGroupResult(outcome.result()));
|
||||
else
|
||||
return DeleteServerGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::deleteServerGroupAsync(const DeleteServerGroupRequest& request, const DeleteServerGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteServerGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::DeleteServerGroupOutcomeCallable GwlbClient::deleteServerGroupCallable(const DeleteServerGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteServerGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteServerGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::DescribeRegionsOutcome GwlbClient::describeRegions(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeRegionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeRegionsOutcome(DescribeRegionsResult(outcome.result()));
|
||||
else
|
||||
return DescribeRegionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::describeRegionsAsync(const DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeRegions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::DescribeRegionsOutcomeCallable GwlbClient::describeRegionsCallable(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeRegionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeRegions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::DescribeZonesOutcome GwlbClient::describeZones(const DescribeZonesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeZonesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeZonesOutcome(DescribeZonesResult(outcome.result()));
|
||||
else
|
||||
return DescribeZonesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::describeZonesAsync(const DescribeZonesRequest& request, const DescribeZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeZones(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::DescribeZonesOutcomeCallable GwlbClient::describeZonesCallable(const DescribeZonesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeZonesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeZones(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::GetListenerAttributeOutcome GwlbClient::getListenerAttribute(const GetListenerAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetListenerAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetListenerAttributeOutcome(GetListenerAttributeResult(outcome.result()));
|
||||
else
|
||||
return GetListenerAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::getListenerAttributeAsync(const GetListenerAttributeRequest& request, const GetListenerAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getListenerAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::GetListenerAttributeOutcomeCallable GwlbClient::getListenerAttributeCallable(const GetListenerAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetListenerAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getListenerAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::GetListenerHealthStatusOutcome GwlbClient::getListenerHealthStatus(const GetListenerHealthStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetListenerHealthStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetListenerHealthStatusOutcome(GetListenerHealthStatusResult(outcome.result()));
|
||||
else
|
||||
return GetListenerHealthStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::getListenerHealthStatusAsync(const GetListenerHealthStatusRequest& request, const GetListenerHealthStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getListenerHealthStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::GetListenerHealthStatusOutcomeCallable GwlbClient::getListenerHealthStatusCallable(const GetListenerHealthStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetListenerHealthStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getListenerHealthStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::GetLoadBalancerAttributeOutcome GwlbClient::getLoadBalancerAttribute(const GetLoadBalancerAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetLoadBalancerAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetLoadBalancerAttributeOutcome(GetLoadBalancerAttributeResult(outcome.result()));
|
||||
else
|
||||
return GetLoadBalancerAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::getLoadBalancerAttributeAsync(const GetLoadBalancerAttributeRequest& request, const GetLoadBalancerAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getLoadBalancerAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::GetLoadBalancerAttributeOutcomeCallable GwlbClient::getLoadBalancerAttributeCallable(const GetLoadBalancerAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetLoadBalancerAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getLoadBalancerAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::ListListenersOutcome GwlbClient::listListeners(const ListListenersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListListenersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListListenersOutcome(ListListenersResult(outcome.result()));
|
||||
else
|
||||
return ListListenersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::listListenersAsync(const ListListenersRequest& request, const ListListenersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listListeners(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::ListListenersOutcomeCallable GwlbClient::listListenersCallable(const ListListenersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListListenersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listListeners(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::ListLoadBalancersOutcome GwlbClient::listLoadBalancers(const ListLoadBalancersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListLoadBalancersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListLoadBalancersOutcome(ListLoadBalancersResult(outcome.result()));
|
||||
else
|
||||
return ListLoadBalancersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::listLoadBalancersAsync(const ListLoadBalancersRequest& request, const ListLoadBalancersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listLoadBalancers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::ListLoadBalancersOutcomeCallable GwlbClient::listLoadBalancersCallable(const ListLoadBalancersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListLoadBalancersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listLoadBalancers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::ListServerGroupServersOutcome GwlbClient::listServerGroupServers(const ListServerGroupServersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServerGroupServersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServerGroupServersOutcome(ListServerGroupServersResult(outcome.result()));
|
||||
else
|
||||
return ListServerGroupServersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::listServerGroupServersAsync(const ListServerGroupServersRequest& request, const ListServerGroupServersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServerGroupServers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::ListServerGroupServersOutcomeCallable GwlbClient::listServerGroupServersCallable(const ListServerGroupServersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServerGroupServersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServerGroupServers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::ListServerGroupsOutcome GwlbClient::listServerGroups(const ListServerGroupsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServerGroupsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServerGroupsOutcome(ListServerGroupsResult(outcome.result()));
|
||||
else
|
||||
return ListServerGroupsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::listServerGroupsAsync(const ListServerGroupsRequest& request, const ListServerGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServerGroups(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::ListServerGroupsOutcomeCallable GwlbClient::listServerGroupsCallable(const ListServerGroupsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServerGroupsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServerGroups(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::ListTagResourcesOutcome GwlbClient::listTagResources(const ListTagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListTagResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListTagResourcesOutcome(ListTagResourcesResult(outcome.result()));
|
||||
else
|
||||
return ListTagResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::listTagResourcesAsync(const ListTagResourcesRequest& request, const ListTagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listTagResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::ListTagResourcesOutcomeCallable GwlbClient::listTagResourcesCallable(const ListTagResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListTagResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listTagResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::MoveResourceGroupOutcome GwlbClient::moveResourceGroup(const MoveResourceGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return MoveResourceGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return MoveResourceGroupOutcome(MoveResourceGroupResult(outcome.result()));
|
||||
else
|
||||
return MoveResourceGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::moveResourceGroupAsync(const MoveResourceGroupRequest& request, const MoveResourceGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, moveResourceGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::MoveResourceGroupOutcomeCallable GwlbClient::moveResourceGroupCallable(const MoveResourceGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<MoveResourceGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->moveResourceGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::RemoveServersFromServerGroupOutcome GwlbClient::removeServersFromServerGroup(const RemoveServersFromServerGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RemoveServersFromServerGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RemoveServersFromServerGroupOutcome(RemoveServersFromServerGroupResult(outcome.result()));
|
||||
else
|
||||
return RemoveServersFromServerGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::removeServersFromServerGroupAsync(const RemoveServersFromServerGroupRequest& request, const RemoveServersFromServerGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, removeServersFromServerGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::RemoveServersFromServerGroupOutcomeCallable GwlbClient::removeServersFromServerGroupCallable(const RemoveServersFromServerGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RemoveServersFromServerGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->removeServersFromServerGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::TagResourcesOutcome GwlbClient::tagResources(const TagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return TagResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return TagResourcesOutcome(TagResourcesResult(outcome.result()));
|
||||
else
|
||||
return TagResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::tagResourcesAsync(const TagResourcesRequest& request, const TagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, tagResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::TagResourcesOutcomeCallable GwlbClient::tagResourcesCallable(const TagResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<TagResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->tagResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::UntagResourcesOutcome GwlbClient::untagResources(const UntagResourcesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UntagResourcesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UntagResourcesOutcome(UntagResourcesResult(outcome.result()));
|
||||
else
|
||||
return UntagResourcesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::untagResourcesAsync(const UntagResourcesRequest& request, const UntagResourcesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, untagResources(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::UntagResourcesOutcomeCallable GwlbClient::untagResourcesCallable(const UntagResourcesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UntagResourcesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->untagResources(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::UpdateListenerAttributeOutcome GwlbClient::updateListenerAttribute(const UpdateListenerAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateListenerAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateListenerAttributeOutcome(UpdateListenerAttributeResult(outcome.result()));
|
||||
else
|
||||
return UpdateListenerAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::updateListenerAttributeAsync(const UpdateListenerAttributeRequest& request, const UpdateListenerAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateListenerAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::UpdateListenerAttributeOutcomeCallable GwlbClient::updateListenerAttributeCallable(const UpdateListenerAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateListenerAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateListenerAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::UpdateLoadBalancerAttributeOutcome GwlbClient::updateLoadBalancerAttribute(const UpdateLoadBalancerAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateLoadBalancerAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateLoadBalancerAttributeOutcome(UpdateLoadBalancerAttributeResult(outcome.result()));
|
||||
else
|
||||
return UpdateLoadBalancerAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::updateLoadBalancerAttributeAsync(const UpdateLoadBalancerAttributeRequest& request, const UpdateLoadBalancerAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateLoadBalancerAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::UpdateLoadBalancerAttributeOutcomeCallable GwlbClient::updateLoadBalancerAttributeCallable(const UpdateLoadBalancerAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateLoadBalancerAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateLoadBalancerAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::UpdateLoadBalancerZonesOutcome GwlbClient::updateLoadBalancerZones(const UpdateLoadBalancerZonesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateLoadBalancerZonesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateLoadBalancerZonesOutcome(UpdateLoadBalancerZonesResult(outcome.result()));
|
||||
else
|
||||
return UpdateLoadBalancerZonesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::updateLoadBalancerZonesAsync(const UpdateLoadBalancerZonesRequest& request, const UpdateLoadBalancerZonesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateLoadBalancerZones(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::UpdateLoadBalancerZonesOutcomeCallable GwlbClient::updateLoadBalancerZonesCallable(const UpdateLoadBalancerZonesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateLoadBalancerZonesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateLoadBalancerZones(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
GwlbClient::UpdateServerGroupAttributeOutcome GwlbClient::updateServerGroupAttribute(const UpdateServerGroupAttributeRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateServerGroupAttributeOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateServerGroupAttributeOutcome(UpdateServerGroupAttributeResult(outcome.result()));
|
||||
else
|
||||
return UpdateServerGroupAttributeOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void GwlbClient::updateServerGroupAttributeAsync(const UpdateServerGroupAttributeRequest& request, const UpdateServerGroupAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateServerGroupAttribute(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
GwlbClient::UpdateServerGroupAttributeOutcomeCallable GwlbClient::updateServerGroupAttributeCallable(const UpdateServerGroupAttributeRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateServerGroupAttributeOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateServerGroupAttribute(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
68
gwlb/src/model/AddServersToServerGroupRequest.cc
Normal file
68
gwlb/src/model/AddServersToServerGroupRequest.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/gwlb/model/AddServersToServerGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::AddServersToServerGroupRequest;
|
||||
|
||||
AddServersToServerGroupRequest::AddServersToServerGroupRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "AddServersToServerGroup") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
AddServersToServerGroupRequest::~AddServersToServerGroupRequest() {}
|
||||
|
||||
std::string AddServersToServerGroupRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void AddServersToServerGroupRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string AddServersToServerGroupRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void AddServersToServerGroupRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
std::vector<AddServersToServerGroupRequest::Servers> AddServersToServerGroupRequest::getServers() const {
|
||||
return servers_;
|
||||
}
|
||||
|
||||
void AddServersToServerGroupRequest::setServers(const std::vector<AddServersToServerGroupRequest::Servers> &servers) {
|
||||
servers_ = servers;
|
||||
for(int dep1 = 0; dep1 != servers.size(); dep1++) {
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".Port", std::to_string(servers[dep1].port));
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".ServerId", servers[dep1].serverId);
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".ServerIp", servers[dep1].serverIp);
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".ServerType", servers[dep1].serverType);
|
||||
}
|
||||
}
|
||||
|
||||
bool AddServersToServerGroupRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void AddServersToServerGroupRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
44
gwlb/src/model/AddServersToServerGroupResult.cc
Normal file
44
gwlb/src/model/AddServersToServerGroupResult.cc
Normal 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/gwlb/model/AddServersToServerGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
AddServersToServerGroupResult::AddServersToServerGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddServersToServerGroupResult::AddServersToServerGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddServersToServerGroupResult::~AddServersToServerGroupResult()
|
||||
{}
|
||||
|
||||
void AddServersToServerGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
84
gwlb/src/model/CreateListenerRequest.cc
Normal file
84
gwlb/src/model/CreateListenerRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/gwlb/model/CreateListenerRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::CreateListenerRequest;
|
||||
|
||||
CreateListenerRequest::CreateListenerRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "CreateListener") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateListenerRequest::~CreateListenerRequest() {}
|
||||
|
||||
std::string CreateListenerRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateListenerRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
std::vector<CreateListenerRequest::Tag> CreateListenerRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setTag(const std::vector<CreateListenerRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
bool CreateListenerRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateListenerRequest::getLoadBalancerId() const {
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setLoadBalancerId(const std::string &loadBalancerId) {
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
setBodyParameter(std::string("LoadBalancerId"), loadBalancerId);
|
||||
}
|
||||
|
||||
std::string CreateListenerRequest::getListenerDescription() const {
|
||||
return listenerDescription_;
|
||||
}
|
||||
|
||||
void CreateListenerRequest::setListenerDescription(const std::string &listenerDescription) {
|
||||
listenerDescription_ = listenerDescription;
|
||||
setBodyParameter(std::string("ListenerDescription"), listenerDescription);
|
||||
}
|
||||
|
||||
51
gwlb/src/model/CreateListenerResult.cc
Normal file
51
gwlb/src/model/CreateListenerResult.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/gwlb/model/CreateListenerResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
CreateListenerResult::CreateListenerResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateListenerResult::CreateListenerResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateListenerResult::~CreateListenerResult()
|
||||
{}
|
||||
|
||||
void CreateListenerResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ListenerId"].isNull())
|
||||
listenerId_ = value["ListenerId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateListenerResult::getListenerId()const
|
||||
{
|
||||
return listenerId_;
|
||||
}
|
||||
|
||||
114
gwlb/src/model/CreateLoadBalancerRequest.cc
Normal file
114
gwlb/src/model/CreateLoadBalancerRequest.cc
Normal file
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* 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/gwlb/model/CreateLoadBalancerRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::CreateLoadBalancerRequest;
|
||||
|
||||
CreateLoadBalancerRequest::CreateLoadBalancerRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "CreateLoadBalancer") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateLoadBalancerRequest::~CreateLoadBalancerRequest() {}
|
||||
|
||||
bool CreateLoadBalancerRequest::getCrossZoneEnabled() const {
|
||||
return crossZoneEnabled_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setCrossZoneEnabled(bool crossZoneEnabled) {
|
||||
crossZoneEnabled_ = crossZoneEnabled;
|
||||
setBodyParameter(std::string("CrossZoneEnabled"), crossZoneEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerRequest::getAddressIpVersion() const {
|
||||
return addressIpVersion_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setAddressIpVersion(const std::string &addressIpVersion) {
|
||||
addressIpVersion_ = addressIpVersion;
|
||||
setBodyParameter(std::string("AddressIpVersion"), addressIpVersion);
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setBodyParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerRequest::getLoadBalancerName() const {
|
||||
return loadBalancerName_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setLoadBalancerName(const std::string &loadBalancerName) {
|
||||
loadBalancerName_ = loadBalancerName;
|
||||
setBodyParameter(std::string("LoadBalancerName"), loadBalancerName);
|
||||
}
|
||||
|
||||
std::vector<CreateLoadBalancerRequest::Tag> CreateLoadBalancerRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setTag(const std::vector<CreateLoadBalancerRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
bool CreateLoadBalancerRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<CreateLoadBalancerRequest::ZoneMappings> CreateLoadBalancerRequest::getZoneMappings() const {
|
||||
return zoneMappings_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setZoneMappings(const std::vector<CreateLoadBalancerRequest::ZoneMappings> &zoneMappings) {
|
||||
zoneMappings_ = zoneMappings;
|
||||
for(int dep1 = 0; dep1 != zoneMappings.size(); dep1++) {
|
||||
setBodyParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".VSwitchId", zoneMappings[dep1].vSwitchId);
|
||||
setBodyParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
|
||||
}
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerRequest::getVpcId() const {
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void CreateLoadBalancerRequest::setVpcId(const std::string &vpcId) {
|
||||
vpcId_ = vpcId;
|
||||
setBodyParameter(std::string("VpcId"), vpcId);
|
||||
}
|
||||
|
||||
51
gwlb/src/model/CreateLoadBalancerResult.cc
Normal file
51
gwlb/src/model/CreateLoadBalancerResult.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/gwlb/model/CreateLoadBalancerResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
CreateLoadBalancerResult::CreateLoadBalancerResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateLoadBalancerResult::CreateLoadBalancerResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateLoadBalancerResult::~CreateLoadBalancerResult()
|
||||
{}
|
||||
|
||||
void CreateLoadBalancerResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["LoadBalancerId"].isNull())
|
||||
loadBalancerId_ = value["LoadBalancerId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateLoadBalancerResult::getLoadBalancerId()const
|
||||
{
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
141
gwlb/src/model/CreateServerGroupRequest.cc
Normal file
141
gwlb/src/model/CreateServerGroupRequest.cc
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* 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/gwlb/model/CreateServerGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::CreateServerGroupRequest;
|
||||
|
||||
CreateServerGroupRequest::CreateServerGroupRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "CreateServerGroup") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateServerGroupRequest::~CreateServerGroupRequest() {}
|
||||
|
||||
std::string CreateServerGroupRequest::getServerGroupName() const {
|
||||
return serverGroupName_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setServerGroupName(const std::string &serverGroupName) {
|
||||
serverGroupName_ = serverGroupName;
|
||||
setBodyParameter(std::string("ServerGroupName"), serverGroupName);
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
CreateServerGroupRequest::HealthCheckConfig CreateServerGroupRequest::getHealthCheckConfig() const {
|
||||
return healthCheckConfig_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setHealthCheckConfig(const CreateServerGroupRequest::HealthCheckConfig &healthCheckConfig) {
|
||||
healthCheckConfig_ = healthCheckConfig;
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectPort", std::to_string(healthCheckConfig.healthCheckConnectPort));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectTimeout", std::to_string(healthCheckConfig.healthCheckConnectTimeout));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckDomain", healthCheckConfig.healthCheckDomain);
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckEnabled", healthCheckConfig.healthCheckEnabled ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != healthCheckConfig.healthCheckHttpCode.size(); dep1++) {
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckHttpCode." + std::to_string(dep1 + 1), healthCheckConfig.healthCheckHttpCode[dep1]);
|
||||
}
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckInterval", std::to_string(healthCheckConfig.healthCheckInterval));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckPath", healthCheckConfig.healthCheckPath);
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckProtocol", healthCheckConfig.healthCheckProtocol);
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthyThreshold", std::to_string(healthCheckConfig.healthyThreshold));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".UnhealthyThreshold", std::to_string(healthCheckConfig.unhealthyThreshold));
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getScheduler() const {
|
||||
return scheduler_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setScheduler(const std::string &scheduler) {
|
||||
scheduler_ = scheduler;
|
||||
setBodyParameter(std::string("Scheduler"), scheduler);
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setBodyParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getProtocol() const {
|
||||
return protocol_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setProtocol(const std::string &protocol) {
|
||||
protocol_ = protocol;
|
||||
setBodyParameter(std::string("Protocol"), protocol);
|
||||
}
|
||||
|
||||
std::vector<CreateServerGroupRequest::Tag> CreateServerGroupRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setTag(const std::vector<CreateServerGroupRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
bool CreateServerGroupRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
CreateServerGroupRequest::ConnectionDrainConfig CreateServerGroupRequest::getConnectionDrainConfig() const {
|
||||
return connectionDrainConfig_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setConnectionDrainConfig(const CreateServerGroupRequest::ConnectionDrainConfig &connectionDrainConfig) {
|
||||
connectionDrainConfig_ = connectionDrainConfig;
|
||||
setBodyParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainEnabled", connectionDrainConfig.connectionDrainEnabled ? "true" : "false");
|
||||
setBodyParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainTimeout", std::to_string(connectionDrainConfig.connectionDrainTimeout));
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getServerGroupType() const {
|
||||
return serverGroupType_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setServerGroupType(const std::string &serverGroupType) {
|
||||
serverGroupType_ = serverGroupType;
|
||||
setBodyParameter(std::string("ServerGroupType"), serverGroupType);
|
||||
}
|
||||
|
||||
std::string CreateServerGroupRequest::getVpcId() const {
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void CreateServerGroupRequest::setVpcId(const std::string &vpcId) {
|
||||
vpcId_ = vpcId;
|
||||
setBodyParameter(std::string("VpcId"), vpcId);
|
||||
}
|
||||
|
||||
51
gwlb/src/model/CreateServerGroupResult.cc
Normal file
51
gwlb/src/model/CreateServerGroupResult.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/gwlb/model/CreateServerGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
CreateServerGroupResult::CreateServerGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateServerGroupResult::CreateServerGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateServerGroupResult::~CreateServerGroupResult()
|
||||
{}
|
||||
|
||||
void CreateServerGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ServerGroupId"].isNull())
|
||||
serverGroupId_ = value["ServerGroupId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateServerGroupResult::getServerGroupId()const
|
||||
{
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
54
gwlb/src/model/DeleteListenerRequest.cc
Normal file
54
gwlb/src/model/DeleteListenerRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/DeleteListenerRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::DeleteListenerRequest;
|
||||
|
||||
DeleteListenerRequest::DeleteListenerRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "DeleteListener") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteListenerRequest::~DeleteListenerRequest() {}
|
||||
|
||||
std::string DeleteListenerRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteListenerRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteListenerRequest::getListenerId() const {
|
||||
return listenerId_;
|
||||
}
|
||||
|
||||
void DeleteListenerRequest::setListenerId(const std::string &listenerId) {
|
||||
listenerId_ = listenerId;
|
||||
setBodyParameter(std::string("ListenerId"), listenerId);
|
||||
}
|
||||
|
||||
bool DeleteListenerRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void DeleteListenerRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
44
gwlb/src/model/DeleteListenerResult.cc
Normal file
44
gwlb/src/model/DeleteListenerResult.cc
Normal 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/gwlb/model/DeleteListenerResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
DeleteListenerResult::DeleteListenerResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteListenerResult::DeleteListenerResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteListenerResult::~DeleteListenerResult()
|
||||
{}
|
||||
|
||||
void DeleteListenerResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
54
gwlb/src/model/DeleteLoadBalancerRequest.cc
Normal file
54
gwlb/src/model/DeleteLoadBalancerRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/DeleteLoadBalancerRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::DeleteLoadBalancerRequest;
|
||||
|
||||
DeleteLoadBalancerRequest::DeleteLoadBalancerRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "DeleteLoadBalancer") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteLoadBalancerRequest::~DeleteLoadBalancerRequest() {}
|
||||
|
||||
std::string DeleteLoadBalancerRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteLoadBalancerRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
bool DeleteLoadBalancerRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void DeleteLoadBalancerRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string DeleteLoadBalancerRequest::getLoadBalancerId() const {
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void DeleteLoadBalancerRequest::setLoadBalancerId(const std::string &loadBalancerId) {
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
setBodyParameter(std::string("LoadBalancerId"), loadBalancerId);
|
||||
}
|
||||
|
||||
44
gwlb/src/model/DeleteLoadBalancerResult.cc
Normal file
44
gwlb/src/model/DeleteLoadBalancerResult.cc
Normal 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/gwlb/model/DeleteLoadBalancerResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
DeleteLoadBalancerResult::DeleteLoadBalancerResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteLoadBalancerResult::DeleteLoadBalancerResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteLoadBalancerResult::~DeleteLoadBalancerResult()
|
||||
{}
|
||||
|
||||
void DeleteLoadBalancerResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
54
gwlb/src/model/DeleteServerGroupRequest.cc
Normal file
54
gwlb/src/model/DeleteServerGroupRequest.cc
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/DeleteServerGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::DeleteServerGroupRequest;
|
||||
|
||||
DeleteServerGroupRequest::DeleteServerGroupRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "DeleteServerGroup") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteServerGroupRequest::~DeleteServerGroupRequest() {}
|
||||
|
||||
std::string DeleteServerGroupRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void DeleteServerGroupRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string DeleteServerGroupRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void DeleteServerGroupRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
bool DeleteServerGroupRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void DeleteServerGroupRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
44
gwlb/src/model/DeleteServerGroupResult.cc
Normal file
44
gwlb/src/model/DeleteServerGroupResult.cc
Normal 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/gwlb/model/DeleteServerGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
DeleteServerGroupResult::DeleteServerGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteServerGroupResult::DeleteServerGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteServerGroupResult::~DeleteServerGroupResult()
|
||||
{}
|
||||
|
||||
void DeleteServerGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
36
gwlb/src/model/DescribeRegionsRequest.cc
Normal file
36
gwlb/src/model/DescribeRegionsRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/DescribeRegionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::DescribeRegionsRequest;
|
||||
|
||||
DescribeRegionsRequest::DescribeRegionsRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "DescribeRegions") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeRegionsRequest::~DescribeRegionsRequest() {}
|
||||
|
||||
std::string DescribeRegionsRequest::getAcceptLanguage() const {
|
||||
return acceptLanguage_;
|
||||
}
|
||||
|
||||
void DescribeRegionsRequest::setAcceptLanguage(const std::string &acceptLanguage) {
|
||||
acceptLanguage_ = acceptLanguage;
|
||||
setBodyParameter(std::string("AcceptLanguage"), acceptLanguage);
|
||||
}
|
||||
|
||||
61
gwlb/src/model/DescribeRegionsResult.cc
Normal file
61
gwlb/src/model/DescribeRegionsResult.cc
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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/gwlb/model/DescribeRegionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeRegionsResult::DescribeRegionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeRegionsResult::~DescribeRegionsResult()
|
||||
{}
|
||||
|
||||
void DescribeRegionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRegionsNode = value["Regions"]["Data"];
|
||||
for (auto valueRegionsData : allRegionsNode)
|
||||
{
|
||||
Data regionsObject;
|
||||
if(!valueRegionsData["LocalName"].isNull())
|
||||
regionsObject.localName = valueRegionsData["LocalName"].asString();
|
||||
if(!valueRegionsData["RegionEndpoint"].isNull())
|
||||
regionsObject.regionEndpoint = valueRegionsData["RegionEndpoint"].asString();
|
||||
if(!valueRegionsData["RegionId"].isNull())
|
||||
regionsObject.regionId = valueRegionsData["RegionId"].asString();
|
||||
regions_.push_back(regionsObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeRegionsResult::Data> DescribeRegionsResult::getRegions()const
|
||||
{
|
||||
return regions_;
|
||||
}
|
||||
|
||||
36
gwlb/src/model/DescribeZonesRequest.cc
Normal file
36
gwlb/src/model/DescribeZonesRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/DescribeZonesRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::DescribeZonesRequest;
|
||||
|
||||
DescribeZonesRequest::DescribeZonesRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "DescribeZones") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeZonesRequest::~DescribeZonesRequest() {}
|
||||
|
||||
std::string DescribeZonesRequest::getAcceptLanguage() const {
|
||||
return acceptLanguage_;
|
||||
}
|
||||
|
||||
void DescribeZonesRequest::setAcceptLanguage(const std::string &acceptLanguage) {
|
||||
acceptLanguage_ = acceptLanguage;
|
||||
setBodyParameter(std::string("AcceptLanguage"), acceptLanguage);
|
||||
}
|
||||
|
||||
59
gwlb/src/model/DescribeZonesResult.cc
Normal file
59
gwlb/src/model/DescribeZonesResult.cc
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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/gwlb/model/DescribeZonesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
DescribeZonesResult::DescribeZonesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeZonesResult::DescribeZonesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeZonesResult::~DescribeZonesResult()
|
||||
{}
|
||||
|
||||
void DescribeZonesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allZonesNode = value["Zones"]["Data"];
|
||||
for (auto valueZonesData : allZonesNode)
|
||||
{
|
||||
Data zonesObject;
|
||||
if(!valueZonesData["LocalName"].isNull())
|
||||
zonesObject.localName = valueZonesData["LocalName"].asString();
|
||||
if(!valueZonesData["ZoneId"].isNull())
|
||||
zonesObject.zoneId = valueZonesData["ZoneId"].asString();
|
||||
zones_.push_back(zonesObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeZonesResult::Data> DescribeZonesResult::getZones()const
|
||||
{
|
||||
return zones_;
|
||||
}
|
||||
|
||||
36
gwlb/src/model/GetListenerAttributeRequest.cc
Normal file
36
gwlb/src/model/GetListenerAttributeRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/GetListenerAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::GetListenerAttributeRequest;
|
||||
|
||||
GetListenerAttributeRequest::GetListenerAttributeRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "GetListenerAttribute") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetListenerAttributeRequest::~GetListenerAttributeRequest() {}
|
||||
|
||||
std::string GetListenerAttributeRequest::getListenerId() const {
|
||||
return listenerId_;
|
||||
}
|
||||
|
||||
void GetListenerAttributeRequest::setListenerId(const std::string &listenerId) {
|
||||
listenerId_ = listenerId;
|
||||
setBodyParameter(std::string("ListenerId"), listenerId);
|
||||
}
|
||||
|
||||
101
gwlb/src/model/GetListenerAttributeResult.cc
Normal file
101
gwlb/src/model/GetListenerAttributeResult.cc
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* 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/gwlb/model/GetListenerAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
GetListenerAttributeResult::GetListenerAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetListenerAttributeResult::GetListenerAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetListenerAttributeResult::~GetListenerAttributeResult()
|
||||
{}
|
||||
|
||||
void GetListenerAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagsNode = value["Tags"]["TagModel"];
|
||||
for (auto valueTagsTagModel : allTagsNode)
|
||||
{
|
||||
TagModel tagsObject;
|
||||
if(!valueTagsTagModel["Key"].isNull())
|
||||
tagsObject.key = valueTagsTagModel["Key"].asString();
|
||||
if(!valueTagsTagModel["Value"].isNull())
|
||||
tagsObject.value = valueTagsTagModel["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
if(!value["ListenerDescription"].isNull())
|
||||
listenerDescription_ = value["ListenerDescription"].asString();
|
||||
if(!value["ListenerId"].isNull())
|
||||
listenerId_ = value["ListenerId"].asString();
|
||||
if(!value["ListenerStatus"].isNull())
|
||||
listenerStatus_ = value["ListenerStatus"].asString();
|
||||
if(!value["LoadBalancerId"].isNull())
|
||||
loadBalancerId_ = value["LoadBalancerId"].asString();
|
||||
if(!value["RegionId"].isNull())
|
||||
regionId_ = value["RegionId"].asString();
|
||||
if(!value["ServerGroupId"].isNull())
|
||||
serverGroupId_ = value["ServerGroupId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetListenerAttributeResult::getListenerStatus()const
|
||||
{
|
||||
return listenerStatus_;
|
||||
}
|
||||
|
||||
std::string GetListenerAttributeResult::getListenerDescription()const
|
||||
{
|
||||
return listenerDescription_;
|
||||
}
|
||||
|
||||
std::string GetListenerAttributeResult::getServerGroupId()const
|
||||
{
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
std::string GetListenerAttributeResult::getLoadBalancerId()const
|
||||
{
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
std::string GetListenerAttributeResult::getRegionId()const
|
||||
{
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
std::vector<GetListenerAttributeResult::TagModel> GetListenerAttributeResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
std::string GetListenerAttributeResult::getListenerId()const
|
||||
{
|
||||
return listenerId_;
|
||||
}
|
||||
|
||||
77
gwlb/src/model/GetListenerHealthStatusRequest.cc
Normal file
77
gwlb/src/model/GetListenerHealthStatusRequest.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/gwlb/model/GetListenerHealthStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::GetListenerHealthStatusRequest;
|
||||
|
||||
GetListenerHealthStatusRequest::GetListenerHealthStatusRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "GetListenerHealthStatus") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetListenerHealthStatusRequest::~GetListenerHealthStatusRequest() {}
|
||||
|
||||
int GetListenerHealthStatusRequest::getSkip() const {
|
||||
return skip_;
|
||||
}
|
||||
|
||||
void GetListenerHealthStatusRequest::setSkip(int skip) {
|
||||
skip_ = skip;
|
||||
setBodyParameter(std::string("Skip"), std::to_string(skip));
|
||||
}
|
||||
|
||||
std::string GetListenerHealthStatusRequest::getListenerId() const {
|
||||
return listenerId_;
|
||||
}
|
||||
|
||||
void GetListenerHealthStatusRequest::setListenerId(const std::string &listenerId) {
|
||||
listenerId_ = listenerId;
|
||||
setBodyParameter(std::string("ListenerId"), listenerId);
|
||||
}
|
||||
|
||||
std::string GetListenerHealthStatusRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void GetListenerHealthStatusRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setBodyParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<GetListenerHealthStatusRequest::Filter> GetListenerHealthStatusRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void GetListenerHealthStatusRequest::setFilter(const std::vector<GetListenerHealthStatusRequest::Filter> &filter) {
|
||||
filter_ = filter;
|
||||
for(int dep1 = 0; dep1 != filter.size(); dep1++) {
|
||||
setBodyParameter(std::string("Filter") + "." + std::to_string(dep1 + 1) + ".Name", filter[dep1].name);
|
||||
for(int dep2 = 0; dep2 != filter[dep1].values.size(); dep2++) {
|
||||
setBodyParameter(std::string("Filter") + "." + std::to_string(dep1 + 1) + ".Values." + std::to_string(dep2 + 1), filter[dep1].values[dep2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int GetListenerHealthStatusRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void GetListenerHealthStatusRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
105
gwlb/src/model/GetListenerHealthStatusResult.cc
Normal file
105
gwlb/src/model/GetListenerHealthStatusResult.cc
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* 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/gwlb/model/GetListenerHealthStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
GetListenerHealthStatusResult::GetListenerHealthStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetListenerHealthStatusResult::GetListenerHealthStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetListenerHealthStatusResult::~GetListenerHealthStatusResult()
|
||||
{}
|
||||
|
||||
void GetListenerHealthStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allListenerHealthStatusNode = value["ListenerHealthStatus"]["listenerHealthStatusItem"];
|
||||
for (auto valueListenerHealthStatuslistenerHealthStatusItem : allListenerHealthStatusNode)
|
||||
{
|
||||
ListenerHealthStatusItem listenerHealthStatusObject;
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItem["ListenerId"].isNull())
|
||||
listenerHealthStatusObject.listenerId = valueListenerHealthStatuslistenerHealthStatusItem["ListenerId"].asString();
|
||||
auto allServerGroupInfosNode = valueListenerHealthStatuslistenerHealthStatusItem["ServerGroupInfos"]["ServerGroupInfo"];
|
||||
for (auto valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfo : allServerGroupInfosNode)
|
||||
{
|
||||
ListenerHealthStatusItem::ServerGroupInfo serverGroupInfosObject;
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfo["HealthCheckEnabled"].isNull())
|
||||
serverGroupInfosObject.healthCheckEnabled = valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfo["HealthCheckEnabled"].asString() == "true";
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfo["ServerGroupId"].isNull())
|
||||
serverGroupInfosObject.serverGroupId = valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfo["ServerGroupId"].asString();
|
||||
auto allServersNode = valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfo["Servers"]["server"];
|
||||
for (auto valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver : allServersNode)
|
||||
{
|
||||
ListenerHealthStatusItem::ServerGroupInfo::Server serversObject;
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["Port"].isNull())
|
||||
serversObject.port = std::stoi(valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["Port"].asString());
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["ServerId"].isNull())
|
||||
serversObject.serverId = valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["ServerId"].asString();
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["ServerIp"].isNull())
|
||||
serversObject.serverIp = valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["ServerIp"].asString();
|
||||
if(!valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["Status"].isNull())
|
||||
serversObject.status = valueListenerHealthStatuslistenerHealthStatusItemServerGroupInfosServerGroupInfoServersserver["Status"].asString();
|
||||
auto reasonNode = value["Reason"];
|
||||
if(!reasonNode["ReasonCode"].isNull())
|
||||
serversObject.reason.reasonCode = reasonNode["ReasonCode"].asString();
|
||||
serverGroupInfosObject.servers.push_back(serversObject);
|
||||
}
|
||||
listenerHealthStatusObject.serverGroupInfos.push_back(serverGroupInfosObject);
|
||||
}
|
||||
listenerHealthStatus_.push_back(listenerHealthStatusObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetListenerHealthStatusResult::ListenerHealthStatusItem> GetListenerHealthStatusResult::getListenerHealthStatus()const
|
||||
{
|
||||
return listenerHealthStatus_;
|
||||
}
|
||||
|
||||
int GetListenerHealthStatusResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string GetListenerHealthStatusResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
int GetListenerHealthStatusResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
36
gwlb/src/model/GetLoadBalancerAttributeRequest.cc
Normal file
36
gwlb/src/model/GetLoadBalancerAttributeRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/gwlb/model/GetLoadBalancerAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::GetLoadBalancerAttributeRequest;
|
||||
|
||||
GetLoadBalancerAttributeRequest::GetLoadBalancerAttributeRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "GetLoadBalancerAttribute") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetLoadBalancerAttributeRequest::~GetLoadBalancerAttributeRequest() {}
|
||||
|
||||
std::string GetLoadBalancerAttributeRequest::getLoadBalancerId() const {
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void GetLoadBalancerAttributeRequest::setLoadBalancerId(const std::string &loadBalancerId) {
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
setBodyParameter(std::string("LoadBalancerId"), loadBalancerId);
|
||||
}
|
||||
|
||||
147
gwlb/src/model/GetLoadBalancerAttributeResult.cc
Normal file
147
gwlb/src/model/GetLoadBalancerAttributeResult.cc
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
* 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/gwlb/model/GetLoadBalancerAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
GetLoadBalancerAttributeResult::GetLoadBalancerAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetLoadBalancerAttributeResult::GetLoadBalancerAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetLoadBalancerAttributeResult::~GetLoadBalancerAttributeResult()
|
||||
{}
|
||||
|
||||
void GetLoadBalancerAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagsNode = value["Tags"]["TagModel"];
|
||||
for (auto valueTagsTagModel : allTagsNode)
|
||||
{
|
||||
TagModel tagsObject;
|
||||
if(!valueTagsTagModel["Key"].isNull())
|
||||
tagsObject.key = valueTagsTagModel["Key"].asString();
|
||||
if(!valueTagsTagModel["Value"].isNull())
|
||||
tagsObject.value = valueTagsTagModel["Value"].asString();
|
||||
tags_.push_back(tagsObject);
|
||||
}
|
||||
auto allZoneMappingsNode = value["ZoneMappings"]["ZoneEniModel"];
|
||||
for (auto valueZoneMappingsZoneEniModel : allZoneMappingsNode)
|
||||
{
|
||||
ZoneEniModel zoneMappingsObject;
|
||||
if(!valueZoneMappingsZoneEniModel["VSwitchId"].isNull())
|
||||
zoneMappingsObject.vSwitchId = valueZoneMappingsZoneEniModel["VSwitchId"].asString();
|
||||
if(!valueZoneMappingsZoneEniModel["ZoneId"].isNull())
|
||||
zoneMappingsObject.zoneId = valueZoneMappingsZoneEniModel["ZoneId"].asString();
|
||||
auto allLoadBalancerAddressesNode = valueZoneMappingsZoneEniModel["LoadBalancerAddresses"]["EniModels"];
|
||||
for (auto valueZoneMappingsZoneEniModelLoadBalancerAddressesEniModels : allLoadBalancerAddressesNode)
|
||||
{
|
||||
ZoneEniModel::EniModels loadBalancerAddressesObject;
|
||||
if(!valueZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["EniId"].isNull())
|
||||
loadBalancerAddressesObject.eniId = valueZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["EniId"].asString();
|
||||
if(!valueZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["PrivateIpv4Address"].isNull())
|
||||
loadBalancerAddressesObject.privateIpv4Address = valueZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["PrivateIpv4Address"].asString();
|
||||
zoneMappingsObject.loadBalancerAddresses.push_back(loadBalancerAddressesObject);
|
||||
}
|
||||
zoneMappings_.push_back(zoneMappingsObject);
|
||||
}
|
||||
if(!value["AddressIpVersion"].isNull())
|
||||
addressIpVersion_ = value["AddressIpVersion"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["CrossZoneEnabled"].isNull())
|
||||
crossZoneEnabled_ = value["CrossZoneEnabled"].asString() == "true";
|
||||
if(!value["LoadBalancerBusinessStatus"].isNull())
|
||||
loadBalancerBusinessStatus_ = value["LoadBalancerBusinessStatus"].asString();
|
||||
if(!value["LoadBalancerId"].isNull())
|
||||
loadBalancerId_ = value["LoadBalancerId"].asString();
|
||||
if(!value["LoadBalancerName"].isNull())
|
||||
loadBalancerName_ = value["LoadBalancerName"].asString();
|
||||
if(!value["LoadBalancerStatus"].isNull())
|
||||
loadBalancerStatus_ = value["LoadBalancerStatus"].asString();
|
||||
if(!value["ResourceGroupId"].isNull())
|
||||
resourceGroupId_ = value["ResourceGroupId"].asString();
|
||||
if(!value["VpcId"].isNull())
|
||||
vpcId_ = value["VpcId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getLoadBalancerName()const
|
||||
{
|
||||
return loadBalancerName_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getAddressIpVersion()const
|
||||
{
|
||||
return addressIpVersion_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getResourceGroupId()const
|
||||
{
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getVpcId()const
|
||||
{
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getLoadBalancerId()const
|
||||
{
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
std::vector<GetLoadBalancerAttributeResult::ZoneEniModel> GetLoadBalancerAttributeResult::getZoneMappings()const
|
||||
{
|
||||
return zoneMappings_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getLoadBalancerBusinessStatus()const
|
||||
{
|
||||
return loadBalancerBusinessStatus_;
|
||||
}
|
||||
|
||||
std::string GetLoadBalancerAttributeResult::getLoadBalancerStatus()const
|
||||
{
|
||||
return loadBalancerStatus_;
|
||||
}
|
||||
|
||||
std::vector<GetLoadBalancerAttributeResult::TagModel> GetLoadBalancerAttributeResult::getTags()const
|
||||
{
|
||||
return tags_;
|
||||
}
|
||||
|
||||
bool GetLoadBalancerAttributeResult::getCrossZoneEnabled()const
|
||||
{
|
||||
return crossZoneEnabled_;
|
||||
}
|
||||
|
||||
88
gwlb/src/model/ListListenersRequest.cc
Normal file
88
gwlb/src/model/ListListenersRequest.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListListenersRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::ListListenersRequest;
|
||||
|
||||
ListListenersRequest::ListListenersRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "ListListeners") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListListenersRequest::~ListListenersRequest() {}
|
||||
|
||||
std::vector<ListListenersRequest::std::string> ListListenersRequest::getLoadBalancerIds() const {
|
||||
return loadBalancerIds_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setLoadBalancerIds(const std::vector<ListListenersRequest::std::string> &loadBalancerIds) {
|
||||
loadBalancerIds_ = loadBalancerIds;
|
||||
for(int dep1 = 0; dep1 != loadBalancerIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("LoadBalancerIds") + "." + std::to_string(dep1 + 1), loadBalancerIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
long ListListenersRequest::getSkip() const {
|
||||
return skip_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setSkip(long skip) {
|
||||
skip_ = skip;
|
||||
setBodyParameter(std::string("Skip"), std::to_string(skip));
|
||||
}
|
||||
|
||||
std::string ListListenersRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setBodyParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListListenersRequest::Tag> ListListenersRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setTag(const std::vector<ListListenersRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListListenersRequest::std::string> ListListenersRequest::getListenerIds() const {
|
||||
return listenerIds_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setListenerIds(const std::vector<ListListenersRequest::std::string> &listenerIds) {
|
||||
listenerIds_ = listenerIds;
|
||||
for(int dep1 = 0; dep1 != listenerIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("ListenerIds") + "." + std::to_string(dep1 + 1), listenerIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
int ListListenersRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListListenersRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
96
gwlb/src/model/ListListenersResult.cc
Normal file
96
gwlb/src/model/ListListenersResult.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListListenersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
ListListenersResult::ListListenersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListListenersResult::ListListenersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListListenersResult::~ListListenersResult()
|
||||
{}
|
||||
|
||||
void ListListenersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allListenersNode = value["Listeners"]["listener"];
|
||||
for (auto valueListenerslistener : allListenersNode)
|
||||
{
|
||||
Listener listenersObject;
|
||||
if(!valueListenerslistener["ListenerDescription"].isNull())
|
||||
listenersObject.listenerDescription = valueListenerslistener["ListenerDescription"].asString();
|
||||
if(!valueListenerslistener["ListenerId"].isNull())
|
||||
listenersObject.listenerId = valueListenerslistener["ListenerId"].asString();
|
||||
if(!valueListenerslistener["ListenerStatus"].isNull())
|
||||
listenersObject.listenerStatus = valueListenerslistener["ListenerStatus"].asString();
|
||||
if(!valueListenerslistener["LoadBalancerId"].isNull())
|
||||
listenersObject.loadBalancerId = valueListenerslistener["LoadBalancerId"].asString();
|
||||
if(!valueListenerslistener["ServerGroupId"].isNull())
|
||||
listenersObject.serverGroupId = valueListenerslistener["ServerGroupId"].asString();
|
||||
auto allTagsNode = valueListenerslistener["Tags"]["TagModel"];
|
||||
for (auto valueListenerslistenerTagsTagModel : allTagsNode)
|
||||
{
|
||||
Listener::TagModel tagsObject;
|
||||
if(!valueListenerslistenerTagsTagModel["Key"].isNull())
|
||||
tagsObject.key = valueListenerslistenerTagsTagModel["Key"].asString();
|
||||
if(!valueListenerslistenerTagsTagModel["Value"].isNull())
|
||||
tagsObject.value = valueListenerslistenerTagsTagModel["Value"].asString();
|
||||
listenersObject.tags.push_back(tagsObject);
|
||||
}
|
||||
listeners_.push_back(listenersObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListListenersResult::Listener> ListListenersResult::getListeners()const
|
||||
{
|
||||
return listeners_;
|
||||
}
|
||||
|
||||
int ListListenersResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListListenersResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
int ListListenersResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
146
gwlb/src/model/ListLoadBalancersRequest.cc
Normal file
146
gwlb/src/model/ListLoadBalancersRequest.cc
Normal file
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListLoadBalancersRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::ListLoadBalancersRequest;
|
||||
|
||||
ListLoadBalancersRequest::ListLoadBalancersRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "ListLoadBalancers") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListLoadBalancersRequest::~ListLoadBalancersRequest() {}
|
||||
|
||||
std::vector<ListLoadBalancersRequest::std::string> ListLoadBalancersRequest::getLoadBalancerNames() const {
|
||||
return loadBalancerNames_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setLoadBalancerNames(const std::vector<ListLoadBalancersRequest::std::string> &loadBalancerNames) {
|
||||
loadBalancerNames_ = loadBalancerNames;
|
||||
for(int dep1 = 0; dep1 != loadBalancerNames.size(); dep1++) {
|
||||
setBodyParameter(std::string("LoadBalancerNames") + "." + std::to_string(dep1 + 1), loadBalancerNames[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListLoadBalancersRequest::std::string> ListLoadBalancersRequest::getLoadBalancerIds() const {
|
||||
return loadBalancerIds_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setLoadBalancerIds(const std::vector<ListLoadBalancersRequest::std::string> &loadBalancerIds) {
|
||||
loadBalancerIds_ = loadBalancerIds;
|
||||
for(int dep1 = 0; dep1 != loadBalancerIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("LoadBalancerIds") + "." + std::to_string(dep1 + 1), loadBalancerIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
int ListLoadBalancersRequest::getSkip() const {
|
||||
return skip_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setSkip(int skip) {
|
||||
skip_ = skip;
|
||||
setBodyParameter(std::string("Skip"), std::to_string(skip));
|
||||
}
|
||||
|
||||
std::string ListLoadBalancersRequest::getAddressIpVersion() const {
|
||||
return addressIpVersion_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setAddressIpVersion(const std::string &addressIpVersion) {
|
||||
addressIpVersion_ = addressIpVersion;
|
||||
setBodyParameter(std::string("AddressIpVersion"), addressIpVersion);
|
||||
}
|
||||
|
||||
std::string ListLoadBalancersRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setBodyParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::vector<ListLoadBalancersRequest::std::string> ListLoadBalancersRequest::getZoneIds() const {
|
||||
return zoneIds_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setZoneIds(const std::vector<ListLoadBalancersRequest::std::string> &zoneIds) {
|
||||
zoneIds_ = zoneIds;
|
||||
for(int dep1 = 0; dep1 != zoneIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("ZoneIds") + "." + std::to_string(dep1 + 1), zoneIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListLoadBalancersRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setBodyParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListLoadBalancersRequest::std::string> ListLoadBalancersRequest::getVpcIds() const {
|
||||
return vpcIds_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setVpcIds(const std::vector<ListLoadBalancersRequest::std::string> &vpcIds) {
|
||||
vpcIds_ = vpcIds;
|
||||
for(int dep1 = 0; dep1 != vpcIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("VpcIds") + "." + std::to_string(dep1 + 1), vpcIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListLoadBalancersRequest::Tag> ListLoadBalancersRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setTag(const std::vector<ListLoadBalancersRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListLoadBalancersRequest::getLoadBalancerBusinessStatus() const {
|
||||
return loadBalancerBusinessStatus_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setLoadBalancerBusinessStatus(const std::string &loadBalancerBusinessStatus) {
|
||||
loadBalancerBusinessStatus_ = loadBalancerBusinessStatus;
|
||||
setBodyParameter(std::string("LoadBalancerBusinessStatus"), loadBalancerBusinessStatus);
|
||||
}
|
||||
|
||||
std::string ListLoadBalancersRequest::getLoadBalancerStatus() const {
|
||||
return loadBalancerStatus_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setLoadBalancerStatus(const std::string &loadBalancerStatus) {
|
||||
loadBalancerStatus_ = loadBalancerStatus;
|
||||
setBodyParameter(std::string("LoadBalancerStatus"), loadBalancerStatus);
|
||||
}
|
||||
|
||||
int ListLoadBalancersRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListLoadBalancersRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
124
gwlb/src/model/ListLoadBalancersResult.cc
Normal file
124
gwlb/src/model/ListLoadBalancersResult.cc
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListLoadBalancersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
ListLoadBalancersResult::ListLoadBalancersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListLoadBalancersResult::ListLoadBalancersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListLoadBalancersResult::~ListLoadBalancersResult()
|
||||
{}
|
||||
|
||||
void ListLoadBalancersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLoadBalancersNode = value["LoadBalancers"]["Data"];
|
||||
for (auto valueLoadBalancersData : allLoadBalancersNode)
|
||||
{
|
||||
Data loadBalancersObject;
|
||||
if(!valueLoadBalancersData["AddressIpVersion"].isNull())
|
||||
loadBalancersObject.addressIpVersion = valueLoadBalancersData["AddressIpVersion"].asString();
|
||||
if(!valueLoadBalancersData["CreateTime"].isNull())
|
||||
loadBalancersObject.createTime = valueLoadBalancersData["CreateTime"].asString();
|
||||
if(!valueLoadBalancersData["CrossZoneEnabled"].isNull())
|
||||
loadBalancersObject.crossZoneEnabled = valueLoadBalancersData["CrossZoneEnabled"].asString() == "true";
|
||||
if(!valueLoadBalancersData["LoadBalancerBusinessStatus"].isNull())
|
||||
loadBalancersObject.loadBalancerBusinessStatus = valueLoadBalancersData["LoadBalancerBusinessStatus"].asString();
|
||||
if(!valueLoadBalancersData["LoadBalancerId"].isNull())
|
||||
loadBalancersObject.loadBalancerId = valueLoadBalancersData["LoadBalancerId"].asString();
|
||||
if(!valueLoadBalancersData["LoadBalancerName"].isNull())
|
||||
loadBalancersObject.loadBalancerName = valueLoadBalancersData["LoadBalancerName"].asString();
|
||||
if(!valueLoadBalancersData["LoadBalancerStatus"].isNull())
|
||||
loadBalancersObject.loadBalancerStatus = valueLoadBalancersData["LoadBalancerStatus"].asString();
|
||||
if(!valueLoadBalancersData["ResourceGroupId"].isNull())
|
||||
loadBalancersObject.resourceGroupId = valueLoadBalancersData["ResourceGroupId"].asString();
|
||||
if(!valueLoadBalancersData["VpcId"].isNull())
|
||||
loadBalancersObject.vpcId = valueLoadBalancersData["VpcId"].asString();
|
||||
auto allTagsNode = valueLoadBalancersData["Tags"]["TagModel"];
|
||||
for (auto valueLoadBalancersDataTagsTagModel : allTagsNode)
|
||||
{
|
||||
Data::TagModel tagsObject;
|
||||
if(!valueLoadBalancersDataTagsTagModel["Key"].isNull())
|
||||
tagsObject.key = valueLoadBalancersDataTagsTagModel["Key"].asString();
|
||||
if(!valueLoadBalancersDataTagsTagModel["Value"].isNull())
|
||||
tagsObject.value = valueLoadBalancersDataTagsTagModel["Value"].asString();
|
||||
loadBalancersObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto allZoneMappingsNode = valueLoadBalancersData["ZoneMappings"]["ZoneEniModel"];
|
||||
for (auto valueLoadBalancersDataZoneMappingsZoneEniModel : allZoneMappingsNode)
|
||||
{
|
||||
Data::ZoneEniModel zoneMappingsObject;
|
||||
if(!valueLoadBalancersDataZoneMappingsZoneEniModel["VSwitchId"].isNull())
|
||||
zoneMappingsObject.vSwitchId = valueLoadBalancersDataZoneMappingsZoneEniModel["VSwitchId"].asString();
|
||||
if(!valueLoadBalancersDataZoneMappingsZoneEniModel["ZoneId"].isNull())
|
||||
zoneMappingsObject.zoneId = valueLoadBalancersDataZoneMappingsZoneEniModel["ZoneId"].asString();
|
||||
auto allLoadBalancerAddressesNode = valueLoadBalancersDataZoneMappingsZoneEniModel["LoadBalancerAddresses"]["EniModels"];
|
||||
for (auto valueLoadBalancersDataZoneMappingsZoneEniModelLoadBalancerAddressesEniModels : allLoadBalancerAddressesNode)
|
||||
{
|
||||
Data::ZoneEniModel::EniModels loadBalancerAddressesObject;
|
||||
if(!valueLoadBalancersDataZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["EniId"].isNull())
|
||||
loadBalancerAddressesObject.eniId = valueLoadBalancersDataZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["EniId"].asString();
|
||||
if(!valueLoadBalancersDataZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["PrivateIpv4Address"].isNull())
|
||||
loadBalancerAddressesObject.privateIpv4Address = valueLoadBalancersDataZoneMappingsZoneEniModelLoadBalancerAddressesEniModels["PrivateIpv4Address"].asString();
|
||||
zoneMappingsObject.loadBalancerAddresses.push_back(loadBalancerAddressesObject);
|
||||
}
|
||||
loadBalancersObject.zoneMappings.push_back(zoneMappingsObject);
|
||||
}
|
||||
loadBalancers_.push_back(loadBalancersObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListLoadBalancersResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListLoadBalancersResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
int ListLoadBalancersResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
std::vector<ListLoadBalancersResult::Data> ListLoadBalancersResult::getLoadBalancers()const
|
||||
{
|
||||
return loadBalancers_;
|
||||
}
|
||||
|
||||
85
gwlb/src/model/ListServerGroupServersRequest.cc
Normal file
85
gwlb/src/model/ListServerGroupServersRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListServerGroupServersRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::ListServerGroupServersRequest;
|
||||
|
||||
ListServerGroupServersRequest::ListServerGroupServersRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "ListServerGroupServers") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServerGroupServersRequest::~ListServerGroupServersRequest() {}
|
||||
|
||||
int ListServerGroupServersRequest::getSkip() const {
|
||||
return skip_;
|
||||
}
|
||||
|
||||
void ListServerGroupServersRequest::setSkip(int skip) {
|
||||
skip_ = skip;
|
||||
setBodyParameter(std::string("Skip"), std::to_string(skip));
|
||||
}
|
||||
|
||||
std::string ListServerGroupServersRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void ListServerGroupServersRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
std::string ListServerGroupServersRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListServerGroupServersRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setBodyParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListServerGroupServersRequest::std::string> ListServerGroupServersRequest::getServerIds() const {
|
||||
return serverIds_;
|
||||
}
|
||||
|
||||
void ListServerGroupServersRequest::setServerIds(const std::vector<ListServerGroupServersRequest::std::string> &serverIds) {
|
||||
serverIds_ = serverIds;
|
||||
for(int dep1 = 0; dep1 != serverIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("ServerIds") + "." + std::to_string(dep1 + 1), serverIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListServerGroupServersRequest::std::string> ListServerGroupServersRequest::getServerIps() const {
|
||||
return serverIps_;
|
||||
}
|
||||
|
||||
void ListServerGroupServersRequest::setServerIps(const std::vector<ListServerGroupServersRequest::std::string> &serverIps) {
|
||||
serverIps_ = serverIps;
|
||||
for(int dep1 = 0; dep1 != serverIps.size(); dep1++) {
|
||||
setBodyParameter(std::string("ServerIps") + "." + std::to_string(dep1 + 1), serverIps[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
int ListServerGroupServersRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListServerGroupServersRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
88
gwlb/src/model/ListServerGroupServersResult.cc
Normal file
88
gwlb/src/model/ListServerGroupServersResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListServerGroupServersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
ListServerGroupServersResult::ListServerGroupServersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServerGroupServersResult::ListServerGroupServersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServerGroupServersResult::~ListServerGroupServersResult()
|
||||
{}
|
||||
|
||||
void ListServerGroupServersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allServersNode = value["Servers"]["Server"];
|
||||
for (auto valueServersServer : allServersNode)
|
||||
{
|
||||
Server serversObject;
|
||||
if(!valueServersServer["Port"].isNull())
|
||||
serversObject.port = std::stoi(valueServersServer["Port"].asString());
|
||||
if(!valueServersServer["ServerGroupId"].isNull())
|
||||
serversObject.serverGroupId = valueServersServer["ServerGroupId"].asString();
|
||||
if(!valueServersServer["ServerId"].isNull())
|
||||
serversObject.serverId = valueServersServer["ServerId"].asString();
|
||||
if(!valueServersServer["ServerIp"].isNull())
|
||||
serversObject.serverIp = valueServersServer["ServerIp"].asString();
|
||||
if(!valueServersServer["ServerType"].isNull())
|
||||
serversObject.serverType = valueServersServer["ServerType"].asString();
|
||||
if(!valueServersServer["Status"].isNull())
|
||||
serversObject.status = valueServersServer["Status"].asString();
|
||||
servers_.push_back(serversObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListServerGroupServersResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListServerGroupServersResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
int ListServerGroupServersResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
std::vector<ListServerGroupServersResult::Server> ListServerGroupServersResult::getServers()const
|
||||
{
|
||||
return servers_;
|
||||
}
|
||||
|
||||
115
gwlb/src/model/ListServerGroupsRequest.cc
Normal file
115
gwlb/src/model/ListServerGroupsRequest.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListServerGroupsRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::ListServerGroupsRequest;
|
||||
|
||||
ListServerGroupsRequest::ListServerGroupsRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "ListServerGroups") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListServerGroupsRequest::~ListServerGroupsRequest() {}
|
||||
|
||||
std::vector<ListServerGroupsRequest::std::string> ListServerGroupsRequest::getServerGroupNames() const {
|
||||
return serverGroupNames_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setServerGroupNames(const std::vector<ListServerGroupsRequest::std::string> &serverGroupNames) {
|
||||
serverGroupNames_ = serverGroupNames;
|
||||
for(int dep1 = 0; dep1 != serverGroupNames.size(); dep1++) {
|
||||
setBodyParameter(std::string("ServerGroupNames") + "." + std::to_string(dep1 + 1), serverGroupNames[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
int ListServerGroupsRequest::getSkip() const {
|
||||
return skip_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setSkip(int skip) {
|
||||
skip_ = skip;
|
||||
setBodyParameter(std::string("Skip"), std::to_string(skip));
|
||||
}
|
||||
|
||||
std::string ListServerGroupsRequest::getResourceGroupId() const {
|
||||
return resourceGroupId_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setResourceGroupId(const std::string &resourceGroupId) {
|
||||
resourceGroupId_ = resourceGroupId;
|
||||
setBodyParameter(std::string("ResourceGroupId"), resourceGroupId);
|
||||
}
|
||||
|
||||
std::string ListServerGroupsRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setBodyParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListServerGroupsRequest::Tag> ListServerGroupsRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setTag(const std::vector<ListServerGroupsRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListServerGroupsRequest::std::string> ListServerGroupsRequest::getServerGroupIds() const {
|
||||
return serverGroupIds_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setServerGroupIds(const std::vector<ListServerGroupsRequest::std::string> &serverGroupIds) {
|
||||
serverGroupIds_ = serverGroupIds;
|
||||
for(int dep1 = 0; dep1 != serverGroupIds.size(); dep1++) {
|
||||
setBodyParameter(std::string("ServerGroupIds") + "." + std::to_string(dep1 + 1), serverGroupIds[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListServerGroupsRequest::getServerGroupType() const {
|
||||
return serverGroupType_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setServerGroupType(const std::string &serverGroupType) {
|
||||
serverGroupType_ = serverGroupType;
|
||||
setBodyParameter(std::string("ServerGroupType"), serverGroupType);
|
||||
}
|
||||
|
||||
std::string ListServerGroupsRequest::getVpcId() const {
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setVpcId(const std::string &vpcId) {
|
||||
vpcId_ = vpcId;
|
||||
setBodyParameter(std::string("VpcId"), vpcId);
|
||||
}
|
||||
|
||||
int ListServerGroupsRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListServerGroupsRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
136
gwlb/src/model/ListServerGroupsResult.cc
Normal file
136
gwlb/src/model/ListServerGroupsResult.cc
Normal file
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListServerGroupsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
ListServerGroupsResult::ListServerGroupsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServerGroupsResult::ListServerGroupsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServerGroupsResult::~ListServerGroupsResult()
|
||||
{}
|
||||
|
||||
void ListServerGroupsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allServerGroupsNode = value["ServerGroups"]["serverGroup"];
|
||||
for (auto valueServerGroupsserverGroup : allServerGroupsNode)
|
||||
{
|
||||
ServerGroup serverGroupsObject;
|
||||
if(!valueServerGroupsserverGroup["CreateTime"].isNull())
|
||||
serverGroupsObject.createTime = valueServerGroupsserverGroup["CreateTime"].asString();
|
||||
if(!valueServerGroupsserverGroup["Protocol"].isNull())
|
||||
serverGroupsObject.protocol = valueServerGroupsserverGroup["Protocol"].asString();
|
||||
if(!valueServerGroupsserverGroup["ResourceGroupId"].isNull())
|
||||
serverGroupsObject.resourceGroupId = valueServerGroupsserverGroup["ResourceGroupId"].asString();
|
||||
if(!valueServerGroupsserverGroup["Scheduler"].isNull())
|
||||
serverGroupsObject.scheduler = valueServerGroupsserverGroup["Scheduler"].asString();
|
||||
if(!valueServerGroupsserverGroup["ServerCount"].isNull())
|
||||
serverGroupsObject.serverCount = std::stoi(valueServerGroupsserverGroup["ServerCount"].asString());
|
||||
if(!valueServerGroupsserverGroup["ServerGroupId"].isNull())
|
||||
serverGroupsObject.serverGroupId = valueServerGroupsserverGroup["ServerGroupId"].asString();
|
||||
if(!valueServerGroupsserverGroup["ServerGroupName"].isNull())
|
||||
serverGroupsObject.serverGroupName = valueServerGroupsserverGroup["ServerGroupName"].asString();
|
||||
if(!valueServerGroupsserverGroup["ServerGroupStatus"].isNull())
|
||||
serverGroupsObject.serverGroupStatus = valueServerGroupsserverGroup["ServerGroupStatus"].asString();
|
||||
if(!valueServerGroupsserverGroup["ServerGroupType"].isNull())
|
||||
serverGroupsObject.serverGroupType = valueServerGroupsserverGroup["ServerGroupType"].asString();
|
||||
if(!valueServerGroupsserverGroup["VpcId"].isNull())
|
||||
serverGroupsObject.vpcId = valueServerGroupsserverGroup["VpcId"].asString();
|
||||
auto allTagsNode = valueServerGroupsserverGroup["Tags"]["TagModel"];
|
||||
for (auto valueServerGroupsserverGroupTagsTagModel : allTagsNode)
|
||||
{
|
||||
ServerGroup::TagModel tagsObject;
|
||||
if(!valueServerGroupsserverGroupTagsTagModel["Key"].isNull())
|
||||
tagsObject.key = valueServerGroupsserverGroupTagsTagModel["Key"].asString();
|
||||
if(!valueServerGroupsserverGroupTagsTagModel["Value"].isNull())
|
||||
tagsObject.value = valueServerGroupsserverGroupTagsTagModel["Value"].asString();
|
||||
serverGroupsObject.tags.push_back(tagsObject);
|
||||
}
|
||||
auto connectionDrainConfigNode = value["ConnectionDrainConfig"];
|
||||
if(!connectionDrainConfigNode["ConnectionDrainEnabled"].isNull())
|
||||
serverGroupsObject.connectionDrainConfig.connectionDrainEnabled = connectionDrainConfigNode["ConnectionDrainEnabled"].asString() == "true";
|
||||
if(!connectionDrainConfigNode["ConnectionDrainTimeout"].isNull())
|
||||
serverGroupsObject.connectionDrainConfig.connectionDrainTimeout = std::stoi(connectionDrainConfigNode["ConnectionDrainTimeout"].asString());
|
||||
auto healthCheckConfigNode = value["HealthCheckConfig"];
|
||||
if(!healthCheckConfigNode["HealthCheckConnectPort"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckConnectPort = std::stoi(healthCheckConfigNode["HealthCheckConnectPort"].asString());
|
||||
if(!healthCheckConfigNode["HealthCheckConnectTimeout"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckConnectTimeout = std::stoi(healthCheckConfigNode["HealthCheckConnectTimeout"].asString());
|
||||
if(!healthCheckConfigNode["HealthCheckDomain"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckDomain = healthCheckConfigNode["HealthCheckDomain"].asString();
|
||||
if(!healthCheckConfigNode["HealthCheckEnabled"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckEnabled = healthCheckConfigNode["HealthCheckEnabled"].asString() == "true";
|
||||
if(!healthCheckConfigNode["HealthCheckInterval"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckInterval = std::stoi(healthCheckConfigNode["HealthCheckInterval"].asString());
|
||||
if(!healthCheckConfigNode["HealthCheckPath"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckPath = healthCheckConfigNode["HealthCheckPath"].asString();
|
||||
if(!healthCheckConfigNode["HealthCheckProtocol"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthCheckProtocol = healthCheckConfigNode["HealthCheckProtocol"].asString();
|
||||
if(!healthCheckConfigNode["HealthyThreshold"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.healthyThreshold = std::stoi(healthCheckConfigNode["HealthyThreshold"].asString());
|
||||
if(!healthCheckConfigNode["UnhealthyThreshold"].isNull())
|
||||
serverGroupsObject.healthCheckConfig.unhealthyThreshold = std::stoi(healthCheckConfigNode["UnhealthyThreshold"].asString());
|
||||
auto allHealthCheckHttpCode = healthCheckConfigNode["HealthCheckHttpCode"]["HealthCheckHttpCode"];
|
||||
for (auto value : allHealthCheckHttpCode)
|
||||
serverGroupsObject.healthCheckConfig.healthCheckHttpCode.push_back(value.asString());
|
||||
auto allRelatedLoadBalancerIds = value["RelatedLoadBalancerIds"]["LoadBalancerId"];
|
||||
for (auto value : allRelatedLoadBalancerIds)
|
||||
serverGroupsObject.relatedLoadBalancerIds.push_back(value.asString());
|
||||
serverGroups_.push_back(serverGroupsObject);
|
||||
}
|
||||
if(!value["MaxResults"].isNull())
|
||||
maxResults_ = std::stoi(value["MaxResults"].asString());
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListServerGroupsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::string ListServerGroupsResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::vector<ListServerGroupsResult::ServerGroup> ListServerGroupsResult::getServerGroups()const
|
||||
{
|
||||
return serverGroups_;
|
||||
}
|
||||
|
||||
int ListServerGroupsResult::getMaxResults()const
|
||||
{
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
77
gwlb/src/model/ListTagResourcesRequest.cc
Normal file
77
gwlb/src/model/ListTagResourcesRequest.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListTagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::ListTagResourcesRequest;
|
||||
|
||||
ListTagResourcesRequest::ListTagResourcesRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "ListTagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListTagResourcesRequest::~ListTagResourcesRequest() {}
|
||||
|
||||
std::string ListTagResourcesRequest::getNextToken() const {
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setNextToken(const std::string &nextToken) {
|
||||
nextToken_ = nextToken;
|
||||
setBodyParameter(std::string("NextToken"), nextToken);
|
||||
}
|
||||
|
||||
std::vector<ListTagResourcesRequest::Tag> ListTagResourcesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setTag(const std::vector<ListTagResourcesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<ListTagResourcesRequest::std::string> ListTagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceId(const std::vector<ListTagResourcesRequest::std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
for(int dep1 = 0; dep1 != resourceId.size(); dep1++) {
|
||||
setBodyParameter(std::string("ResourceId") + "." + std::to_string(dep1 + 1), resourceId[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ListTagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setBodyParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
int ListTagResourcesRequest::getMaxResults() const {
|
||||
return maxResults_;
|
||||
}
|
||||
|
||||
void ListTagResourcesRequest::setMaxResults(int maxResults) {
|
||||
maxResults_ = maxResults;
|
||||
setBodyParameter(std::string("MaxResults"), std::to_string(maxResults));
|
||||
}
|
||||
|
||||
70
gwlb/src/model/ListTagResourcesResult.cc
Normal file
70
gwlb/src/model/ListTagResourcesResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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/gwlb/model/ListTagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
ListTagResourcesResult::ListTagResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListTagResourcesResult::ListTagResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListTagResourcesResult::~ListTagResourcesResult()
|
||||
{}
|
||||
|
||||
void ListTagResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allTagResourcesNode = value["TagResources"]["tagResource"];
|
||||
for (auto valueTagResourcestagResource : allTagResourcesNode)
|
||||
{
|
||||
TagResource tagResourcesObject;
|
||||
if(!valueTagResourcestagResource["ResourceId"].isNull())
|
||||
tagResourcesObject.resourceId = valueTagResourcestagResource["ResourceId"].asString();
|
||||
if(!valueTagResourcestagResource["ResourceType"].isNull())
|
||||
tagResourcesObject.resourceType = valueTagResourcestagResource["ResourceType"].asString();
|
||||
if(!valueTagResourcestagResource["TagKey"].isNull())
|
||||
tagResourcesObject.tagKey = valueTagResourcestagResource["TagKey"].asString();
|
||||
if(!valueTagResourcestagResource["TagValue"].isNull())
|
||||
tagResourcesObject.tagValue = valueTagResourcestagResource["TagValue"].asString();
|
||||
tagResources_.push_back(tagResourcesObject);
|
||||
}
|
||||
if(!value["NextToken"].isNull())
|
||||
nextToken_ = value["NextToken"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListTagResourcesResult::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
std::vector<ListTagResourcesResult::TagResource> ListTagResourcesResult::getTagResources()const
|
||||
{
|
||||
return tagResources_;
|
||||
}
|
||||
|
||||
72
gwlb/src/model/MoveResourceGroupRequest.cc
Normal file
72
gwlb/src/model/MoveResourceGroupRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/gwlb/model/MoveResourceGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::MoveResourceGroupRequest;
|
||||
|
||||
MoveResourceGroupRequest::MoveResourceGroupRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "MoveResourceGroup") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
MoveResourceGroupRequest::~MoveResourceGroupRequest() {}
|
||||
|
||||
std::string MoveResourceGroupRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string MoveResourceGroupRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setBodyParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
bool MoveResourceGroupRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string MoveResourceGroupRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setBodyParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::string MoveResourceGroupRequest::getNewResourceGroupId() const {
|
||||
return newResourceGroupId_;
|
||||
}
|
||||
|
||||
void MoveResourceGroupRequest::setNewResourceGroupId(const std::string &newResourceGroupId) {
|
||||
newResourceGroupId_ = newResourceGroupId;
|
||||
setBodyParameter(std::string("NewResourceGroupId"), newResourceGroupId);
|
||||
}
|
||||
|
||||
44
gwlb/src/model/MoveResourceGroupResult.cc
Normal file
44
gwlb/src/model/MoveResourceGroupResult.cc
Normal 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/gwlb/model/MoveResourceGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
MoveResourceGroupResult::MoveResourceGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
MoveResourceGroupResult::MoveResourceGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
MoveResourceGroupResult::~MoveResourceGroupResult()
|
||||
{}
|
||||
|
||||
void MoveResourceGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
68
gwlb/src/model/RemoveServersFromServerGroupRequest.cc
Normal file
68
gwlb/src/model/RemoveServersFromServerGroupRequest.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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/gwlb/model/RemoveServersFromServerGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::RemoveServersFromServerGroupRequest;
|
||||
|
||||
RemoveServersFromServerGroupRequest::RemoveServersFromServerGroupRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "RemoveServersFromServerGroup") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RemoveServersFromServerGroupRequest::~RemoveServersFromServerGroupRequest() {}
|
||||
|
||||
std::string RemoveServersFromServerGroupRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void RemoveServersFromServerGroupRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string RemoveServersFromServerGroupRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void RemoveServersFromServerGroupRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
std::vector<RemoveServersFromServerGroupRequest::Servers> RemoveServersFromServerGroupRequest::getServers() const {
|
||||
return servers_;
|
||||
}
|
||||
|
||||
void RemoveServersFromServerGroupRequest::setServers(const std::vector<RemoveServersFromServerGroupRequest::Servers> &servers) {
|
||||
servers_ = servers;
|
||||
for(int dep1 = 0; dep1 != servers.size(); dep1++) {
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".Port", std::to_string(servers[dep1].port));
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".ServerId", servers[dep1].serverId);
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".ServerIp", servers[dep1].serverIp);
|
||||
setBodyParameter(std::string("Servers") + "." + std::to_string(dep1 + 1) + ".ServerType", servers[dep1].serverType);
|
||||
}
|
||||
}
|
||||
|
||||
bool RemoveServersFromServerGroupRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void RemoveServersFromServerGroupRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
44
gwlb/src/model/RemoveServersFromServerGroupResult.cc
Normal file
44
gwlb/src/model/RemoveServersFromServerGroupResult.cc
Normal 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/gwlb/model/RemoveServersFromServerGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
RemoveServersFromServerGroupResult::RemoveServersFromServerGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RemoveServersFromServerGroupResult::RemoveServersFromServerGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RemoveServersFromServerGroupResult::~RemoveServersFromServerGroupResult()
|
||||
{}
|
||||
|
||||
void RemoveServersFromServerGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
77
gwlb/src/model/TagResourcesRequest.cc
Normal file
77
gwlb/src/model/TagResourcesRequest.cc
Normal file
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* 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/gwlb/model/TagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::TagResourcesRequest;
|
||||
|
||||
TagResourcesRequest::TagResourcesRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "TagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
TagResourcesRequest::~TagResourcesRequest() {}
|
||||
|
||||
std::string TagResourcesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::vector<TagResourcesRequest::Tag> TagResourcesRequest::getTag() const {
|
||||
return tag_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setTag(const std::vector<TagResourcesRequest::Tag> &tag) {
|
||||
tag_ = tag;
|
||||
for(int dep1 = 0; dep1 != tag.size(); dep1++) {
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Key", tag[dep1].key);
|
||||
setBodyParameter(std::string("Tag") + "." + std::to_string(dep1 + 1) + ".Value", tag[dep1].value);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<TagResourcesRequest::std::string> TagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setResourceId(const std::vector<TagResourcesRequest::std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
for(int dep1 = 0; dep1 != resourceId.size(); dep1++) {
|
||||
setBodyParameter(std::string("ResourceId") + "." + std::to_string(dep1 + 1), resourceId[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
bool TagResourcesRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string TagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void TagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setBodyParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
44
gwlb/src/model/TagResourcesResult.cc
Normal file
44
gwlb/src/model/TagResourcesResult.cc
Normal 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/gwlb/model/TagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
TagResourcesResult::TagResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
TagResourcesResult::TagResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
TagResourcesResult::~TagResourcesResult()
|
||||
{}
|
||||
|
||||
void TagResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
85
gwlb/src/model/UntagResourcesRequest.cc
Normal file
85
gwlb/src/model/UntagResourcesRequest.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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/gwlb/model/UntagResourcesRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::UntagResourcesRequest;
|
||||
|
||||
UntagResourcesRequest::UntagResourcesRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "UntagResources") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UntagResourcesRequest::~UntagResourcesRequest() {}
|
||||
|
||||
std::string UntagResourcesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
bool UntagResourcesRequest::getAll() const {
|
||||
return all_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setAll(bool all) {
|
||||
all_ = all;
|
||||
setBodyParameter(std::string("All"), all ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<UntagResourcesRequest::std::string> UntagResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceId(const std::vector<UntagResourcesRequest::std::string> &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
for(int dep1 = 0; dep1 != resourceId.size(); dep1++) {
|
||||
setBodyParameter(std::string("ResourceId") + "." + std::to_string(dep1 + 1), resourceId[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
bool UntagResourcesRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string UntagResourcesRequest::getResourceType() const {
|
||||
return resourceType_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setResourceType(const std::string &resourceType) {
|
||||
resourceType_ = resourceType;
|
||||
setBodyParameter(std::string("ResourceType"), resourceType);
|
||||
}
|
||||
|
||||
std::vector<UntagResourcesRequest::std::string> UntagResourcesRequest::getTagKey() const {
|
||||
return tagKey_;
|
||||
}
|
||||
|
||||
void UntagResourcesRequest::setTagKey(const std::vector<UntagResourcesRequest::std::string> &tagKey) {
|
||||
tagKey_ = tagKey;
|
||||
for(int dep1 = 0; dep1 != tagKey.size(); dep1++) {
|
||||
setBodyParameter(std::string("TagKey") + "." + std::to_string(dep1 + 1), tagKey[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
44
gwlb/src/model/UntagResourcesResult.cc
Normal file
44
gwlb/src/model/UntagResourcesResult.cc
Normal 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/gwlb/model/UntagResourcesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
UntagResourcesResult::UntagResourcesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UntagResourcesResult::UntagResourcesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UntagResourcesResult::~UntagResourcesResult()
|
||||
{}
|
||||
|
||||
void UntagResourcesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
72
gwlb/src/model/UpdateListenerAttributeRequest.cc
Normal file
72
gwlb/src/model/UpdateListenerAttributeRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/gwlb/model/UpdateListenerAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::UpdateListenerAttributeRequest;
|
||||
|
||||
UpdateListenerAttributeRequest::UpdateListenerAttributeRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "UpdateListenerAttribute") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateListenerAttributeRequest::~UpdateListenerAttributeRequest() {}
|
||||
|
||||
std::string UpdateListenerAttributeRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateListenerAttributeRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string UpdateListenerAttributeRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void UpdateListenerAttributeRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
std::string UpdateListenerAttributeRequest::getListenerId() const {
|
||||
return listenerId_;
|
||||
}
|
||||
|
||||
void UpdateListenerAttributeRequest::setListenerId(const std::string &listenerId) {
|
||||
listenerId_ = listenerId;
|
||||
setBodyParameter(std::string("ListenerId"), listenerId);
|
||||
}
|
||||
|
||||
bool UpdateListenerAttributeRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void UpdateListenerAttributeRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string UpdateListenerAttributeRequest::getListenerDescription() const {
|
||||
return listenerDescription_;
|
||||
}
|
||||
|
||||
void UpdateListenerAttributeRequest::setListenerDescription(const std::string &listenerDescription) {
|
||||
listenerDescription_ = listenerDescription;
|
||||
setBodyParameter(std::string("ListenerDescription"), listenerDescription);
|
||||
}
|
||||
|
||||
44
gwlb/src/model/UpdateListenerAttributeResult.cc
Normal file
44
gwlb/src/model/UpdateListenerAttributeResult.cc
Normal 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/gwlb/model/UpdateListenerAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
UpdateListenerAttributeResult::UpdateListenerAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateListenerAttributeResult::UpdateListenerAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateListenerAttributeResult::~UpdateListenerAttributeResult()
|
||||
{}
|
||||
|
||||
void UpdateListenerAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
72
gwlb/src/model/UpdateLoadBalancerAttributeRequest.cc
Normal file
72
gwlb/src/model/UpdateLoadBalancerAttributeRequest.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/gwlb/model/UpdateLoadBalancerAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::UpdateLoadBalancerAttributeRequest;
|
||||
|
||||
UpdateLoadBalancerAttributeRequest::UpdateLoadBalancerAttributeRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "UpdateLoadBalancerAttribute") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateLoadBalancerAttributeRequest::~UpdateLoadBalancerAttributeRequest() {}
|
||||
|
||||
bool UpdateLoadBalancerAttributeRequest::getCrossZoneEnabled() const {
|
||||
return crossZoneEnabled_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerAttributeRequest::setCrossZoneEnabled(bool crossZoneEnabled) {
|
||||
crossZoneEnabled_ = crossZoneEnabled;
|
||||
setBodyParameter(std::string("CrossZoneEnabled"), crossZoneEnabled ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string UpdateLoadBalancerAttributeRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerAttributeRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
std::string UpdateLoadBalancerAttributeRequest::getLoadBalancerName() const {
|
||||
return loadBalancerName_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerAttributeRequest::setLoadBalancerName(const std::string &loadBalancerName) {
|
||||
loadBalancerName_ = loadBalancerName;
|
||||
setBodyParameter(std::string("LoadBalancerName"), loadBalancerName);
|
||||
}
|
||||
|
||||
bool UpdateLoadBalancerAttributeRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerAttributeRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string UpdateLoadBalancerAttributeRequest::getLoadBalancerId() const {
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerAttributeRequest::setLoadBalancerId(const std::string &loadBalancerId) {
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
setBodyParameter(std::string("LoadBalancerId"), loadBalancerId);
|
||||
}
|
||||
|
||||
44
gwlb/src/model/UpdateLoadBalancerAttributeResult.cc
Normal file
44
gwlb/src/model/UpdateLoadBalancerAttributeResult.cc
Normal 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/gwlb/model/UpdateLoadBalancerAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
UpdateLoadBalancerAttributeResult::UpdateLoadBalancerAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateLoadBalancerAttributeResult::UpdateLoadBalancerAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateLoadBalancerAttributeResult::~UpdateLoadBalancerAttributeResult()
|
||||
{}
|
||||
|
||||
void UpdateLoadBalancerAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
66
gwlb/src/model/UpdateLoadBalancerZonesRequest.cc
Normal file
66
gwlb/src/model/UpdateLoadBalancerZonesRequest.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/gwlb/model/UpdateLoadBalancerZonesRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::UpdateLoadBalancerZonesRequest;
|
||||
|
||||
UpdateLoadBalancerZonesRequest::UpdateLoadBalancerZonesRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "UpdateLoadBalancerZones") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateLoadBalancerZonesRequest::~UpdateLoadBalancerZonesRequest() {}
|
||||
|
||||
std::string UpdateLoadBalancerZonesRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerZonesRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
bool UpdateLoadBalancerZonesRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerZonesRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
std::vector<UpdateLoadBalancerZonesRequest::ZoneMappings> UpdateLoadBalancerZonesRequest::getZoneMappings() const {
|
||||
return zoneMappings_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerZonesRequest::setZoneMappings(const std::vector<UpdateLoadBalancerZonesRequest::ZoneMappings> &zoneMappings) {
|
||||
zoneMappings_ = zoneMappings;
|
||||
for(int dep1 = 0; dep1 != zoneMappings.size(); dep1++) {
|
||||
setBodyParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".VSwitchId", zoneMappings[dep1].vSwitchId);
|
||||
setBodyParameter(std::string("ZoneMappings") + "." + std::to_string(dep1 + 1) + ".ZoneId", zoneMappings[dep1].zoneId);
|
||||
}
|
||||
}
|
||||
|
||||
std::string UpdateLoadBalancerZonesRequest::getLoadBalancerId() const {
|
||||
return loadBalancerId_;
|
||||
}
|
||||
|
||||
void UpdateLoadBalancerZonesRequest::setLoadBalancerId(const std::string &loadBalancerId) {
|
||||
loadBalancerId_ = loadBalancerId;
|
||||
setBodyParameter(std::string("LoadBalancerId"), loadBalancerId);
|
||||
}
|
||||
|
||||
44
gwlb/src/model/UpdateLoadBalancerZonesResult.cc
Normal file
44
gwlb/src/model/UpdateLoadBalancerZonesResult.cc
Normal 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/gwlb/model/UpdateLoadBalancerZonesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
UpdateLoadBalancerZonesResult::UpdateLoadBalancerZonesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateLoadBalancerZonesResult::UpdateLoadBalancerZonesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateLoadBalancerZonesResult::~UpdateLoadBalancerZonesResult()
|
||||
{}
|
||||
|
||||
void UpdateLoadBalancerZonesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
102
gwlb/src/model/UpdateServerGroupAttributeRequest.cc
Normal file
102
gwlb/src/model/UpdateServerGroupAttributeRequest.cc
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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/gwlb/model/UpdateServerGroupAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Gwlb::Model::UpdateServerGroupAttributeRequest;
|
||||
|
||||
UpdateServerGroupAttributeRequest::UpdateServerGroupAttributeRequest()
|
||||
: RpcServiceRequest("gwlb", "2024-04-15", "UpdateServerGroupAttribute") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateServerGroupAttributeRequest::~UpdateServerGroupAttributeRequest() {}
|
||||
|
||||
std::string UpdateServerGroupAttributeRequest::getServerGroupName() const {
|
||||
return serverGroupName_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setServerGroupName(const std::string &serverGroupName) {
|
||||
serverGroupName_ = serverGroupName;
|
||||
setBodyParameter(std::string("ServerGroupName"), serverGroupName);
|
||||
}
|
||||
|
||||
std::string UpdateServerGroupAttributeRequest::getClientToken() const {
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setClientToken(const std::string &clientToken) {
|
||||
clientToken_ = clientToken;
|
||||
setBodyParameter(std::string("ClientToken"), clientToken);
|
||||
}
|
||||
|
||||
UpdateServerGroupAttributeRequest::HealthCheckConfig UpdateServerGroupAttributeRequest::getHealthCheckConfig() const {
|
||||
return healthCheckConfig_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setHealthCheckConfig(const UpdateServerGroupAttributeRequest::HealthCheckConfig &healthCheckConfig) {
|
||||
healthCheckConfig_ = healthCheckConfig;
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectPort", std::to_string(healthCheckConfig.healthCheckConnectPort));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckConnectTimeout", std::to_string(healthCheckConfig.healthCheckConnectTimeout));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckDomain", healthCheckConfig.healthCheckDomain);
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckEnabled", healthCheckConfig.healthCheckEnabled ? "true" : "false");
|
||||
for(int dep1 = 0; dep1 != healthCheckConfig.healthCheckHttpCode.size(); dep1++) {
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckHttpCode." + std::to_string(dep1 + 1), healthCheckConfig.healthCheckHttpCode[dep1]);
|
||||
}
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckInterval", std::to_string(healthCheckConfig.healthCheckInterval));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckPath", healthCheckConfig.healthCheckPath);
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthCheckProtocol", healthCheckConfig.healthCheckProtocol);
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".HealthyThreshold", std::to_string(healthCheckConfig.healthyThreshold));
|
||||
setBodyParameter(std::string("HealthCheckConfig") + ".UnhealthyThreshold", std::to_string(healthCheckConfig.unhealthyThreshold));
|
||||
}
|
||||
|
||||
std::string UpdateServerGroupAttributeRequest::getServerGroupId() const {
|
||||
return serverGroupId_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setServerGroupId(const std::string &serverGroupId) {
|
||||
serverGroupId_ = serverGroupId;
|
||||
setBodyParameter(std::string("ServerGroupId"), serverGroupId);
|
||||
}
|
||||
|
||||
std::string UpdateServerGroupAttributeRequest::getScheduler() const {
|
||||
return scheduler_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setScheduler(const std::string &scheduler) {
|
||||
scheduler_ = scheduler;
|
||||
setBodyParameter(std::string("Scheduler"), scheduler);
|
||||
}
|
||||
|
||||
bool UpdateServerGroupAttributeRequest::getDryRun() const {
|
||||
return dryRun_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setDryRun(bool dryRun) {
|
||||
dryRun_ = dryRun;
|
||||
setBodyParameter(std::string("DryRun"), dryRun ? "true" : "false");
|
||||
}
|
||||
|
||||
UpdateServerGroupAttributeRequest::ConnectionDrainConfig UpdateServerGroupAttributeRequest::getConnectionDrainConfig() const {
|
||||
return connectionDrainConfig_;
|
||||
}
|
||||
|
||||
void UpdateServerGroupAttributeRequest::setConnectionDrainConfig(const UpdateServerGroupAttributeRequest::ConnectionDrainConfig &connectionDrainConfig) {
|
||||
connectionDrainConfig_ = connectionDrainConfig;
|
||||
setBodyParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainEnabled", connectionDrainConfig.connectionDrainEnabled ? "true" : "false");
|
||||
setBodyParameter(std::string("ConnectionDrainConfig") + ".ConnectionDrainTimeout", std::to_string(connectionDrainConfig.connectionDrainTimeout));
|
||||
}
|
||||
|
||||
44
gwlb/src/model/UpdateServerGroupAttributeResult.cc
Normal file
44
gwlb/src/model/UpdateServerGroupAttributeResult.cc
Normal 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/gwlb/model/UpdateServerGroupAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Gwlb;
|
||||
using namespace AlibabaCloud::Gwlb::Model;
|
||||
|
||||
UpdateServerGroupAttributeResult::UpdateServerGroupAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateServerGroupAttributeResult::UpdateServerGroupAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateServerGroupAttributeResult::~UpdateServerGroupAttributeResult()
|
||||
{}
|
||||
|
||||
void UpdateServerGroupAttributeResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user