First publish.
This commit is contained in:
593
eflo/src/EfloClient.cc
Normal file
593
eflo/src/EfloClient.cc
Normal file
@@ -0,0 +1,593 @@
|
||||
/*
|
||||
* 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/eflo/EfloClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "eflo";
|
||||
}
|
||||
|
||||
EfloClient::EfloClient(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, "eflo");
|
||||
}
|
||||
|
||||
EfloClient::EfloClient(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, "eflo");
|
||||
}
|
||||
|
||||
EfloClient::EfloClient(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, "eflo");
|
||||
}
|
||||
|
||||
EfloClient::~EfloClient()
|
||||
{}
|
||||
|
||||
EfloClient::CreateSubnetOutcome EfloClient::createSubnet(const CreateSubnetRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateSubnetOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateSubnetOutcome(CreateSubnetResult(outcome.result()));
|
||||
else
|
||||
return CreateSubnetOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::createSubnetAsync(const CreateSubnetRequest& request, const CreateSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createSubnet(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::CreateSubnetOutcomeCallable EfloClient::createSubnetCallable(const CreateSubnetRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateSubnetOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createSubnet(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::CreateVccOutcome EfloClient::createVcc(const CreateVccRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateVccOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateVccOutcome(CreateVccResult(outcome.result()));
|
||||
else
|
||||
return CreateVccOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::createVccAsync(const CreateVccRequest& request, const CreateVccAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createVcc(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::CreateVccOutcomeCallable EfloClient::createVccCallable(const CreateVccRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateVccOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createVcc(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::CreateVpdOutcome EfloClient::createVpd(const CreateVpdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateVpdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateVpdOutcome(CreateVpdResult(outcome.result()));
|
||||
else
|
||||
return CreateVpdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::createVpdAsync(const CreateVpdRequest& request, const CreateVpdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createVpd(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::CreateVpdOutcomeCallable EfloClient::createVpdCallable(const CreateVpdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateVpdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createVpd(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::DeleteSubnetOutcome EfloClient::deleteSubnet(const DeleteSubnetRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteSubnetOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteSubnetOutcome(DeleteSubnetResult(outcome.result()));
|
||||
else
|
||||
return DeleteSubnetOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::deleteSubnetAsync(const DeleteSubnetRequest& request, const DeleteSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteSubnet(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::DeleteSubnetOutcomeCallable EfloClient::deleteSubnetCallable(const DeleteSubnetRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteSubnetOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteSubnet(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::DeleteVpdOutcome EfloClient::deleteVpd(const DeleteVpdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteVpdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteVpdOutcome(DeleteVpdResult(outcome.result()));
|
||||
else
|
||||
return DeleteVpdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::deleteVpdAsync(const DeleteVpdRequest& request, const DeleteVpdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteVpd(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::DeleteVpdOutcomeCallable EfloClient::deleteVpdCallable(const DeleteVpdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteVpdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteVpd(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::GetSubnetOutcome EfloClient::getSubnet(const GetSubnetRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetSubnetOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetSubnetOutcome(GetSubnetResult(outcome.result()));
|
||||
else
|
||||
return GetSubnetOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::getSubnetAsync(const GetSubnetRequest& request, const GetSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getSubnet(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::GetSubnetOutcomeCallable EfloClient::getSubnetCallable(const GetSubnetRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetSubnetOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getSubnet(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::GetVccOutcome EfloClient::getVcc(const GetVccRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetVccOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetVccOutcome(GetVccResult(outcome.result()));
|
||||
else
|
||||
return GetVccOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::getVccAsync(const GetVccRequest& request, const GetVccAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getVcc(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::GetVccOutcomeCallable EfloClient::getVccCallable(const GetVccRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetVccOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getVcc(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::GetVpdOutcome EfloClient::getVpd(const GetVpdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetVpdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetVpdOutcome(GetVpdResult(outcome.result()));
|
||||
else
|
||||
return GetVpdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::getVpdAsync(const GetVpdRequest& request, const GetVpdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getVpd(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::GetVpdOutcomeCallable EfloClient::getVpdCallable(const GetVpdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetVpdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getVpd(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::InitializeVccOutcome EfloClient::initializeVcc(const InitializeVccRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return InitializeVccOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return InitializeVccOutcome(InitializeVccResult(outcome.result()));
|
||||
else
|
||||
return InitializeVccOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::initializeVccAsync(const InitializeVccRequest& request, const InitializeVccAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, initializeVcc(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::InitializeVccOutcomeCallable EfloClient::initializeVccCallable(const InitializeVccRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<InitializeVccOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->initializeVcc(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::ListSubnetsOutcome EfloClient::listSubnets(const ListSubnetsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSubnetsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListSubnetsOutcome(ListSubnetsResult(outcome.result()));
|
||||
else
|
||||
return ListSubnetsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::listSubnetsAsync(const ListSubnetsRequest& request, const ListSubnetsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listSubnets(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::ListSubnetsOutcomeCallable EfloClient::listSubnetsCallable(const ListSubnetsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListSubnetsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listSubnets(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::ListVccsOutcome EfloClient::listVccs(const ListVccsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListVccsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListVccsOutcome(ListVccsResult(outcome.result()));
|
||||
else
|
||||
return ListVccsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::listVccsAsync(const ListVccsRequest& request, const ListVccsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listVccs(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::ListVccsOutcomeCallable EfloClient::listVccsCallable(const ListVccsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListVccsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listVccs(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::ListVpdsOutcome EfloClient::listVpds(const ListVpdsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListVpdsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListVpdsOutcome(ListVpdsResult(outcome.result()));
|
||||
else
|
||||
return ListVpdsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::listVpdsAsync(const ListVpdsRequest& request, const ListVpdsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listVpds(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::ListVpdsOutcomeCallable EfloClient::listVpdsCallable(const ListVpdsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListVpdsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listVpds(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::UpdateSubnetOutcome EfloClient::updateSubnet(const UpdateSubnetRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateSubnetOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateSubnetOutcome(UpdateSubnetResult(outcome.result()));
|
||||
else
|
||||
return UpdateSubnetOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::updateSubnetAsync(const UpdateSubnetRequest& request, const UpdateSubnetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateSubnet(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::UpdateSubnetOutcomeCallable EfloClient::updateSubnetCallable(const UpdateSubnetRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateSubnetOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateSubnet(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::UpdateVccOutcome EfloClient::updateVcc(const UpdateVccRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateVccOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateVccOutcome(UpdateVccResult(outcome.result()));
|
||||
else
|
||||
return UpdateVccOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::updateVccAsync(const UpdateVccRequest& request, const UpdateVccAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateVcc(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::UpdateVccOutcomeCallable EfloClient::updateVccCallable(const UpdateVccRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateVccOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateVcc(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EfloClient::UpdateVpdOutcome EfloClient::updateVpd(const UpdateVpdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateVpdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateVpdOutcome(UpdateVpdResult(outcome.result()));
|
||||
else
|
||||
return UpdateVpdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EfloClient::updateVpdAsync(const UpdateVpdRequest& request, const UpdateVpdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateVpd(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EfloClient::UpdateVpdOutcomeCallable EfloClient::updateVpdCallable(const UpdateVpdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateVpdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateVpd(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
81
eflo/src/model/CreateSubnetRequest.cc
Normal file
81
eflo/src/model/CreateSubnetRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/eflo/model/CreateSubnetRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::CreateSubnetRequest;
|
||||
|
||||
CreateSubnetRequest::CreateSubnetRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "CreateSubnet") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateSubnetRequest::~CreateSubnetRequest() {}
|
||||
|
||||
std::string CreateSubnetRequest::getType() const {
|
||||
return type_;
|
||||
}
|
||||
|
||||
void CreateSubnetRequest::setType(const std::string &type) {
|
||||
type_ = type;
|
||||
setBodyParameter(std::string("Type"), type);
|
||||
}
|
||||
|
||||
std::string CreateSubnetRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateSubnetRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string CreateSubnetRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void CreateSubnetRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
std::string CreateSubnetRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateSubnetRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setBodyParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string CreateSubnetRequest::getZoneId() const {
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void CreateSubnetRequest::setZoneId(const std::string &zoneId) {
|
||||
zoneId_ = zoneId;
|
||||
setBodyParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
std::string CreateSubnetRequest::getCidr() const {
|
||||
return cidr_;
|
||||
}
|
||||
|
||||
void CreateSubnetRequest::setCidr(const std::string &cidr) {
|
||||
cidr_ = cidr;
|
||||
setBodyParameter(std::string("Cidr"), cidr);
|
||||
}
|
||||
|
||||
66
eflo/src/model/CreateSubnetResult.cc
Normal file
66
eflo/src/model/CreateSubnetResult.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/eflo/model/CreateSubnetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
CreateSubnetResult::CreateSubnetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateSubnetResult::CreateSubnetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateSubnetResult::~CreateSubnetResult()
|
||||
{}
|
||||
|
||||
void CreateSubnetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["SubnetId"].isNull())
|
||||
content_.subnetId = contentNode["SubnetId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateSubnetResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
CreateSubnetResult::Content CreateSubnetResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int CreateSubnetResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
108
eflo/src/model/CreateVccRequest.cc
Normal file
108
eflo/src/model/CreateVccRequest.cc
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* 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/eflo/model/CreateVccRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::CreateVccRequest;
|
||||
|
||||
CreateVccRequest::CreateVccRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "CreateVcc") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateVccRequest::~CreateVccRequest() {}
|
||||
|
||||
std::string CreateVccRequest::getBgpCidr() const {
|
||||
return bgpCidr_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setBgpCidr(const std::string &bgpCidr) {
|
||||
bgpCidr_ = bgpCidr;
|
||||
setBodyParameter(std::string("BgpCidr"), bgpCidr);
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getCenId() const {
|
||||
return cenId_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setCenId(const std::string &cenId) {
|
||||
cenId_ = cenId;
|
||||
setBodyParameter(std::string("CenId"), cenId);
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
bool CreateVccRequest::getAccessCouldService() const {
|
||||
return accessCouldService_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setAccessCouldService(bool accessCouldService) {
|
||||
accessCouldService_ = accessCouldService;
|
||||
setBodyParameter(std::string("AccessCouldService"), accessCouldService ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getVccId() const {
|
||||
return vccId_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setVccId(const std::string &vccId) {
|
||||
vccId_ = vccId;
|
||||
setBodyParameter(std::string("VccId"), vccId);
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getVSwitchId() const {
|
||||
return vSwitchId_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setVSwitchId(const std::string &vSwitchId) {
|
||||
vSwitchId_ = vSwitchId;
|
||||
setBodyParameter(std::string("VSwitchId"), vSwitchId);
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
std::string CreateVccRequest::getVpcId() const {
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void CreateVccRequest::setVpcId(const std::string &vpcId) {
|
||||
vpcId_ = vpcId;
|
||||
setBodyParameter(std::string("VpcId"), vpcId);
|
||||
}
|
||||
|
||||
66
eflo/src/model/CreateVccResult.cc
Normal file
66
eflo/src/model/CreateVccResult.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/eflo/model/CreateVccResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
CreateVccResult::CreateVccResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateVccResult::CreateVccResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateVccResult::~CreateVccResult()
|
||||
{}
|
||||
|
||||
void CreateVccResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["VccId"].isNull())
|
||||
content_.vccId = contentNode["VccId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateVccResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
CreateVccResult::Content CreateVccResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int CreateVccResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
71
eflo/src/model/CreateVpdRequest.cc
Normal file
71
eflo/src/model/CreateVpdRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/eflo/model/CreateVpdRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::CreateVpdRequest;
|
||||
|
||||
CreateVpdRequest::CreateVpdRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "CreateVpd") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateVpdRequest::~CreateVpdRequest() {}
|
||||
|
||||
std::string CreateVpdRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void CreateVpdRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string CreateVpdRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void CreateVpdRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setBodyParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string CreateVpdRequest::getCidr() const {
|
||||
return cidr_;
|
||||
}
|
||||
|
||||
void CreateVpdRequest::setCidr(const std::string &cidr) {
|
||||
cidr_ = cidr;
|
||||
setBodyParameter(std::string("Cidr"), cidr);
|
||||
}
|
||||
|
||||
std::vector<CreateVpdRequest::Subnets> CreateVpdRequest::getSubnets() const {
|
||||
return subnets_;
|
||||
}
|
||||
|
||||
void CreateVpdRequest::setSubnets(const std::vector<CreateVpdRequest::Subnets> &subnets) {
|
||||
subnets_ = subnets;
|
||||
for(int dep1 = 0; dep1 != subnets.size(); dep1++) {
|
||||
auto subnetsObj = subnets.at(dep1);
|
||||
std::string subnetsObjStr = std::string("Subnets") + "." + std::to_string(dep1 + 1);
|
||||
setBodyParameter(subnetsObjStr + ".RegionId", subnetsObj.regionId);
|
||||
setBodyParameter(subnetsObjStr + ".Name", subnetsObj.name);
|
||||
setBodyParameter(subnetsObjStr + ".ZoneId", subnetsObj.zoneId);
|
||||
setBodyParameter(subnetsObjStr + ".Cidr", subnetsObj.cidr);
|
||||
setBodyParameter(subnetsObjStr + ".Type", subnetsObj.type);
|
||||
}
|
||||
}
|
||||
|
||||
69
eflo/src/model/CreateVpdResult.cc
Normal file
69
eflo/src/model/CreateVpdResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eflo/model/CreateVpdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
CreateVpdResult::CreateVpdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateVpdResult::CreateVpdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateVpdResult::~CreateVpdResult()
|
||||
{}
|
||||
|
||||
void CreateVpdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["VpdId"].isNull())
|
||||
content_.vpdId = contentNode["VpdId"].asString();
|
||||
auto allSubnetIds = contentNode["SubnetIds"]["SubnetId"];
|
||||
for (auto value : allSubnetIds)
|
||||
content_.subnetIds.push_back(value.asString());
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateVpdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
CreateVpdResult::Content CreateVpdResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int CreateVpdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
63
eflo/src/model/DeleteSubnetRequest.cc
Normal file
63
eflo/src/model/DeleteSubnetRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/eflo/model/DeleteSubnetRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::DeleteSubnetRequest;
|
||||
|
||||
DeleteSubnetRequest::DeleteSubnetRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "DeleteSubnet") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteSubnetRequest::~DeleteSubnetRequest() {}
|
||||
|
||||
std::string DeleteSubnetRequest::getSubnetId() const {
|
||||
return subnetId_;
|
||||
}
|
||||
|
||||
void DeleteSubnetRequest::setSubnetId(const std::string &subnetId) {
|
||||
subnetId_ = subnetId;
|
||||
setBodyParameter(std::string("SubnetId"), subnetId);
|
||||
}
|
||||
|
||||
std::string DeleteSubnetRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteSubnetRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string DeleteSubnetRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void DeleteSubnetRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
std::string DeleteSubnetRequest::getZoneId() const {
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void DeleteSubnetRequest::setZoneId(const std::string &zoneId) {
|
||||
zoneId_ = zoneId;
|
||||
setBodyParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
44
eflo/src/model/DeleteSubnetResult.cc
Normal file
44
eflo/src/model/DeleteSubnetResult.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/eflo/model/DeleteSubnetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
DeleteSubnetResult::DeleteSubnetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteSubnetResult::DeleteSubnetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteSubnetResult::~DeleteSubnetResult()
|
||||
{}
|
||||
|
||||
void DeleteSubnetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
45
eflo/src/model/DeleteVpdRequest.cc
Normal file
45
eflo/src/model/DeleteVpdRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/eflo/model/DeleteVpdRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::DeleteVpdRequest;
|
||||
|
||||
DeleteVpdRequest::DeleteVpdRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "DeleteVpd") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteVpdRequest::~DeleteVpdRequest() {}
|
||||
|
||||
std::string DeleteVpdRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void DeleteVpdRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string DeleteVpdRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void DeleteVpdRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
44
eflo/src/model/DeleteVpdResult.cc
Normal file
44
eflo/src/model/DeleteVpdResult.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/eflo/model/DeleteVpdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
DeleteVpdResult::DeleteVpdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteVpdResult::DeleteVpdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteVpdResult::~DeleteVpdResult()
|
||||
{}
|
||||
|
||||
void DeleteVpdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
36
eflo/src/model/GetSubnetRequest.cc
Normal file
36
eflo/src/model/GetSubnetRequest.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/eflo/model/GetSubnetRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::GetSubnetRequest;
|
||||
|
||||
GetSubnetRequest::GetSubnetRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "GetSubnet") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetSubnetRequest::~GetSubnetRequest() {}
|
||||
|
||||
std::string GetSubnetRequest::getSubnetId() const {
|
||||
return subnetId_;
|
||||
}
|
||||
|
||||
void GetSubnetRequest::setSubnetId(const std::string &subnetId) {
|
||||
subnetId_ = subnetId;
|
||||
setBodyParameter(std::string("SubnetId"), subnetId);
|
||||
}
|
||||
|
||||
105
eflo/src/model/GetSubnetResult.cc
Normal file
105
eflo/src/model/GetSubnetResult.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/eflo/model/GetSubnetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
GetSubnetResult::GetSubnetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetSubnetResult::GetSubnetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetSubnetResult::~GetSubnetResult()
|
||||
{}
|
||||
|
||||
void GetSubnetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["Id"].isNull())
|
||||
content_.id = std::stol(contentNode["Id"].asString());
|
||||
if(!contentNode["GmtCreate"].isNull())
|
||||
content_.gmtCreate = contentNode["GmtCreate"].asString();
|
||||
if(!contentNode["GmtModified"].isNull())
|
||||
content_.gmtModified = contentNode["GmtModified"].asString();
|
||||
if(!contentNode["TenantId"].isNull())
|
||||
content_.tenantId = contentNode["TenantId"].asString();
|
||||
if(!contentNode["RegionId"].isNull())
|
||||
content_.regionId = contentNode["RegionId"].asString();
|
||||
if(!contentNode["ZoneId"].isNull())
|
||||
content_.zoneId = contentNode["ZoneId"].asString();
|
||||
if(!contentNode["SubnetId"].isNull())
|
||||
content_.subnetId = contentNode["SubnetId"].asString();
|
||||
if(!contentNode["Name"].isNull())
|
||||
content_.name = contentNode["Name"].asString();
|
||||
if(!contentNode["Cidr"].isNull())
|
||||
content_.cidr = contentNode["Cidr"].asString();
|
||||
if(!contentNode["Description"].isNull())
|
||||
content_.description = contentNode["Description"].asString();
|
||||
if(!contentNode["VpdId"].isNull())
|
||||
content_.vpdId = contentNode["VpdId"].asString();
|
||||
if(!contentNode["Type"].isNull())
|
||||
content_.type = contentNode["Type"].asString();
|
||||
if(!contentNode["Status"].isNull())
|
||||
content_.status = contentNode["Status"].asString();
|
||||
if(!contentNode["Message"].isNull())
|
||||
content_.message = contentNode["Message"].asString();
|
||||
if(!contentNode["NcCount"].isNull())
|
||||
content_.ncCount = std::stol(contentNode["NcCount"].asString());
|
||||
if(!contentNode["LbCount"].isNull())
|
||||
content_.lbCount = std::stol(contentNode["LbCount"].asString());
|
||||
auto vpdBaseInfoNode = contentNode["VpdBaseInfo"];
|
||||
if(!vpdBaseInfoNode["VpdId"].isNull())
|
||||
content_.vpdBaseInfo.vpdId = vpdBaseInfoNode["VpdId"].asString();
|
||||
if(!vpdBaseInfoNode["Name"].isNull())
|
||||
content_.vpdBaseInfo.name = vpdBaseInfoNode["Name"].asString();
|
||||
if(!vpdBaseInfoNode["Cidr"].isNull())
|
||||
content_.vpdBaseInfo.cidr = vpdBaseInfoNode["Cidr"].asString();
|
||||
if(!vpdBaseInfoNode["GmtCreate"].isNull())
|
||||
content_.vpdBaseInfo.gmtCreate = vpdBaseInfoNode["GmtCreate"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetSubnetResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetSubnetResult::Content GetSubnetResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int GetSubnetResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
45
eflo/src/model/GetVccRequest.cc
Normal file
45
eflo/src/model/GetVccRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/eflo/model/GetVccRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::GetVccRequest;
|
||||
|
||||
GetVccRequest::GetVccRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "GetVcc") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetVccRequest::~GetVccRequest() {}
|
||||
|
||||
std::string GetVccRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void GetVccRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string GetVccRequest::getVccId() const {
|
||||
return vccId_;
|
||||
}
|
||||
|
||||
void GetVccRequest::setVccId(const std::string &vccId) {
|
||||
vccId_ = vccId;
|
||||
setBodyParameter(std::string("VccId"), vccId);
|
||||
}
|
||||
|
||||
165
eflo/src/model/GetVccResult.cc
Normal file
165
eflo/src/model/GetVccResult.cc
Normal file
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
* 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/eflo/model/GetVccResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
GetVccResult::GetVccResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetVccResult::GetVccResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetVccResult::~GetVccResult()
|
||||
{}
|
||||
|
||||
void GetVccResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["TenantId"].isNull())
|
||||
content_.tenantId = contentNode["TenantId"].asString();
|
||||
if(!contentNode["RegionId"].isNull())
|
||||
content_.regionId = contentNode["RegionId"].asString();
|
||||
if(!contentNode["VccId"].isNull())
|
||||
content_.vccId = contentNode["VccId"].asString();
|
||||
if(!contentNode["VpdId"].isNull())
|
||||
content_.vpdId = contentNode["VpdId"].asString();
|
||||
if(!contentNode["VpcId"].isNull())
|
||||
content_.vpcId = contentNode["VpcId"].asString();
|
||||
if(!contentNode["VSwitchId"].isNull())
|
||||
content_.vSwitchId = contentNode["VSwitchId"].asString();
|
||||
if(!contentNode["CenId"].isNull())
|
||||
content_.cenId = contentNode["CenId"].asString();
|
||||
if(!contentNode["VccName"].isNull())
|
||||
content_.vccName = contentNode["VccName"].asString();
|
||||
if(!contentNode["AccessPointId"].isNull())
|
||||
content_.accessPointId = contentNode["AccessPointId"].asString();
|
||||
if(!contentNode["LineOperator"].isNull())
|
||||
content_.lineOperator = contentNode["LineOperator"].asString();
|
||||
if(!contentNode["Spec"].isNull())
|
||||
content_.spec = contentNode["Spec"].asString();
|
||||
if(!contentNode["PortType"].isNull())
|
||||
content_.portType = contentNode["PortType"].asString();
|
||||
if(!contentNode["PricingCycle"].isNull())
|
||||
content_.pricingCycle = contentNode["PricingCycle"].asString();
|
||||
if(!contentNode["PayType"].isNull())
|
||||
content_.payType = contentNode["PayType"].asString();
|
||||
if(!contentNode["Duration"].isNull())
|
||||
content_.duration = contentNode["Duration"].asString();
|
||||
if(!contentNode["Status"].isNull())
|
||||
content_.status = contentNode["Status"].asString();
|
||||
if(!contentNode["CurrentNode"].isNull())
|
||||
content_.currentNode = contentNode["CurrentNode"].asString();
|
||||
if(!contentNode["InternetChargeType"].isNull())
|
||||
content_.internetChargeType = contentNode["InternetChargeType"].asString();
|
||||
if(!contentNode["BandwidthStr"].isNull())
|
||||
content_.bandwidthStr = contentNode["BandwidthStr"].asString();
|
||||
if(!contentNode["Message"].isNull())
|
||||
content_.message = contentNode["Message"].asString();
|
||||
if(!contentNode["CreateTime"].isNull())
|
||||
content_.createTime = contentNode["CreateTime"].asString();
|
||||
if(!contentNode["GmtModified"].isNull())
|
||||
content_.gmtModified = contentNode["GmtModified"].asString();
|
||||
if(!contentNode["CommodityCode"].isNull())
|
||||
content_.commodityCode = contentNode["CommodityCode"].asString();
|
||||
if(!contentNode["BgpCidr"].isNull())
|
||||
content_.bgpCidr = contentNode["BgpCidr"].asString();
|
||||
auto allAliyunRouterInfoNode = contentNode["AliyunRouterInfo"]["AliyunRouterInfoItem"];
|
||||
for (auto contentNodeAliyunRouterInfoAliyunRouterInfoItem : allAliyunRouterInfoNode)
|
||||
{
|
||||
Content::AliyunRouterInfoItem aliyunRouterInfoItemObject;
|
||||
if(!contentNodeAliyunRouterInfoAliyunRouterInfoItem["PcId"].isNull())
|
||||
aliyunRouterInfoItemObject.pcId = contentNodeAliyunRouterInfoAliyunRouterInfoItem["PcId"].asString();
|
||||
if(!contentNodeAliyunRouterInfoAliyunRouterInfoItem["VbrId"].isNull())
|
||||
aliyunRouterInfoItemObject.vbrId = contentNodeAliyunRouterInfoAliyunRouterInfoItem["VbrId"].asString();
|
||||
if(!contentNodeAliyunRouterInfoAliyunRouterInfoItem["LocalGatewayIp"].isNull())
|
||||
aliyunRouterInfoItemObject.localGatewayIp = contentNodeAliyunRouterInfoAliyunRouterInfoItem["LocalGatewayIp"].asString();
|
||||
if(!contentNodeAliyunRouterInfoAliyunRouterInfoItem["PeerGatewayIp"].isNull())
|
||||
aliyunRouterInfoItemObject.peerGatewayIp = contentNodeAliyunRouterInfoAliyunRouterInfoItem["PeerGatewayIp"].asString();
|
||||
if(!contentNodeAliyunRouterInfoAliyunRouterInfoItem["Mask"].isNull())
|
||||
aliyunRouterInfoItemObject.mask = contentNodeAliyunRouterInfoAliyunRouterInfoItem["Mask"].asString();
|
||||
if(!contentNodeAliyunRouterInfoAliyunRouterInfoItem["VlanId"].isNull())
|
||||
aliyunRouterInfoItemObject.vlanId = contentNodeAliyunRouterInfoAliyunRouterInfoItem["VlanId"].asString();
|
||||
content_.aliyunRouterInfo.push_back(aliyunRouterInfoItemObject);
|
||||
}
|
||||
auto allCisRouterInfoNode = contentNode["CisRouterInfo"]["CisRouterInfoItem"];
|
||||
for (auto contentNodeCisRouterInfoCisRouterInfoItem : allCisRouterInfoNode)
|
||||
{
|
||||
Content::CisRouterInfoItem cisRouterInfoItemObject;
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItem["CcrId"].isNull())
|
||||
cisRouterInfoItemObject.ccrId = contentNodeCisRouterInfoCisRouterInfoItem["CcrId"].asString();
|
||||
auto allCcInfosNode = contentNodeCisRouterInfoCisRouterInfoItem["CcInfos"]["CcInfo"];
|
||||
for (auto contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo : allCcInfosNode)
|
||||
{
|
||||
Content::CisRouterInfoItem::CcInfo ccInfosObject;
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["CcId"].isNull())
|
||||
ccInfosObject.ccId = contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["CcId"].asString();
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["VlanId"].isNull())
|
||||
ccInfosObject.vlanId = contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["VlanId"].asString();
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["LocalGatewayIp"].isNull())
|
||||
ccInfosObject.localGatewayIp = contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["LocalGatewayIp"].asString();
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["RemoteGatewayIp"].isNull())
|
||||
ccInfosObject.remoteGatewayIp = contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["RemoteGatewayIp"].asString();
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["SubnetMask"].isNull())
|
||||
ccInfosObject.subnetMask = contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["SubnetMask"].asString();
|
||||
if(!contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["Status"].isNull())
|
||||
ccInfosObject.status = contentNodeCisRouterInfoCisRouterInfoItemCcInfosCcInfo["Status"].asString();
|
||||
cisRouterInfoItemObject.ccInfos.push_back(ccInfosObject);
|
||||
}
|
||||
content_.cisRouterInfo.push_back(cisRouterInfoItemObject);
|
||||
}
|
||||
auto vpdBaseInfoNode = contentNode["VpdBaseInfo"];
|
||||
if(!vpdBaseInfoNode["VpdId"].isNull())
|
||||
content_.vpdBaseInfo.vpdId = vpdBaseInfoNode["VpdId"].asString();
|
||||
if(!vpdBaseInfoNode["Name"].isNull())
|
||||
content_.vpdBaseInfo.name = vpdBaseInfoNode["Name"].asString();
|
||||
if(!vpdBaseInfoNode["Cidr"].isNull())
|
||||
content_.vpdBaseInfo.cidr = vpdBaseInfoNode["Cidr"].asString();
|
||||
if(!vpdBaseInfoNode["GmtCreate"].isNull())
|
||||
content_.vpdBaseInfo.gmtCreate = vpdBaseInfoNode["GmtCreate"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetVccResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetVccResult::Content GetVccResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int GetVccResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
36
eflo/src/model/GetVpdRequest.cc
Normal file
36
eflo/src/model/GetVpdRequest.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/eflo/model/GetVpdRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::GetVpdRequest;
|
||||
|
||||
GetVpdRequest::GetVpdRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "GetVpd") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetVpdRequest::~GetVpdRequest() {}
|
||||
|
||||
std::string GetVpdRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void GetVpdRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
94
eflo/src/model/GetVpdResult.cc
Normal file
94
eflo/src/model/GetVpdResult.cc
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* 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/eflo/model/GetVpdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
GetVpdResult::GetVpdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetVpdResult::GetVpdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetVpdResult::~GetVpdResult()
|
||||
{}
|
||||
|
||||
void GetVpdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["RegionId"].isNull())
|
||||
content_.regionId = contentNode["RegionId"].asString();
|
||||
if(!contentNode["VpdId"].isNull())
|
||||
content_.vpdId = contentNode["VpdId"].asString();
|
||||
if(!contentNode["Name"].isNull())
|
||||
content_.name = contentNode["Name"].asString();
|
||||
if(!contentNode["Cidr"].isNull())
|
||||
content_.cidr = contentNode["Cidr"].asString();
|
||||
if(!contentNode["ServiceCidr"].isNull())
|
||||
content_.serviceCidr = contentNode["ServiceCidr"].asString();
|
||||
if(!contentNode["Status"].isNull())
|
||||
content_.status = contentNode["Status"].asString();
|
||||
if(!contentNode["Description"].isNull())
|
||||
content_.description = contentNode["Description"].asString();
|
||||
if(!contentNode["Message"].isNull())
|
||||
content_.message = contentNode["Message"].asString();
|
||||
if(!contentNode["Route"].isNull())
|
||||
content_.route = std::stoi(contentNode["Route"].asString());
|
||||
if(!contentNode["NcCount"].isNull())
|
||||
content_.ncCount = std::stol(contentNode["NcCount"].asString());
|
||||
if(!contentNode["SubnetCount"].isNull())
|
||||
content_.subnetCount = std::stol(contentNode["SubnetCount"].asString());
|
||||
if(!contentNode["LbCount"].isNull())
|
||||
content_.lbCount = std::stol(contentNode["LbCount"].asString());
|
||||
if(!contentNode["VccCount"].isNull())
|
||||
content_.vccCount = std::stol(contentNode["VccCount"].asString());
|
||||
if(!contentNode["GmtCreate"].isNull())
|
||||
content_.gmtCreate = contentNode["GmtCreate"].asString();
|
||||
if(!contentNode["GmtModified"].isNull())
|
||||
content_.gmtModified = contentNode["GmtModified"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetVpdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetVpdResult::Content GetVpdResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int GetVpdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
27
eflo/src/model/InitializeVccRequest.cc
Normal file
27
eflo/src/model/InitializeVccRequest.cc
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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/eflo/model/InitializeVccRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::InitializeVccRequest;
|
||||
|
||||
InitializeVccRequest::InitializeVccRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "InitializeVcc") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
InitializeVccRequest::~InitializeVccRequest() {}
|
||||
|
||||
68
eflo/src/model/InitializeVccResult.cc
Normal file
68
eflo/src/model/InitializeVccResult.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/eflo/model/InitializeVccResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
InitializeVccResult::InitializeVccResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
InitializeVccResult::InitializeVccResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
InitializeVccResult::~InitializeVccResult()
|
||||
{}
|
||||
|
||||
void InitializeVccResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["RoleName"].isNull())
|
||||
content_.roleName = contentNode["RoleName"].asString();
|
||||
if(!contentNode["RequestId"].isNull())
|
||||
content_.requestId = contentNode["RequestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string InitializeVccResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
InitializeVccResult::Content InitializeVccResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int InitializeVccResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
117
eflo/src/model/ListSubnetsRequest.cc
Normal file
117
eflo/src/model/ListSubnetsRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eflo/model/ListSubnetsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::ListSubnetsRequest;
|
||||
|
||||
ListSubnetsRequest::ListSubnetsRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "ListSubnets") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListSubnetsRequest::~ListSubnetsRequest() {}
|
||||
|
||||
std::string ListSubnetsRequest::getType() const {
|
||||
return type_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setType(const std::string &type) {
|
||||
type_ = type;
|
||||
setBodyParameter(std::string("Type"), type);
|
||||
}
|
||||
|
||||
int ListSubnetsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListSubnetsRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
int ListSubnetsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListSubnetsRequest::getSubnetId() const {
|
||||
return subnetId_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setSubnetId(const std::string &subnetId) {
|
||||
subnetId_ = subnetId;
|
||||
setBodyParameter(std::string("SubnetId"), subnetId);
|
||||
}
|
||||
|
||||
std::string ListSubnetsRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
bool ListSubnetsRequest::getEnablePage() const {
|
||||
return enablePage_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setEnablePage(bool enablePage) {
|
||||
enablePage_ = enablePage;
|
||||
setBodyParameter(std::string("EnablePage"), enablePage ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListSubnetsRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setBodyParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string ListSubnetsRequest::getZoneId() const {
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setZoneId(const std::string &zoneId) {
|
||||
zoneId_ = zoneId;
|
||||
setBodyParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
std::string ListSubnetsRequest::getStatus() const {
|
||||
return status_;
|
||||
}
|
||||
|
||||
void ListSubnetsRequest::setStatus(const std::string &status) {
|
||||
status_ = status;
|
||||
setBodyParameter(std::string("Status"), status);
|
||||
}
|
||||
|
||||
109
eflo/src/model/ListSubnetsResult.cc
Normal file
109
eflo/src/model/ListSubnetsResult.cc
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* 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/eflo/model/ListSubnetsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
ListSubnetsResult::ListSubnetsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListSubnetsResult::ListSubnetsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListSubnetsResult::~ListSubnetsResult()
|
||||
{}
|
||||
|
||||
void ListSubnetsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["Total"].isNull())
|
||||
content_.total = std::stol(contentNode["Total"].asString());
|
||||
auto allDataNode = contentNode["Data"]["DataItem"];
|
||||
for (auto contentNodeDataDataItem : allDataNode)
|
||||
{
|
||||
Content::DataItem dataItemObject;
|
||||
if(!contentNodeDataDataItem["Id"].isNull())
|
||||
dataItemObject.id = std::stol(contentNodeDataDataItem["Id"].asString());
|
||||
if(!contentNodeDataDataItem["GmtCreate"].isNull())
|
||||
dataItemObject.gmtCreate = contentNodeDataDataItem["GmtCreate"].asString();
|
||||
if(!contentNodeDataDataItem["GmtModified"].isNull())
|
||||
dataItemObject.gmtModified = contentNodeDataDataItem["GmtModified"].asString();
|
||||
if(!contentNodeDataDataItem["TenantId"].isNull())
|
||||
dataItemObject.tenantId = contentNodeDataDataItem["TenantId"].asString();
|
||||
if(!contentNodeDataDataItem["RegionId"].isNull())
|
||||
dataItemObject.regionId = contentNodeDataDataItem["RegionId"].asString();
|
||||
if(!contentNodeDataDataItem["ZoneId"].isNull())
|
||||
dataItemObject.zoneId = contentNodeDataDataItem["ZoneId"].asString();
|
||||
if(!contentNodeDataDataItem["Type"].isNull())
|
||||
dataItemObject.type = contentNodeDataDataItem["Type"].asString();
|
||||
if(!contentNodeDataDataItem["SubnetId"].isNull())
|
||||
dataItemObject.subnetId = contentNodeDataDataItem["SubnetId"].asString();
|
||||
if(!contentNodeDataDataItem["Name"].isNull())
|
||||
dataItemObject.name = contentNodeDataDataItem["Name"].asString();
|
||||
if(!contentNodeDataDataItem["Cidr"].isNull())
|
||||
dataItemObject.cidr = contentNodeDataDataItem["Cidr"].asString();
|
||||
if(!contentNodeDataDataItem["VpdId"].isNull())
|
||||
dataItemObject.vpdId = contentNodeDataDataItem["VpdId"].asString();
|
||||
if(!contentNodeDataDataItem["Status"].isNull())
|
||||
dataItemObject.status = contentNodeDataDataItem["Status"].asString();
|
||||
if(!contentNodeDataDataItem["Message"].isNull())
|
||||
dataItemObject.message = contentNodeDataDataItem["Message"].asString();
|
||||
if(!contentNodeDataDataItem["NcCount"].isNull())
|
||||
dataItemObject.ncCount = std::stol(contentNodeDataDataItem["NcCount"].asString());
|
||||
auto vpdBaseInfoNode = value["VpdBaseInfo"];
|
||||
if(!vpdBaseInfoNode["VpdId"].isNull())
|
||||
dataItemObject.vpdBaseInfo.vpdId = vpdBaseInfoNode["VpdId"].asString();
|
||||
if(!vpdBaseInfoNode["Name"].isNull())
|
||||
dataItemObject.vpdBaseInfo.name = vpdBaseInfoNode["Name"].asString();
|
||||
if(!vpdBaseInfoNode["Cidr"].isNull())
|
||||
dataItemObject.vpdBaseInfo.cidr = vpdBaseInfoNode["Cidr"].asString();
|
||||
if(!vpdBaseInfoNode["GmtCreate"].isNull())
|
||||
dataItemObject.vpdBaseInfo.gmtCreate = vpdBaseInfoNode["GmtCreate"].asString();
|
||||
content_.data.push_back(dataItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListSubnetsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListSubnetsResult::Content ListSubnetsResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int ListSubnetsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
126
eflo/src/model/ListVccsRequest.cc
Normal file
126
eflo/src/model/ListVccsRequest.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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/eflo/model/ListVccsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::ListVccsRequest;
|
||||
|
||||
ListVccsRequest::ListVccsRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "ListVccs") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListVccsRequest::~ListVccsRequest() {}
|
||||
|
||||
std::string ListVccsRequest::getCenId() const {
|
||||
return cenId_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setCenId(const std::string &cenId) {
|
||||
cenId_ = cenId;
|
||||
setBodyParameter(std::string("CenId"), cenId);
|
||||
}
|
||||
|
||||
int ListVccsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListVccsRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
int ListVccsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListVccsRequest::getVccId() const {
|
||||
return vccId_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setVccId(const std::string &vccId) {
|
||||
vccId_ = vccId;
|
||||
setBodyParameter(std::string("VccId"), vccId);
|
||||
}
|
||||
|
||||
int ListVccsRequest::getBandwidth() const {
|
||||
return bandwidth_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setBandwidth(int bandwidth) {
|
||||
bandwidth_ = bandwidth;
|
||||
setBodyParameter(std::string("Bandwidth"), std::to_string(bandwidth));
|
||||
}
|
||||
|
||||
std::string ListVccsRequest::getExStatus() const {
|
||||
return exStatus_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setExStatus(const std::string &exStatus) {
|
||||
exStatus_ = exStatus;
|
||||
setBodyParameter(std::string("ExStatus"), exStatus);
|
||||
}
|
||||
|
||||
std::string ListVccsRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
std::string ListVccsRequest::getVpcId() const {
|
||||
return vpcId_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setVpcId(const std::string &vpcId) {
|
||||
vpcId_ = vpcId;
|
||||
setBodyParameter(std::string("VpcId"), vpcId);
|
||||
}
|
||||
|
||||
bool ListVccsRequest::getEnablePage() const {
|
||||
return enablePage_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setEnablePage(bool enablePage) {
|
||||
enablePage_ = enablePage;
|
||||
setBodyParameter(std::string("EnablePage"), enablePage ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListVccsRequest::getStatus() const {
|
||||
return status_;
|
||||
}
|
||||
|
||||
void ListVccsRequest::setStatus(const std::string &status) {
|
||||
status_ = status;
|
||||
setBodyParameter(std::string("Status"), status);
|
||||
}
|
||||
|
||||
117
eflo/src/model/ListVccsResult.cc
Normal file
117
eflo/src/model/ListVccsResult.cc
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eflo/model/ListVccsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
ListVccsResult::ListVccsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListVccsResult::ListVccsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListVccsResult::~ListVccsResult()
|
||||
{}
|
||||
|
||||
void ListVccsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["Total"].isNull())
|
||||
content_.total = std::stol(contentNode["Total"].asString());
|
||||
auto allDataNode = contentNode["Data"]["DataItem"];
|
||||
for (auto contentNodeDataDataItem : allDataNode)
|
||||
{
|
||||
Content::DataItem dataItemObject;
|
||||
if(!contentNodeDataDataItem["TenantId"].isNull())
|
||||
dataItemObject.tenantId = contentNodeDataDataItem["TenantId"].asString();
|
||||
if(!contentNodeDataDataItem["RegionId"].isNull())
|
||||
dataItemObject.regionId = contentNodeDataDataItem["RegionId"].asString();
|
||||
if(!contentNodeDataDataItem["VccId"].isNull())
|
||||
dataItemObject.vccId = contentNodeDataDataItem["VccId"].asString();
|
||||
if(!contentNodeDataDataItem["VpdId"].isNull())
|
||||
dataItemObject.vpdId = contentNodeDataDataItem["VpdId"].asString();
|
||||
if(!contentNodeDataDataItem["VpcId"].isNull())
|
||||
dataItemObject.vpcId = contentNodeDataDataItem["VpcId"].asString();
|
||||
if(!contentNodeDataDataItem["CenId"].isNull())
|
||||
dataItemObject.cenId = contentNodeDataDataItem["CenId"].asString();
|
||||
if(!contentNodeDataDataItem["VccName"].isNull())
|
||||
dataItemObject.vccName = contentNodeDataDataItem["VccName"].asString();
|
||||
if(!contentNodeDataDataItem["AccessPointId"].isNull())
|
||||
dataItemObject.accessPointId = contentNodeDataDataItem["AccessPointId"].asString();
|
||||
if(!contentNodeDataDataItem["LineOperator"].isNull())
|
||||
dataItemObject.lineOperator = contentNodeDataDataItem["LineOperator"].asString();
|
||||
if(!contentNodeDataDataItem["Spec"].isNull())
|
||||
dataItemObject.spec = contentNodeDataDataItem["Spec"].asString();
|
||||
if(!contentNodeDataDataItem["PortType"].isNull())
|
||||
dataItemObject.portType = contentNodeDataDataItem["PortType"].asString();
|
||||
if(!contentNodeDataDataItem["Status"].isNull())
|
||||
dataItemObject.status = contentNodeDataDataItem["Status"].asString();
|
||||
if(!contentNodeDataDataItem["Message"].isNull())
|
||||
dataItemObject.message = contentNodeDataDataItem["Message"].asString();
|
||||
if(!contentNodeDataDataItem["CreateTime"].isNull())
|
||||
dataItemObject.createTime = contentNodeDataDataItem["CreateTime"].asString();
|
||||
if(!contentNodeDataDataItem["GmtModified"].isNull())
|
||||
dataItemObject.gmtModified = contentNodeDataDataItem["GmtModified"].asString();
|
||||
if(!contentNodeDataDataItem["Rate"].isNull())
|
||||
dataItemObject.rate = contentNodeDataDataItem["Rate"].asString();
|
||||
if(!contentNodeDataDataItem["BandwidthStr"].isNull())
|
||||
dataItemObject.bandwidthStr = contentNodeDataDataItem["BandwidthStr"].asString();
|
||||
if(!contentNodeDataDataItem["BgpCidr"].isNull())
|
||||
dataItemObject.bgpCidr = contentNodeDataDataItem["BgpCidr"].asString();
|
||||
auto vpdBaseInfoNode = value["VpdBaseInfo"];
|
||||
if(!vpdBaseInfoNode["VpdId"].isNull())
|
||||
dataItemObject.vpdBaseInfo.vpdId = vpdBaseInfoNode["VpdId"].asString();
|
||||
if(!vpdBaseInfoNode["Name"].isNull())
|
||||
dataItemObject.vpdBaseInfo.name = vpdBaseInfoNode["Name"].asString();
|
||||
if(!vpdBaseInfoNode["Cidr"].isNull())
|
||||
dataItemObject.vpdBaseInfo.cidr = vpdBaseInfoNode["Cidr"].asString();
|
||||
if(!vpdBaseInfoNode["GmtCreate"].isNull())
|
||||
dataItemObject.vpdBaseInfo.gmtCreate = vpdBaseInfoNode["GmtCreate"].asString();
|
||||
content_.data.push_back(dataItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListVccsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListVccsResult::Content ListVccsResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int ListVccsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
126
eflo/src/model/ListVpdsRequest.cc
Normal file
126
eflo/src/model/ListVpdsRequest.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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/eflo/model/ListVpdsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::ListVpdsRequest;
|
||||
|
||||
ListVpdsRequest::ListVpdsRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "ListVpds") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListVpdsRequest::~ListVpdsRequest() {}
|
||||
|
||||
int ListVpdsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setBodyParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
bool ListVpdsRequest::getWithDependence() const {
|
||||
return withDependence_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setWithDependence(bool withDependence) {
|
||||
withDependence_ = withDependence;
|
||||
setBodyParameter(std::string("WithDependence"), withDependence ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListVpdsRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
bool ListVpdsRequest::getWithoutVcc() const {
|
||||
return withoutVcc_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setWithoutVcc(bool withoutVcc) {
|
||||
withoutVcc_ = withoutVcc;
|
||||
setBodyParameter(std::string("WithoutVcc"), withoutVcc ? "true" : "false");
|
||||
}
|
||||
|
||||
int ListVpdsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
bool ListVpdsRequest::getForSelect() const {
|
||||
return forSelect_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setForSelect(bool forSelect) {
|
||||
forSelect_ = forSelect;
|
||||
setBodyParameter(std::string("ForSelect"), forSelect ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListVpdsRequest::getFilterErId() const {
|
||||
return filterErId_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setFilterErId(const std::string &filterErId) {
|
||||
filterErId_ = filterErId;
|
||||
setBodyParameter(std::string("FilterErId"), filterErId);
|
||||
}
|
||||
|
||||
std::string ListVpdsRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
bool ListVpdsRequest::getEnablePage() const {
|
||||
return enablePage_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setEnablePage(bool enablePage) {
|
||||
enablePage_ = enablePage;
|
||||
setBodyParameter(std::string("EnablePage"), enablePage ? "true" : "false");
|
||||
}
|
||||
|
||||
std::string ListVpdsRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setBodyParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string ListVpdsRequest::getStatus() const {
|
||||
return status_;
|
||||
}
|
||||
|
||||
void ListVpdsRequest::setStatus(const std::string &status) {
|
||||
status_ = status;
|
||||
setBodyParameter(std::string("Status"), status);
|
||||
}
|
||||
|
||||
98
eflo/src/model/ListVpdsResult.cc
Normal file
98
eflo/src/model/ListVpdsResult.cc
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* 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/eflo/model/ListVpdsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
ListVpdsResult::ListVpdsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListVpdsResult::ListVpdsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListVpdsResult::~ListVpdsResult()
|
||||
{}
|
||||
|
||||
void ListVpdsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["Total"].isNull())
|
||||
content_.total = std::stol(contentNode["Total"].asString());
|
||||
auto allDataNode = contentNode["Data"]["DataItem"];
|
||||
for (auto contentNodeDataDataItem : allDataNode)
|
||||
{
|
||||
Content::DataItem dataItemObject;
|
||||
if(!contentNodeDataDataItem["RegionId"].isNull())
|
||||
dataItemObject.regionId = contentNodeDataDataItem["RegionId"].asString();
|
||||
if(!contentNodeDataDataItem["VpdId"].isNull())
|
||||
dataItemObject.vpdId = contentNodeDataDataItem["VpdId"].asString();
|
||||
if(!contentNodeDataDataItem["Name"].isNull())
|
||||
dataItemObject.name = contentNodeDataDataItem["Name"].asString();
|
||||
if(!contentNodeDataDataItem["Cidr"].isNull())
|
||||
dataItemObject.cidr = contentNodeDataDataItem["Cidr"].asString();
|
||||
if(!contentNodeDataDataItem["ServiceCidr"].isNull())
|
||||
dataItemObject.serviceCidr = contentNodeDataDataItem["ServiceCidr"].asString();
|
||||
if(!contentNodeDataDataItem["Status"].isNull())
|
||||
dataItemObject.status = contentNodeDataDataItem["Status"].asString();
|
||||
if(!contentNodeDataDataItem["Message"].isNull())
|
||||
dataItemObject.message = contentNodeDataDataItem["Message"].asString();
|
||||
if(!contentNodeDataDataItem["Route"].isNull())
|
||||
dataItemObject.route = std::stoi(contentNodeDataDataItem["Route"].asString());
|
||||
if(!contentNodeDataDataItem["NcCount"].isNull())
|
||||
dataItemObject.ncCount = std::stoi(contentNodeDataDataItem["NcCount"].asString());
|
||||
if(!contentNodeDataDataItem["SubnetCount"].isNull())
|
||||
dataItemObject.subnetCount = std::stoi(contentNodeDataDataItem["SubnetCount"].asString());
|
||||
if(!contentNodeDataDataItem["GmtCreate"].isNull())
|
||||
dataItemObject.gmtCreate = contentNodeDataDataItem["GmtCreate"].asString();
|
||||
if(!contentNodeDataDataItem["GmtModified"].isNull())
|
||||
dataItemObject.gmtModified = contentNodeDataDataItem["GmtModified"].asString();
|
||||
if(!contentNodeDataDataItem["Dependence"].isNull())
|
||||
dataItemObject.dependence = contentNodeDataDataItem["Dependence"].asString();
|
||||
content_.data.push_back(dataItemObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListVpdsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
ListVpdsResult::Content ListVpdsResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int ListVpdsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
81
eflo/src/model/UpdateSubnetRequest.cc
Normal file
81
eflo/src/model/UpdateSubnetRequest.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/eflo/model/UpdateSubnetRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::UpdateSubnetRequest;
|
||||
|
||||
UpdateSubnetRequest::UpdateSubnetRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "UpdateSubnet") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateSubnetRequest::~UpdateSubnetRequest() {}
|
||||
|
||||
std::string UpdateSubnetRequest::getSubnetId() const {
|
||||
return subnetId_;
|
||||
}
|
||||
|
||||
void UpdateSubnetRequest::setSubnetId(const std::string &subnetId) {
|
||||
subnetId_ = subnetId;
|
||||
setBodyParameter(std::string("SubnetId"), subnetId);
|
||||
}
|
||||
|
||||
std::string UpdateSubnetRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateSubnetRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::string UpdateSubnetRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void UpdateSubnetRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string UpdateSubnetRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void UpdateSubnetRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
std::string UpdateSubnetRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void UpdateSubnetRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setBodyParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
std::string UpdateSubnetRequest::getZoneId() const {
|
||||
return zoneId_;
|
||||
}
|
||||
|
||||
void UpdateSubnetRequest::setZoneId(const std::string &zoneId) {
|
||||
zoneId_ = zoneId;
|
||||
setBodyParameter(std::string("ZoneId"), zoneId);
|
||||
}
|
||||
|
||||
66
eflo/src/model/UpdateSubnetResult.cc
Normal file
66
eflo/src/model/UpdateSubnetResult.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/eflo/model/UpdateSubnetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
UpdateSubnetResult::UpdateSubnetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateSubnetResult::UpdateSubnetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateSubnetResult::~UpdateSubnetResult()
|
||||
{}
|
||||
|
||||
void UpdateSubnetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["SubnetId"].isNull())
|
||||
content_.subnetId = contentNode["SubnetId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateSubnetResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
UpdateSubnetResult::Content UpdateSubnetResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int UpdateSubnetResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
72
eflo/src/model/UpdateVccRequest.cc
Normal file
72
eflo/src/model/UpdateVccRequest.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/eflo/model/UpdateVccRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::UpdateVccRequest;
|
||||
|
||||
UpdateVccRequest::UpdateVccRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "UpdateVcc") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateVccRequest::~UpdateVccRequest() {}
|
||||
|
||||
int UpdateVccRequest::getBandwidth() const {
|
||||
return bandwidth_;
|
||||
}
|
||||
|
||||
void UpdateVccRequest::setBandwidth(int bandwidth) {
|
||||
bandwidth_ = bandwidth;
|
||||
setBodyParameter(std::string("Bandwidth"), std::to_string(bandwidth));
|
||||
}
|
||||
|
||||
std::string UpdateVccRequest::getOrderId() const {
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
void UpdateVccRequest::setOrderId(const std::string &orderId) {
|
||||
orderId_ = orderId;
|
||||
setBodyParameter(std::string("OrderId"), orderId);
|
||||
}
|
||||
|
||||
std::string UpdateVccRequest::getVccName() const {
|
||||
return vccName_;
|
||||
}
|
||||
|
||||
void UpdateVccRequest::setVccName(const std::string &vccName) {
|
||||
vccName_ = vccName;
|
||||
setBodyParameter(std::string("VccName"), vccName);
|
||||
}
|
||||
|
||||
std::string UpdateVccRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void UpdateVccRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string UpdateVccRequest::getVccId() const {
|
||||
return vccId_;
|
||||
}
|
||||
|
||||
void UpdateVccRequest::setVccId(const std::string &vccId) {
|
||||
vccId_ = vccId;
|
||||
setBodyParameter(std::string("VccId"), vccId);
|
||||
}
|
||||
|
||||
66
eflo/src/model/UpdateVccResult.cc
Normal file
66
eflo/src/model/UpdateVccResult.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/eflo/model/UpdateVccResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
UpdateVccResult::UpdateVccResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateVccResult::UpdateVccResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateVccResult::~UpdateVccResult()
|
||||
{}
|
||||
|
||||
void UpdateVccResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["VccId"].isNull())
|
||||
content_.vccId = contentNode["VccId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateVccResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
UpdateVccResult::Content UpdateVccResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int UpdateVccResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
63
eflo/src/model/UpdateVpdRequest.cc
Normal file
63
eflo/src/model/UpdateVpdRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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/eflo/model/UpdateVpdRequest.h>
|
||||
|
||||
using AlibabaCloud::Eflo::Model::UpdateVpdRequest;
|
||||
|
||||
UpdateVpdRequest::UpdateVpdRequest()
|
||||
: RpcServiceRequest("eflo", "2022-05-30", "UpdateVpd") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
UpdateVpdRequest::~UpdateVpdRequest() {}
|
||||
|
||||
std::string UpdateVpdRequest::getDescription() const {
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateVpdRequest::setDescription(const std::string &description) {
|
||||
description_ = description;
|
||||
setBodyParameter(std::string("Description"), description);
|
||||
}
|
||||
|
||||
std::string UpdateVpdRequest::getRegionId() const {
|
||||
return regionId_;
|
||||
}
|
||||
|
||||
void UpdateVpdRequest::setRegionId(const std::string ®ionId) {
|
||||
regionId_ = regionId;
|
||||
setBodyParameter(std::string("RegionId"), regionId);
|
||||
}
|
||||
|
||||
std::string UpdateVpdRequest::getVpdId() const {
|
||||
return vpdId_;
|
||||
}
|
||||
|
||||
void UpdateVpdRequest::setVpdId(const std::string &vpdId) {
|
||||
vpdId_ = vpdId;
|
||||
setBodyParameter(std::string("VpdId"), vpdId);
|
||||
}
|
||||
|
||||
std::string UpdateVpdRequest::getName() const {
|
||||
return name_;
|
||||
}
|
||||
|
||||
void UpdateVpdRequest::setName(const std::string &name) {
|
||||
name_ = name;
|
||||
setBodyParameter(std::string("Name"), name);
|
||||
}
|
||||
|
||||
66
eflo/src/model/UpdateVpdResult.cc
Normal file
66
eflo/src/model/UpdateVpdResult.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/eflo/model/UpdateVpdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eflo;
|
||||
using namespace AlibabaCloud::Eflo::Model;
|
||||
|
||||
UpdateVpdResult::UpdateVpdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateVpdResult::UpdateVpdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateVpdResult::~UpdateVpdResult()
|
||||
{}
|
||||
|
||||
void UpdateVpdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto contentNode = value["Content"];
|
||||
if(!contentNode["VpdId"].isNull())
|
||||
content_.vpdId = contentNode["VpdId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = std::stoi(value["Code"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateVpdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
UpdateVpdResult::Content UpdateVpdResult::getContent()const
|
||||
{
|
||||
return content_;
|
||||
}
|
||||
|
||||
int UpdateVpdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user