Add service label api.
This commit is contained in:
@@ -51,6 +51,42 @@ EasClient::EasClient(const std::string & accessKeyId, const std::string & access
|
||||
EasClient::~EasClient()
|
||||
{}
|
||||
|
||||
EasClient::CommitServiceOutcome EasClient::commitService(const CommitServiceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CommitServiceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CommitServiceOutcome(CommitServiceResult(outcome.result()));
|
||||
else
|
||||
return CommitServiceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::commitServiceAsync(const CommitServiceRequest& request, const CommitServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, commitService(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::CommitServiceOutcomeCallable EasClient::commitServiceCallable(const CommitServiceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CommitServiceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->commitService(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::CreateBenchmarkTaskOutcome EasClient::createBenchmarkTask(const CreateBenchmarkTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -663,6 +699,42 @@ EasClient::DeleteServiceInstancesOutcomeCallable EasClient::deleteServiceInstanc
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DeleteServiceLabelOutcome EasClient::deleteServiceLabel(const DeleteServiceLabelRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteServiceLabelOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteServiceLabelOutcome(DeleteServiceLabelResult(outcome.result()));
|
||||
else
|
||||
return DeleteServiceLabelOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::deleteServiceLabelAsync(const DeleteServiceLabelRequest& request, const DeleteServiceLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteServiceLabel(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::DeleteServiceLabelOutcomeCallable EasClient::deleteServiceLabelCallable(const DeleteServiceLabelRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteServiceLabelOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteServiceLabel(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DeleteServiceMirrorOutcome EasClient::deleteServiceMirror(const DeleteServiceMirrorRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -771,6 +843,42 @@ EasClient::DescribeBenchmarkTaskReportOutcomeCallable EasClient::describeBenchma
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DescribeGroupOutcome EasClient::describeGroup(const DescribeGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeGroupOutcome(DescribeGroupResult(outcome.result()));
|
||||
else
|
||||
return DescribeGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::describeGroupAsync(const DescribeGroupRequest& request, const DescribeGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::DescribeGroupOutcomeCallable EasClient::describeGroupCallable(const DescribeGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DescribeResourceOutcome EasClient::describeResource(const DescribeResourceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -987,6 +1095,42 @@ EasClient::DescribeServiceCronScalerOutcomeCallable EasClient::describeServiceCr
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DescribeServiceEventOutcome EasClient::describeServiceEvent(const DescribeServiceEventRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeServiceEventOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeServiceEventOutcome(DescribeServiceEventResult(outcome.result()));
|
||||
else
|
||||
return DescribeServiceEventOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::describeServiceEventAsync(const DescribeServiceEventRequest& request, const DescribeServiceEventAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeServiceEvent(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::DescribeServiceEventOutcomeCallable EasClient::describeServiceEventCallable(const DescribeServiceEventRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeServiceEventOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeServiceEvent(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DescribeServiceLogOutcome EasClient::describeServiceLog(const DescribeServiceLogRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1059,6 +1203,42 @@ EasClient::DescribeServiceMirrorOutcomeCallable EasClient::describeServiceMirror
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::DevelopServiceOutcome EasClient::developService(const DevelopServiceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DevelopServiceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DevelopServiceOutcome(DevelopServiceResult(outcome.result()));
|
||||
else
|
||||
return DevelopServiceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::developServiceAsync(const DevelopServiceRequest& request, const DevelopServiceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, developService(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::DevelopServiceOutcomeCallable EasClient::developServiceCallable(const DevelopServiceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DevelopServiceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->developService(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::ListBenchmarkTaskOutcome EasClient::listBenchmarkTask(const ListBenchmarkTaskRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1095,6 +1275,42 @@ EasClient::ListBenchmarkTaskOutcomeCallable EasClient::listBenchmarkTaskCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::ListGroupsOutcome EasClient::listGroups(const ListGroupsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListGroupsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListGroupsOutcome(ListGroupsResult(outcome.result()));
|
||||
else
|
||||
return ListGroupsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::listGroupsAsync(const ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listGroups(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::ListGroupsOutcomeCallable EasClient::listGroupsCallable(const ListGroupsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListGroupsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listGroups(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::ListResourceInstanceWorkerOutcome EasClient::listResourceInstanceWorker(const ListResourceInstanceWorkerRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1275,6 +1491,42 @@ EasClient::ListServiceInstancesOutcomeCallable EasClient::listServiceInstancesCa
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::ListServiceVersionsOutcome EasClient::listServiceVersions(const ListServiceVersionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListServiceVersionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListServiceVersionsOutcome(ListServiceVersionsResult(outcome.result()));
|
||||
else
|
||||
return ListServiceVersionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::listServiceVersionsAsync(const ListServiceVersionsRequest& request, const ListServiceVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listServiceVersions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::ListServiceVersionsOutcomeCallable EasClient::listServiceVersionsCallable(const ListServiceVersionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListServiceVersionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listServiceVersions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::ListServicesOutcome EasClient::listServices(const ListServicesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1599,6 +1851,42 @@ EasClient::UpdateResourceDLinkOutcomeCallable EasClient::updateResourceDLinkCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::UpdateResourceInstanceOutcome EasClient::updateResourceInstance(const UpdateResourceInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateResourceInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateResourceInstanceOutcome(UpdateResourceInstanceResult(outcome.result()));
|
||||
else
|
||||
return UpdateResourceInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::updateResourceInstanceAsync(const UpdateResourceInstanceRequest& request, const UpdateResourceInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateResourceInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::UpdateResourceInstanceOutcomeCallable EasClient::updateResourceInstanceCallable(const UpdateResourceInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateResourceInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateResourceInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceOutcome EasClient::updateService(const UpdateServiceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1707,6 +1995,42 @@ EasClient::UpdateServiceCronScalerOutcomeCallable EasClient::updateServiceCronSc
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceLabelOutcome EasClient::updateServiceLabel(const UpdateServiceLabelRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateServiceLabelOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateServiceLabelOutcome(UpdateServiceLabelResult(outcome.result()));
|
||||
else
|
||||
return UpdateServiceLabelOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::updateServiceLabelAsync(const UpdateServiceLabelRequest& request, const UpdateServiceLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateServiceLabel(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceLabelOutcomeCallable EasClient::updateServiceLabelCallable(const UpdateServiceLabelRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateServiceLabelOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateServiceLabel(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceMirrorOutcome EasClient::updateServiceMirror(const UpdateServiceMirrorRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1743,6 +2067,42 @@ EasClient::UpdateServiceMirrorOutcomeCallable EasClient::updateServiceMirrorCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceSafetyLockOutcome EasClient::updateServiceSafetyLock(const UpdateServiceSafetyLockRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateServiceSafetyLockOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateServiceSafetyLockOutcome(UpdateServiceSafetyLockResult(outcome.result()));
|
||||
else
|
||||
return UpdateServiceSafetyLockOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void EasClient::updateServiceSafetyLockAsync(const UpdateServiceSafetyLockRequest& request, const UpdateServiceSafetyLockAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateServiceSafetyLock(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceSafetyLockOutcomeCallable EasClient::updateServiceSafetyLockCallable(const UpdateServiceSafetyLockRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateServiceSafetyLockOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateServiceSafetyLock(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
EasClient::UpdateServiceVersionOutcome EasClient::updateServiceVersion(const UpdateServiceVersionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
46
eas/src/model/CommitServiceRequest.cc
Normal file
46
eas/src/model/CommitServiceRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/eas/model/CommitServiceRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::CommitServiceRequest;
|
||||
|
||||
CommitServiceRequest::CommitServiceRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/commit"};
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
CommitServiceRequest::~CommitServiceRequest() {}
|
||||
|
||||
std::string CommitServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void CommitServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string CommitServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void CommitServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
51
eas/src/model/CommitServiceResult.cc
Normal file
51
eas/src/model/CommitServiceResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eas/model/CommitServiceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
CommitServiceResult::CommitServiceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CommitServiceResult::CommitServiceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CommitServiceResult::~CommitServiceResult()
|
||||
{}
|
||||
|
||||
void CommitServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CommitServiceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@ CreateBenchmarkTaskRequest::CreateBenchmarkTaskRequest()
|
||||
|
||||
CreateBenchmarkTaskRequest::~CreateBenchmarkTaskRequest() {}
|
||||
|
||||
string CreateBenchmarkTaskRequest::getBody() const {
|
||||
std::string CreateBenchmarkTaskRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void CreateBenchmarkTaskRequest::setBody(string body) {
|
||||
void CreateBenchmarkTaskRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), std::to_string(body));
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ void CreateBenchmarkTaskResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["TaskName"].isNull())
|
||||
taskName_ = value["TaskName"].asString();
|
||||
if(!value["Region"].isNull())
|
||||
region_ = value["Region"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
@@ -53,13 +53,13 @@ std::string CreateBenchmarkTaskResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string CreateBenchmarkTaskResult::getTaskName()const
|
||||
{
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
std::string CreateBenchmarkTaskResult::getRegion()const
|
||||
{
|
||||
return region_;
|
||||
}
|
||||
|
||||
std::string CreateBenchmarkTaskResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,22 +26,22 @@ CreateResourceInstancesRequest::CreateResourceInstancesRequest()
|
||||
|
||||
CreateResourceInstancesRequest::~CreateResourceInstancesRequest() {}
|
||||
|
||||
string CreateResourceInstancesRequest::getResourceId() const {
|
||||
std::string CreateResourceInstancesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void CreateResourceInstancesRequest::setResourceId(string resourceId) {
|
||||
void CreateResourceInstancesRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string CreateResourceInstancesRequest::getClusterId() const {
|
||||
std::string CreateResourceInstancesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void CreateResourceInstancesRequest::setClusterId(string clusterId) {
|
||||
void CreateResourceInstancesRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string CreateResourceInstancesRequest::getBody() const {
|
||||
|
||||
@@ -26,22 +26,22 @@ CreateResourceLogRequest::CreateResourceLogRequest()
|
||||
|
||||
CreateResourceLogRequest::~CreateResourceLogRequest() {}
|
||||
|
||||
string CreateResourceLogRequest::getResourceId() const {
|
||||
std::string CreateResourceLogRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void CreateResourceLogRequest::setResourceId(string resourceId) {
|
||||
void CreateResourceLogRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string CreateResourceLogRequest::getClusterId() const {
|
||||
std::string CreateResourceLogRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void CreateResourceLogRequest::setClusterId(string clusterId) {
|
||||
void CreateResourceLogRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string CreateResourceLogRequest::getBody() const {
|
||||
|
||||
@@ -26,22 +26,22 @@ CreateServiceAutoScalerRequest::CreateServiceAutoScalerRequest()
|
||||
|
||||
CreateServiceAutoScalerRequest::~CreateServiceAutoScalerRequest() {}
|
||||
|
||||
string CreateServiceAutoScalerRequest::getServiceName() const {
|
||||
std::string CreateServiceAutoScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void CreateServiceAutoScalerRequest::setServiceName(string serviceName) {
|
||||
void CreateServiceAutoScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string CreateServiceAutoScalerRequest::getClusterId() const {
|
||||
std::string CreateServiceAutoScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void CreateServiceAutoScalerRequest::setClusterId(string clusterId) {
|
||||
void CreateServiceAutoScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string CreateServiceAutoScalerRequest::getBody() const {
|
||||
|
||||
@@ -26,22 +26,22 @@ CreateServiceCronScalerRequest::CreateServiceCronScalerRequest()
|
||||
|
||||
CreateServiceCronScalerRequest::~CreateServiceCronScalerRequest() {}
|
||||
|
||||
string CreateServiceCronScalerRequest::getServiceName() const {
|
||||
std::string CreateServiceCronScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void CreateServiceCronScalerRequest::setServiceName(string serviceName) {
|
||||
void CreateServiceCronScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string CreateServiceCronScalerRequest::getClusterId() const {
|
||||
std::string CreateServiceCronScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void CreateServiceCronScalerRequest::setClusterId(string clusterId) {
|
||||
void CreateServiceCronScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string CreateServiceCronScalerRequest::getBody() const {
|
||||
|
||||
@@ -26,22 +26,22 @@ CreateServiceMirrorRequest::CreateServiceMirrorRequest()
|
||||
|
||||
CreateServiceMirrorRequest::~CreateServiceMirrorRequest() {}
|
||||
|
||||
string CreateServiceMirrorRequest::getServiceName() const {
|
||||
std::string CreateServiceMirrorRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void CreateServiceMirrorRequest::setServiceName(string serviceName) {
|
||||
void CreateServiceMirrorRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string CreateServiceMirrorRequest::getClusterId() const {
|
||||
std::string CreateServiceMirrorRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void CreateServiceMirrorRequest::setClusterId(string clusterId) {
|
||||
void CreateServiceMirrorRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string CreateServiceMirrorRequest::getBody() const {
|
||||
|
||||
@@ -26,12 +26,30 @@ CreateServiceRequest::CreateServiceRequest()
|
||||
|
||||
CreateServiceRequest::~CreateServiceRequest() {}
|
||||
|
||||
string CreateServiceRequest::getBody() const {
|
||||
std::string CreateServiceRequest::getDevelop() const {
|
||||
return develop_;
|
||||
}
|
||||
|
||||
void CreateServiceRequest::setDevelop(const std::string &develop) {
|
||||
develop_ = develop;
|
||||
setParameter(std::string("Develop"), develop);
|
||||
}
|
||||
|
||||
std::string CreateServiceRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void CreateServiceRequest::setBody(string body) {
|
||||
void CreateServiceRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), std::to_string(body));
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
std::string CreateServiceRequest::getLabels() const {
|
||||
return labels_;
|
||||
}
|
||||
|
||||
void CreateServiceRequest::setLabels(const std::string &labels) {
|
||||
labels_ = labels;
|
||||
setParameter(std::string("Labels"), labels);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteBenchmarkTaskRequest::DeleteBenchmarkTaskRequest()
|
||||
|
||||
DeleteBenchmarkTaskRequest::~DeleteBenchmarkTaskRequest() {}
|
||||
|
||||
string DeleteBenchmarkTaskRequest::getTaskName() const {
|
||||
std::string DeleteBenchmarkTaskRequest::getTaskName() const {
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
void DeleteBenchmarkTaskRequest::setTaskName(string taskName) {
|
||||
void DeleteBenchmarkTaskRequest::setTaskName(const std::string &taskName) {
|
||||
taskName_ = taskName;
|
||||
setParameter(std::string("TaskName"), std::to_string(taskName));
|
||||
setParameter(std::string("TaskName"), taskName);
|
||||
}
|
||||
|
||||
string DeleteBenchmarkTaskRequest::getClusterId() const {
|
||||
std::string DeleteBenchmarkTaskRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteBenchmarkTaskRequest::setClusterId(string clusterId) {
|
||||
void DeleteBenchmarkTaskRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteResourceDLinkRequest::DeleteResourceDLinkRequest()
|
||||
|
||||
DeleteResourceDLinkRequest::~DeleteResourceDLinkRequest() {}
|
||||
|
||||
string DeleteResourceDLinkRequest::getResourceId() const {
|
||||
std::string DeleteResourceDLinkRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DeleteResourceDLinkRequest::setResourceId(string resourceId) {
|
||||
void DeleteResourceDLinkRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string DeleteResourceDLinkRequest::getClusterId() const {
|
||||
std::string DeleteResourceDLinkRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteResourceDLinkRequest::setClusterId(string clusterId) {
|
||||
void DeleteResourceDLinkRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,39 +26,39 @@ DeleteResourceInstancesRequest::DeleteResourceInstancesRequest()
|
||||
|
||||
DeleteResourceInstancesRequest::~DeleteResourceInstancesRequest() {}
|
||||
|
||||
string DeleteResourceInstancesRequest::getInstanceList() const {
|
||||
std::string DeleteResourceInstancesRequest::getInstanceList() const {
|
||||
return instanceList_;
|
||||
}
|
||||
|
||||
void DeleteResourceInstancesRequest::setInstanceList(string instanceList) {
|
||||
void DeleteResourceInstancesRequest::setInstanceList(const std::string &instanceList) {
|
||||
instanceList_ = instanceList;
|
||||
setParameter(std::string("InstanceList"), std::to_string(instanceList));
|
||||
setParameter(std::string("InstanceList"), instanceList);
|
||||
}
|
||||
|
||||
string DeleteResourceInstancesRequest::getResourceId() const {
|
||||
std::string DeleteResourceInstancesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DeleteResourceInstancesRequest::setResourceId(string resourceId) {
|
||||
void DeleteResourceInstancesRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
boolean DeleteResourceInstancesRequest::getAllFailed() const {
|
||||
bool DeleteResourceInstancesRequest::getAllFailed() const {
|
||||
return allFailed_;
|
||||
}
|
||||
|
||||
void DeleteResourceInstancesRequest::setAllFailed(boolean allFailed) {
|
||||
void DeleteResourceInstancesRequest::setAllFailed(bool allFailed) {
|
||||
allFailed_ = allFailed;
|
||||
setParameter(std::string("AllFailed"), std::to_string(allFailed));
|
||||
setParameter(std::string("AllFailed"), allFailed ? "true" : "false");
|
||||
}
|
||||
|
||||
string DeleteResourceInstancesRequest::getClusterId() const {
|
||||
std::string DeleteResourceInstancesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteResourceInstancesRequest::setClusterId(string clusterId) {
|
||||
void DeleteResourceInstancesRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteResourceLogRequest::DeleteResourceLogRequest()
|
||||
|
||||
DeleteResourceLogRequest::~DeleteResourceLogRequest() {}
|
||||
|
||||
string DeleteResourceLogRequest::getResourceId() const {
|
||||
std::string DeleteResourceLogRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DeleteResourceLogRequest::setResourceId(string resourceId) {
|
||||
void DeleteResourceLogRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string DeleteResourceLogRequest::getClusterId() const {
|
||||
std::string DeleteResourceLogRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteResourceLogRequest::setClusterId(string clusterId) {
|
||||
void DeleteResourceLogRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteResourceRequest::DeleteResourceRequest()
|
||||
|
||||
DeleteResourceRequest::~DeleteResourceRequest() {}
|
||||
|
||||
string DeleteResourceRequest::getResourceId() const {
|
||||
std::string DeleteResourceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DeleteResourceRequest::setResourceId(string resourceId) {
|
||||
void DeleteResourceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string DeleteResourceRequest::getClusterId() const {
|
||||
std::string DeleteResourceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteResourceRequest::setClusterId(string clusterId) {
|
||||
void DeleteResourceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteServiceAutoScalerRequest::DeleteServiceAutoScalerRequest()
|
||||
|
||||
DeleteServiceAutoScalerRequest::~DeleteServiceAutoScalerRequest() {}
|
||||
|
||||
string DeleteServiceAutoScalerRequest::getServiceName() const {
|
||||
std::string DeleteServiceAutoScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DeleteServiceAutoScalerRequest::setServiceName(string serviceName) {
|
||||
void DeleteServiceAutoScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DeleteServiceAutoScalerRequest::getClusterId() const {
|
||||
std::string DeleteServiceAutoScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteServiceAutoScalerRequest::setClusterId(string clusterId) {
|
||||
void DeleteServiceAutoScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteServiceCronScalerRequest::DeleteServiceCronScalerRequest()
|
||||
|
||||
DeleteServiceCronScalerRequest::~DeleteServiceCronScalerRequest() {}
|
||||
|
||||
string DeleteServiceCronScalerRequest::getServiceName() const {
|
||||
std::string DeleteServiceCronScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DeleteServiceCronScalerRequest::setServiceName(string serviceName) {
|
||||
void DeleteServiceCronScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DeleteServiceCronScalerRequest::getClusterId() const {
|
||||
std::string DeleteServiceCronScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteServiceCronScalerRequest::setClusterId(string clusterId) {
|
||||
void DeleteServiceCronScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,30 +26,30 @@ DeleteServiceInstancesRequest::DeleteServiceInstancesRequest()
|
||||
|
||||
DeleteServiceInstancesRequest::~DeleteServiceInstancesRequest() {}
|
||||
|
||||
string DeleteServiceInstancesRequest::getInstanceList() const {
|
||||
std::string DeleteServiceInstancesRequest::getInstanceList() const {
|
||||
return instanceList_;
|
||||
}
|
||||
|
||||
void DeleteServiceInstancesRequest::setInstanceList(string instanceList) {
|
||||
void DeleteServiceInstancesRequest::setInstanceList(const std::string &instanceList) {
|
||||
instanceList_ = instanceList;
|
||||
setParameter(std::string("InstanceList"), std::to_string(instanceList));
|
||||
setParameter(std::string("InstanceList"), instanceList);
|
||||
}
|
||||
|
||||
string DeleteServiceInstancesRequest::getServiceName() const {
|
||||
std::string DeleteServiceInstancesRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DeleteServiceInstancesRequest::setServiceName(string serviceName) {
|
||||
void DeleteServiceInstancesRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DeleteServiceInstancesRequest::getClusterId() const {
|
||||
std::string DeleteServiceInstancesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteServiceInstancesRequest::setClusterId(string clusterId) {
|
||||
void DeleteServiceInstancesRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
46
eas/src/model/DeleteServiceLabelRequest.cc
Normal file
46
eas/src/model/DeleteServiceLabelRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/eas/model/DeleteServiceLabelRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::DeleteServiceLabelRequest;
|
||||
|
||||
DeleteServiceLabelRequest::DeleteServiceLabelRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/label"};
|
||||
setMethod(HttpRequest::Method::Delete);
|
||||
}
|
||||
|
||||
DeleteServiceLabelRequest::~DeleteServiceLabelRequest() {}
|
||||
|
||||
std::string DeleteServiceLabelRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DeleteServiceLabelRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string DeleteServiceLabelRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteServiceLabelRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
51
eas/src/model/DeleteServiceLabelResult.cc
Normal file
51
eas/src/model/DeleteServiceLabelResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eas/model/DeleteServiceLabelResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
DeleteServiceLabelResult::DeleteServiceLabelResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteServiceLabelResult::DeleteServiceLabelResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteServiceLabelResult::~DeleteServiceLabelResult()
|
||||
{}
|
||||
|
||||
void DeleteServiceLabelResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteServiceLabelResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteServiceMirrorRequest::DeleteServiceMirrorRequest()
|
||||
|
||||
DeleteServiceMirrorRequest::~DeleteServiceMirrorRequest() {}
|
||||
|
||||
string DeleteServiceMirrorRequest::getServiceName() const {
|
||||
std::string DeleteServiceMirrorRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DeleteServiceMirrorRequest::setServiceName(string serviceName) {
|
||||
void DeleteServiceMirrorRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DeleteServiceMirrorRequest::getClusterId() const {
|
||||
std::string DeleteServiceMirrorRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteServiceMirrorRequest::setClusterId(string clusterId) {
|
||||
void DeleteServiceMirrorRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DeleteServiceRequest::DeleteServiceRequest()
|
||||
|
||||
DeleteServiceRequest::~DeleteServiceRequest() {}
|
||||
|
||||
string DeleteServiceRequest::getServiceName() const {
|
||||
std::string DeleteServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DeleteServiceRequest::setServiceName(string serviceName) {
|
||||
void DeleteServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DeleteServiceRequest::getClusterId() const {
|
||||
std::string DeleteServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DeleteServiceRequest::setClusterId(string clusterId) {
|
||||
void DeleteServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,30 @@ DescribeBenchmarkTaskReportRequest::DescribeBenchmarkTaskReportRequest()
|
||||
|
||||
DescribeBenchmarkTaskReportRequest::~DescribeBenchmarkTaskReportRequest() {}
|
||||
|
||||
string DescribeBenchmarkTaskReportRequest::getTaskName() const {
|
||||
std::string DescribeBenchmarkTaskReportRequest::getReportType() const {
|
||||
return reportType_;
|
||||
}
|
||||
|
||||
void DescribeBenchmarkTaskReportRequest::setReportType(const std::string &reportType) {
|
||||
reportType_ = reportType;
|
||||
setParameter(std::string("ReportType"), reportType);
|
||||
}
|
||||
|
||||
std::string DescribeBenchmarkTaskReportRequest::getTaskName() const {
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
void DescribeBenchmarkTaskReportRequest::setTaskName(string taskName) {
|
||||
void DescribeBenchmarkTaskReportRequest::setTaskName(const std::string &taskName) {
|
||||
taskName_ = taskName;
|
||||
setParameter(std::string("TaskName"), std::to_string(taskName));
|
||||
setParameter(std::string("TaskName"), taskName);
|
||||
}
|
||||
|
||||
string DescribeBenchmarkTaskReportRequest::getClusterId() const {
|
||||
std::string DescribeBenchmarkTaskReportRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeBenchmarkTaskReportRequest::setClusterId(string clusterId) {
|
||||
void DescribeBenchmarkTaskReportRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ void DescribeBenchmarkTaskReportResult::parse(const std::string &payload)
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ReportUrl"].isNull())
|
||||
reportUrl_ = value["ReportUrl"].asString();
|
||||
if(!value["Data"].isNull())
|
||||
data_ = value["Data"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -49,3 +51,8 @@ std::string DescribeBenchmarkTaskReportResult::getReportUrl()const
|
||||
return reportUrl_;
|
||||
}
|
||||
|
||||
ObjectOfAny DescribeBenchmarkTaskReportResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeBenchmarkTaskRequest::DescribeBenchmarkTaskRequest()
|
||||
|
||||
DescribeBenchmarkTaskRequest::~DescribeBenchmarkTaskRequest() {}
|
||||
|
||||
string DescribeBenchmarkTaskRequest::getTaskName() const {
|
||||
std::string DescribeBenchmarkTaskRequest::getTaskName() const {
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
void DescribeBenchmarkTaskRequest::setTaskName(string taskName) {
|
||||
void DescribeBenchmarkTaskRequest::setTaskName(const std::string &taskName) {
|
||||
taskName_ = taskName;
|
||||
setParameter(std::string("TaskName"), std::to_string(taskName));
|
||||
setParameter(std::string("TaskName"), taskName);
|
||||
}
|
||||
|
||||
string DescribeBenchmarkTaskRequest::getClusterId() const {
|
||||
std::string DescribeBenchmarkTaskRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeBenchmarkTaskRequest::setClusterId(string clusterId) {
|
||||
void DescribeBenchmarkTaskRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,8 @@ void DescribeBenchmarkTaskResult::parse(const std::string &payload)
|
||||
reason_ = value["Reason"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Endpoint"].isNull())
|
||||
endpoint_ = value["Endpoint"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -84,6 +86,11 @@ std::string DescribeBenchmarkTaskResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string DescribeBenchmarkTaskResult::getEndpoint()const
|
||||
{
|
||||
return endpoint_;
|
||||
}
|
||||
|
||||
std::string DescribeBenchmarkTaskResult::getTaskName()const
|
||||
{
|
||||
return taskName_;
|
||||
|
||||
46
eas/src/model/DescribeGroupRequest.cc
Normal file
46
eas/src/model/DescribeGroupRequest.cc
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* 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/eas/model/DescribeGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::DescribeGroupRequest;
|
||||
|
||||
DescribeGroupRequest::DescribeGroupRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/groups/[ClusterId]/[GroupName]"};
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeGroupRequest::~DescribeGroupRequest() {}
|
||||
|
||||
std::string DescribeGroupRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeGroupRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string DescribeGroupRequest::getGroupName() const {
|
||||
return groupName_;
|
||||
}
|
||||
|
||||
void DescribeGroupRequest::setGroupName(const std::string &groupName) {
|
||||
groupName_ = groupName;
|
||||
setParameter(std::string("GroupName"), groupName);
|
||||
}
|
||||
|
||||
100
eas/src/model/DescribeGroupResult.cc
Normal file
100
eas/src/model/DescribeGroupResult.cc
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* 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/eas/model/DescribeGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
DescribeGroupResult::DescribeGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeGroupResult::DescribeGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeGroupResult::~DescribeGroupResult()
|
||||
{}
|
||||
|
||||
void DescribeGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["ClusterId"].isNull())
|
||||
clusterId_ = value["ClusterId"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
createTime_ = value["CreateTime"].asString();
|
||||
if(!value["UpdateTime"].isNull())
|
||||
updateTime_ = value["UpdateTime"].asString();
|
||||
if(!value["QueueService"].isNull())
|
||||
queueService_ = value["QueueService"].asString();
|
||||
if(!value["InternetEndpoint"].isNull())
|
||||
internetEndpoint_ = value["InternetEndpoint"].asString();
|
||||
if(!value["IntranetEndpoint"].isNull())
|
||||
intranetEndpoint_ = value["IntranetEndpoint"].asString();
|
||||
if(!value["AccessToken"].isNull())
|
||||
accessToken_ = value["AccessToken"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getClusterId()const
|
||||
{
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getCreateTime()const
|
||||
{
|
||||
return createTime_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getUpdateTime()const
|
||||
{
|
||||
return updateTime_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getInternetEndpoint()const
|
||||
{
|
||||
return internetEndpoint_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getQueueService()const
|
||||
{
|
||||
return queueService_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getIntranetEndpoint()const
|
||||
{
|
||||
return intranetEndpoint_;
|
||||
}
|
||||
|
||||
std::string DescribeGroupResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeResourceDLinkRequest::DescribeResourceDLinkRequest()
|
||||
|
||||
DescribeResourceDLinkRequest::~DescribeResourceDLinkRequest() {}
|
||||
|
||||
string DescribeResourceDLinkRequest::getResourceId() const {
|
||||
std::string DescribeResourceDLinkRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DescribeResourceDLinkRequest::setResourceId(string resourceId) {
|
||||
void DescribeResourceDLinkRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string DescribeResourceDLinkRequest::getClusterId() const {
|
||||
std::string DescribeResourceDLinkRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeResourceDLinkRequest::setClusterId(string clusterId) {
|
||||
void DescribeResourceDLinkRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeResourceLogRequest::DescribeResourceLogRequest()
|
||||
|
||||
DescribeResourceLogRequest::~DescribeResourceLogRequest() {}
|
||||
|
||||
string DescribeResourceLogRequest::getResourceId() const {
|
||||
std::string DescribeResourceLogRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DescribeResourceLogRequest::setResourceId(string resourceId) {
|
||||
void DescribeResourceLogRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string DescribeResourceLogRequest::getClusterId() const {
|
||||
std::string DescribeResourceLogRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeResourceLogRequest::setClusterId(string clusterId) {
|
||||
void DescribeResourceLogRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeResourceRequest::DescribeResourceRequest()
|
||||
|
||||
DescribeResourceRequest::~DescribeResourceRequest() {}
|
||||
|
||||
string DescribeResourceRequest::getResourceId() const {
|
||||
std::string DescribeResourceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void DescribeResourceRequest::setResourceId(string resourceId) {
|
||||
void DescribeResourceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string DescribeResourceRequest::getClusterId() const {
|
||||
std::string DescribeResourceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeResourceRequest::setClusterId(string clusterId) {
|
||||
void DescribeResourceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeServiceAutoScalerRequest::DescribeServiceAutoScalerRequest()
|
||||
|
||||
DescribeServiceAutoScalerRequest::~DescribeServiceAutoScalerRequest() {}
|
||||
|
||||
string DescribeServiceAutoScalerRequest::getServiceName() const {
|
||||
std::string DescribeServiceAutoScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DescribeServiceAutoScalerRequest::setServiceName(string serviceName) {
|
||||
void DescribeServiceAutoScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DescribeServiceAutoScalerRequest::getClusterId() const {
|
||||
std::string DescribeServiceAutoScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeServiceAutoScalerRequest::setClusterId(string clusterId) {
|
||||
void DescribeServiceAutoScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,19 +39,46 @@ void DescribeServiceAutoScalerResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allScaleStrategiesNode = value["ScaleStrategies"]["ScaleStrategy"];
|
||||
for (auto valueScaleStrategiesScaleStrategy : allScaleStrategiesNode)
|
||||
{
|
||||
ScaleStrategy scaleStrategiesObject;
|
||||
if(!valueScaleStrategiesScaleStrategy["metricName"].isNull())
|
||||
scaleStrategiesObject.metricName = valueScaleStrategiesScaleStrategy["metricName"].asString();
|
||||
if(!valueScaleStrategiesScaleStrategy["threshold"].isNull())
|
||||
scaleStrategiesObject.threshold = std::stof(valueScaleStrategiesScaleStrategy["threshold"].asString());
|
||||
if(!valueScaleStrategiesScaleStrategy["service"].isNull())
|
||||
scaleStrategiesObject.service = valueScaleStrategiesScaleStrategy["service"].asString();
|
||||
scaleStrategies_.push_back(scaleStrategiesObject);
|
||||
}
|
||||
auto allCurrentMetricsNode = value["CurrentMetrics"]["CurrentMetric"];
|
||||
for (auto valueCurrentMetricsCurrentMetric : allCurrentMetricsNode)
|
||||
{
|
||||
CurrentMetric currentMetricsObject;
|
||||
if(!valueCurrentMetricsCurrentMetric["metricName"].isNull())
|
||||
currentMetricsObject.metricName = valueCurrentMetricsCurrentMetric["metricName"].asString();
|
||||
if(!valueCurrentMetricsCurrentMetric["value"].isNull())
|
||||
currentMetricsObject.value = std::stof(valueCurrentMetricsCurrentMetric["value"].asString());
|
||||
if(!valueCurrentMetricsCurrentMetric["service"].isNull())
|
||||
currentMetricsObject.service = valueCurrentMetricsCurrentMetric["service"].asString();
|
||||
currentMetrics_.push_back(currentMetricsObject);
|
||||
}
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["MinReplica"].isNull())
|
||||
minReplica_ = std::stoi(value["MinReplica"].asString());
|
||||
if(!value["MaxReplica"].isNull())
|
||||
maxReplica_ = std::stoi(value["MaxReplica"].asString());
|
||||
if(!value["Strategies"].isNull())
|
||||
strategies_ = value["Strategies"].asString();
|
||||
if(!value["CurrentValues"].isNull())
|
||||
currentValues_ = value["CurrentValues"].asString();
|
||||
if(!value["Behavior"].isNull())
|
||||
behavior_ = value["Behavior"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeServiceAutoScalerResult::CurrentMetric> DescribeServiceAutoScalerResult::getCurrentMetrics()const
|
||||
{
|
||||
return currentMetrics_;
|
||||
}
|
||||
|
||||
int DescribeServiceAutoScalerResult::getMaxReplica()const
|
||||
{
|
||||
return maxReplica_;
|
||||
@@ -62,18 +89,18 @@ std::string DescribeServiceAutoScalerResult::getServiceName()const
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceAutoScalerResult::getStrategies()const
|
||||
{
|
||||
return strategies_;
|
||||
}
|
||||
|
||||
int DescribeServiceAutoScalerResult::getMinReplica()const
|
||||
{
|
||||
return minReplica_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceAutoScalerResult::getCurrentValues()const
|
||||
std::vector<DescribeServiceAutoScalerResult::ScaleStrategy> DescribeServiceAutoScalerResult::getScaleStrategies()const
|
||||
{
|
||||
return currentValues_;
|
||||
return scaleStrategies_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceAutoScalerResult::getBehavior()const
|
||||
{
|
||||
return behavior_;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeServiceCronScalerRequest::DescribeServiceCronScalerRequest()
|
||||
|
||||
DescribeServiceCronScalerRequest::~DescribeServiceCronScalerRequest() {}
|
||||
|
||||
string DescribeServiceCronScalerRequest::getServiceName() const {
|
||||
std::string DescribeServiceCronScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DescribeServiceCronScalerRequest::setServiceName(string serviceName) {
|
||||
void DescribeServiceCronScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DescribeServiceCronScalerRequest::getClusterId() const {
|
||||
std::string DescribeServiceCronScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeServiceCronScalerRequest::setClusterId(string clusterId) {
|
||||
void DescribeServiceCronScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
82
eas/src/model/DescribeServiceEventRequest.cc
Normal file
82
eas/src/model/DescribeServiceEventRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/eas/model/DescribeServiceEventRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::DescribeServiceEventRequest;
|
||||
|
||||
DescribeServiceEventRequest::DescribeServiceEventRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/events"};
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
DescribeServiceEventRequest::~DescribeServiceEventRequest() {}
|
||||
|
||||
std::string DescribeServiceEventRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeServiceEventRequest::setPageSize(const std::string &pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), pageSize);
|
||||
}
|
||||
|
||||
std::string DescribeServiceEventRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeServiceEventRequest::setEndTime(const std::string &endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), endTime);
|
||||
}
|
||||
|
||||
std::string DescribeServiceEventRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DescribeServiceEventRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string DescribeServiceEventRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeServiceEventRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string DescribeServiceEventRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeServiceEventRequest::setStartTime(const std::string &startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), startTime);
|
||||
}
|
||||
|
||||
std::string DescribeServiceEventRequest::getPageNum() const {
|
||||
return pageNum_;
|
||||
}
|
||||
|
||||
void DescribeServiceEventRequest::setPageNum(const std::string &pageNum) {
|
||||
pageNum_ = pageNum;
|
||||
setParameter(std::string("PageNum"), pageNum);
|
||||
}
|
||||
|
||||
84
eas/src/model/DescribeServiceEventResult.cc
Normal file
84
eas/src/model/DescribeServiceEventResult.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eas/model/DescribeServiceEventResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
DescribeServiceEventResult::DescribeServiceEventResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeServiceEventResult::DescribeServiceEventResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeServiceEventResult::~DescribeServiceEventResult()
|
||||
{}
|
||||
|
||||
void DescribeServiceEventResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allEventsNode = value["Events"]["eventsItem"];
|
||||
for (auto valueEventseventsItem : allEventsNode)
|
||||
{
|
||||
EventsItem eventsObject;
|
||||
if(!valueEventseventsItem["Type"].isNull())
|
||||
eventsObject.type = valueEventseventsItem["Type"].asString();
|
||||
if(!valueEventseventsItem["Reason"].isNull())
|
||||
eventsObject.reason = valueEventseventsItem["Reason"].asString();
|
||||
if(!valueEventseventsItem["Message"].isNull())
|
||||
eventsObject.message = valueEventseventsItem["Message"].asString();
|
||||
if(!valueEventseventsItem["Time"].isNull())
|
||||
eventsObject.time = valueEventseventsItem["Time"].asString();
|
||||
events_.push_back(eventsObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
if(!value["TotalPageNum"].isNull())
|
||||
totalPageNum_ = std::stol(value["TotalPageNum"].asString());
|
||||
if(!value["PageNum"].isNull())
|
||||
pageNum_ = std::stol(value["PageNum"].asString());
|
||||
|
||||
}
|
||||
|
||||
long DescribeServiceEventResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
long DescribeServiceEventResult::getPageNum()const
|
||||
{
|
||||
return pageNum_;
|
||||
}
|
||||
|
||||
std::vector<DescribeServiceEventResult::EventsItem> DescribeServiceEventResult::getEvents()const
|
||||
{
|
||||
return events_;
|
||||
}
|
||||
|
||||
long DescribeServiceEventResult::getTotalPageNum()const
|
||||
{
|
||||
return totalPageNum_;
|
||||
}
|
||||
|
||||
@@ -26,75 +26,75 @@ DescribeServiceLogRequest::DescribeServiceLogRequest()
|
||||
|
||||
DescribeServiceLogRequest::~DescribeServiceLogRequest() {}
|
||||
|
||||
string DescribeServiceLogRequest::getIp() const {
|
||||
std::string DescribeServiceLogRequest::getIp() const {
|
||||
return ip_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setIp(string ip) {
|
||||
void DescribeServiceLogRequest::setIp(const std::string &ip) {
|
||||
ip_ = ip;
|
||||
setParameter(std::string("Ip"), std::to_string(ip));
|
||||
setParameter(std::string("Ip"), ip);
|
||||
}
|
||||
|
||||
integer DescribeServiceLogRequest::getPageSize() const {
|
||||
long DescribeServiceLogRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setPageSize(integer pageSize) {
|
||||
void DescribeServiceLogRequest::setPageSize(long pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
string DescribeServiceLogRequest::getEndTime() const {
|
||||
std::string DescribeServiceLogRequest::getEndTime() const {
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setEndTime(string endTime) {
|
||||
void DescribeServiceLogRequest::setEndTime(const std::string &endTime) {
|
||||
endTime_ = endTime;
|
||||
setParameter(std::string("EndTime"), std::to_string(endTime));
|
||||
setParameter(std::string("EndTime"), endTime);
|
||||
}
|
||||
|
||||
string DescribeServiceLogRequest::getServiceName() const {
|
||||
std::string DescribeServiceLogRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setServiceName(string serviceName) {
|
||||
void DescribeServiceLogRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DescribeServiceLogRequest::getStartTime() const {
|
||||
std::string DescribeServiceLogRequest::getStartTime() const {
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setStartTime(string startTime) {
|
||||
void DescribeServiceLogRequest::setStartTime(const std::string &startTime) {
|
||||
startTime_ = startTime;
|
||||
setParameter(std::string("StartTime"), std::to_string(startTime));
|
||||
setParameter(std::string("StartTime"), startTime);
|
||||
}
|
||||
|
||||
string DescribeServiceLogRequest::getClusterId() const {
|
||||
std::string DescribeServiceLogRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setClusterId(string clusterId) {
|
||||
void DescribeServiceLogRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
integer DescribeServiceLogRequest::getPageNum() const {
|
||||
long DescribeServiceLogRequest::getPageNum() const {
|
||||
return pageNum_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setPageNum(integer pageNum) {
|
||||
void DescribeServiceLogRequest::setPageNum(long pageNum) {
|
||||
pageNum_ = pageNum;
|
||||
setParameter(std::string("PageNum"), std::to_string(pageNum));
|
||||
}
|
||||
|
||||
string DescribeServiceLogRequest::getKeyword() const {
|
||||
std::string DescribeServiceLogRequest::getKeyword() const {
|
||||
return keyword_;
|
||||
}
|
||||
|
||||
void DescribeServiceLogRequest::setKeyword(string keyword) {
|
||||
void DescribeServiceLogRequest::setKeyword(const std::string &keyword) {
|
||||
keyword_ = keyword;
|
||||
setParameter(std::string("Keyword"), std::to_string(keyword));
|
||||
setParameter(std::string("Keyword"), keyword);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeServiceMirrorRequest::DescribeServiceMirrorRequest()
|
||||
|
||||
DescribeServiceMirrorRequest::~DescribeServiceMirrorRequest() {}
|
||||
|
||||
string DescribeServiceMirrorRequest::getServiceName() const {
|
||||
std::string DescribeServiceMirrorRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DescribeServiceMirrorRequest::setServiceName(string serviceName) {
|
||||
void DescribeServiceMirrorRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DescribeServiceMirrorRequest::getClusterId() const {
|
||||
std::string DescribeServiceMirrorRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeServiceMirrorRequest::setClusterId(string clusterId) {
|
||||
void DescribeServiceMirrorRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ DescribeServiceRequest::DescribeServiceRequest()
|
||||
|
||||
DescribeServiceRequest::~DescribeServiceRequest() {}
|
||||
|
||||
string DescribeServiceRequest::getServiceName() const {
|
||||
std::string DescribeServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DescribeServiceRequest::setServiceName(string serviceName) {
|
||||
void DescribeServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string DescribeServiceRequest::getClusterId() const {
|
||||
std::string DescribeServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DescribeServiceRequest::setClusterId(string clusterId) {
|
||||
void DescribeServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,16 @@ void DescribeServiceResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLabelsNode = value["Labels"]["LabelsItem"];
|
||||
for (auto valueLabelsLabelsItem : allLabelsNode)
|
||||
{
|
||||
LabelsItem labelsObject;
|
||||
if(!valueLabelsLabelsItem["LabelKey"].isNull())
|
||||
labelsObject.labelKey = valueLabelsLabelsItem["LabelKey"].asString();
|
||||
if(!valueLabelsLabelsItem["LabelValue"].isNull())
|
||||
labelsObject.labelValue = valueLabelsLabelsItem["LabelValue"].asString();
|
||||
labels_.push_back(labelsObject);
|
||||
}
|
||||
if(!value["Region"].isNull())
|
||||
region_ = value["Region"].asString();
|
||||
if(!value["CallerUid"].isNull())
|
||||
@@ -75,10 +85,14 @@ void DescribeServiceResult::parse(const std::string &payload)
|
||||
reason_ = value["Reason"].asString();
|
||||
if(!value["Resource"].isNull())
|
||||
resource_ = value["Resource"].asString();
|
||||
if(!value["ResourceAlias"].isNull())
|
||||
resourceAlias_ = value["ResourceAlias"].asString();
|
||||
if(!value["ServiceConfig"].isNull())
|
||||
serviceConfig_ = value["ServiceConfig"].asString();
|
||||
if(!value["ServiceName"].isNull())
|
||||
serviceName_ = value["ServiceName"].asString();
|
||||
if(!value["ServiceGroup"].isNull())
|
||||
serviceGroup_ = value["ServiceGroup"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
status_ = value["Status"].asString();
|
||||
if(!value["CreateTime"].isNull())
|
||||
@@ -89,10 +103,20 @@ void DescribeServiceResult::parse(const std::string &payload)
|
||||
weight_ = std::stoi(value["Weight"].asString());
|
||||
if(!value["ServiceId"].isNull())
|
||||
serviceId_ = value["ServiceId"].asString();
|
||||
if(!value["ServiceUid"].isNull())
|
||||
serviceUid_ = value["ServiceUid"].asString();
|
||||
if(!value["AccessToken"].isNull())
|
||||
accessToken_ = value["AccessToken"].asString();
|
||||
if(!value["Source"].isNull())
|
||||
source_ = value["Source"].asString();
|
||||
if(!value["ExtraData"].isNull())
|
||||
extraData_ = value["ExtraData"].asString();
|
||||
if(!value["Role"].isNull())
|
||||
role_ = value["Role"].asString();
|
||||
if(!value["RoleAttrs"].isNull())
|
||||
roleAttrs_ = value["RoleAttrs"].asString();
|
||||
if(!value["SafetyLock"].isNull())
|
||||
safetyLock_ = value["SafetyLock"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -101,6 +125,11 @@ std::string DescribeServiceResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getServiceGroup()const
|
||||
{
|
||||
return serviceGroup_;
|
||||
}
|
||||
|
||||
int DescribeServiceResult::getMemory()const
|
||||
{
|
||||
return memory_;
|
||||
@@ -171,6 +200,11 @@ std::string DescribeServiceResult::getInternetEndpoint()const
|
||||
return internetEndpoint_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getResourceAlias()const
|
||||
{
|
||||
return resourceAlias_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
@@ -186,16 +220,31 @@ std::string DescribeServiceResult::getResource()const
|
||||
return resource_;
|
||||
}
|
||||
|
||||
std::vector<DescribeServiceResult::LabelsItem> DescribeServiceResult::getLabels()const
|
||||
{
|
||||
return labels_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::get_Namespace()const
|
||||
{
|
||||
return _namespace_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getExtraData()const
|
||||
{
|
||||
return extraData_;
|
||||
}
|
||||
|
||||
int DescribeServiceResult::getWeight()const
|
||||
{
|
||||
return weight_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getRole()const
|
||||
{
|
||||
return role_;
|
||||
}
|
||||
|
||||
int DescribeServiceResult::getPendingInstance()const
|
||||
{
|
||||
return pendingInstance_;
|
||||
@@ -211,11 +260,21 @@ std::string DescribeServiceResult::getServiceName()const
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getSafetyLock()const
|
||||
{
|
||||
return safetyLock_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getUpdateTime()const
|
||||
{
|
||||
return updateTime_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getServiceUid()const
|
||||
{
|
||||
return serviceUid_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getRegion()const
|
||||
{
|
||||
return region_;
|
||||
@@ -231,3 +290,8 @@ std::string DescribeServiceResult::getIntranetEndpoint()const
|
||||
return intranetEndpoint_;
|
||||
}
|
||||
|
||||
std::string DescribeServiceResult::getRoleAttrs()const
|
||||
{
|
||||
return roleAttrs_;
|
||||
}
|
||||
|
||||
|
||||
55
eas/src/model/DevelopServiceRequest.cc
Normal file
55
eas/src/model/DevelopServiceRequest.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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/eas/model/DevelopServiceRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::DevelopServiceRequest;
|
||||
|
||||
DevelopServiceRequest::DevelopServiceRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/develop"};
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
DevelopServiceRequest::~DevelopServiceRequest() {}
|
||||
|
||||
std::string DevelopServiceRequest::getExit() const {
|
||||
return exit_;
|
||||
}
|
||||
|
||||
void DevelopServiceRequest::setExit(const std::string &exit) {
|
||||
exit_ = exit;
|
||||
setParameter(std::string("Exit"), exit);
|
||||
}
|
||||
|
||||
std::string DevelopServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void DevelopServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string DevelopServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void DevelopServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
51
eas/src/model/DevelopServiceResult.cc
Normal file
51
eas/src/model/DevelopServiceResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eas/model/DevelopServiceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
DevelopServiceResult::DevelopServiceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DevelopServiceResult::DevelopServiceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DevelopServiceResult::~DevelopServiceResult()
|
||||
{}
|
||||
|
||||
void DevelopServiceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DevelopServiceResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
@@ -26,3 +26,39 @@ ListBenchmarkTaskRequest::ListBenchmarkTaskRequest()
|
||||
|
||||
ListBenchmarkTaskRequest::~ListBenchmarkTaskRequest() {}
|
||||
|
||||
std::string ListBenchmarkTaskRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void ListBenchmarkTaskRequest::setFilter(const std::string &filter) {
|
||||
filter_ = filter;
|
||||
setParameter(std::string("Filter"), filter);
|
||||
}
|
||||
|
||||
std::string ListBenchmarkTaskRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListBenchmarkTaskRequest::setPageSize(const std::string &pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), pageSize);
|
||||
}
|
||||
|
||||
std::string ListBenchmarkTaskRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void ListBenchmarkTaskRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string ListBenchmarkTaskRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListBenchmarkTaskRequest::setPageNumber(const std::string &pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), pageNumber);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,11 +63,32 @@ void ListBenchmarkTaskResult::parse(const std::string &payload)
|
||||
tasksObject.updateTime = valueTasksTask["UpdateTime"].asString();
|
||||
tasks_.push_back(tasksObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ListBenchmarkTaskResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<ListBenchmarkTaskResult::Task> ListBenchmarkTaskResult::getTasks()const
|
||||
{
|
||||
return tasks_;
|
||||
}
|
||||
|
||||
int ListBenchmarkTaskResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListBenchmarkTaskResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
|
||||
55
eas/src/model/ListGroupsRequest.cc
Normal file
55
eas/src/model/ListGroupsRequest.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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/eas/model/ListGroupsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::ListGroupsRequest;
|
||||
|
||||
ListGroupsRequest::ListGroupsRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/groups"};
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListGroupsRequest::~ListGroupsRequest() {}
|
||||
|
||||
std::string ListGroupsRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void ListGroupsRequest::setFilter(const std::string &filter) {
|
||||
filter_ = filter;
|
||||
setParameter(std::string("Filter"), filter);
|
||||
}
|
||||
|
||||
std::string ListGroupsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListGroupsRequest::setPageSize(const std::string &pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), pageSize);
|
||||
}
|
||||
|
||||
std::string ListGroupsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListGroupsRequest::setPageNumber(const std::string &pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), pageNumber);
|
||||
}
|
||||
|
||||
92
eas/src/model/ListGroupsResult.cc
Normal file
92
eas/src/model/ListGroupsResult.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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/eas/model/ListGroupsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
ListGroupsResult::ListGroupsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListGroupsResult::ListGroupsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListGroupsResult::~ListGroupsResult()
|
||||
{}
|
||||
|
||||
void ListGroupsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allGroupsNode = value["Groups"]["服务组列表"];
|
||||
for (auto valueGroups服务组列表 : allGroupsNode)
|
||||
{
|
||||
服务组列表 groupsObject;
|
||||
if(!valueGroups服务组列表["Name"].isNull())
|
||||
groupsObject.name = valueGroups服务组列表["Name"].asString();
|
||||
if(!valueGroups服务组列表["ClusterId"].isNull())
|
||||
groupsObject.clusterId = valueGroups服务组列表["ClusterId"].asString();
|
||||
if(!valueGroups服务组列表["CreateTime"].isNull())
|
||||
groupsObject.createTime = valueGroups服务组列表["CreateTime"].asString();
|
||||
if(!valueGroups服务组列表["UpdateTime"].isNull())
|
||||
groupsObject.updateTime = valueGroups服务组列表["UpdateTime"].asString();
|
||||
if(!valueGroups服务组列表["QueueService"].isNull())
|
||||
groupsObject.queueService = valueGroups服务组列表["QueueService"].asString();
|
||||
if(!valueGroups服务组列表["InternetEndpoint"].isNull())
|
||||
groupsObject.internetEndpoint = valueGroups服务组列表["InternetEndpoint"].asString();
|
||||
if(!valueGroups服务组列表["IntranetEndpoint"].isNull())
|
||||
groupsObject.intranetEndpoint = valueGroups服务组列表["IntranetEndpoint"].asString();
|
||||
if(!valueGroups服务组列表["AccessToken"].isNull())
|
||||
groupsObject.accessToken = valueGroups服务组列表["AccessToken"].asString();
|
||||
groups_.push_back(groupsObject);
|
||||
}
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stol(value["PageSize"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stol(value["PageNumber"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListGroupsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
long ListGroupsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
long ListGroupsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
std::vector<ListGroupsResult::服务组列表> ListGroupsResult::getGroups()const
|
||||
{
|
||||
return groups_;
|
||||
}
|
||||
|
||||
@@ -26,47 +26,47 @@ ListResourceInstanceWorkerRequest::ListResourceInstanceWorkerRequest()
|
||||
|
||||
ListResourceInstanceWorkerRequest::~ListResourceInstanceWorkerRequest() {}
|
||||
|
||||
string ListResourceInstanceWorkerRequest::getResourceId() const {
|
||||
std::string ListResourceInstanceWorkerRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListResourceInstanceWorkerRequest::setResourceId(string resourceId) {
|
||||
void ListResourceInstanceWorkerRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string ListResourceInstanceWorkerRequest::getInstanceName() const {
|
||||
std::string ListResourceInstanceWorkerRequest::getInstanceName() const {
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void ListResourceInstanceWorkerRequest::setInstanceName(string instanceName) {
|
||||
void ListResourceInstanceWorkerRequest::setInstanceName(const std::string &instanceName) {
|
||||
instanceName_ = instanceName;
|
||||
setParameter(std::string("InstanceName"), std::to_string(instanceName));
|
||||
setParameter(std::string("InstanceName"), instanceName);
|
||||
}
|
||||
|
||||
integer ListResourceInstanceWorkerRequest::getPageSize() const {
|
||||
int ListResourceInstanceWorkerRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListResourceInstanceWorkerRequest::setPageSize(integer pageSize) {
|
||||
void ListResourceInstanceWorkerRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
string ListResourceInstanceWorkerRequest::getClusterId() const {
|
||||
std::string ListResourceInstanceWorkerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListResourceInstanceWorkerRequest::setClusterId(string clusterId) {
|
||||
void ListResourceInstanceWorkerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
integer ListResourceInstanceWorkerRequest::getPageNumber() const {
|
||||
int ListResourceInstanceWorkerRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListResourceInstanceWorkerRequest::setPageNumber(integer pageNumber) {
|
||||
void ListResourceInstanceWorkerRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
@@ -26,47 +26,65 @@ ListResourceInstancesRequest::ListResourceInstancesRequest()
|
||||
|
||||
ListResourceInstancesRequest::~ListResourceInstancesRequest() {}
|
||||
|
||||
string ListResourceInstancesRequest::getResourceId() const {
|
||||
std::string ListResourceInstancesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setResourceId(string resourceId) {
|
||||
void ListResourceInstancesRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
integer ListResourceInstancesRequest::getPageSize() const {
|
||||
std::string ListResourceInstancesRequest::getInstanceName() const {
|
||||
return instanceName_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setInstanceName(const std::string &instanceName) {
|
||||
instanceName_ = instanceName;
|
||||
setParameter(std::string("InstanceName"), instanceName);
|
||||
}
|
||||
|
||||
std::string ListResourceInstancesRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setInstanceId(const std::string &instanceId) {
|
||||
instanceId_ = instanceId;
|
||||
setParameter(std::string("InstanceId"), instanceId);
|
||||
}
|
||||
|
||||
int ListResourceInstancesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setPageSize(integer pageSize) {
|
||||
void ListResourceInstancesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
string ListResourceInstancesRequest::getClusterId() const {
|
||||
std::string ListResourceInstancesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setClusterId(string clusterId) {
|
||||
void ListResourceInstancesRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
string ListResourceInstancesRequest::getChargeType() const {
|
||||
std::string ListResourceInstancesRequest::getChargeType() const {
|
||||
return chargeType_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setChargeType(string chargeType) {
|
||||
void ListResourceInstancesRequest::setChargeType(const std::string &chargeType) {
|
||||
chargeType_ = chargeType;
|
||||
setParameter(std::string("ChargeType"), std::to_string(chargeType));
|
||||
setParameter(std::string("ChargeType"), chargeType);
|
||||
}
|
||||
|
||||
integer ListResourceInstancesRequest::getPageNumber() const {
|
||||
int ListResourceInstancesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListResourceInstancesRequest::setPageNumber(integer pageNumber) {
|
||||
void ListResourceInstancesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
@@ -57,10 +57,12 @@ void ListResourceInstancesResult::parse(const std::string &payload)
|
||||
instancesObject.instanceGpuCount = std::stoi(valueInstancesInstancesItem["InstanceGpuCount"].asString());
|
||||
if(!valueInstancesInstancesItem["InstanceMemory"].isNull())
|
||||
instancesObject.instanceMemory = valueInstancesInstancesItem["InstanceMemory"].asString();
|
||||
if(!valueInstancesInstancesItem["InstanceGpuMemory"].isNull())
|
||||
instancesObject.instanceGpuMemory = valueInstancesInstancesItem["InstanceGpuMemory"].asString();
|
||||
if(!valueInstancesInstancesItem["InstanceUsedCpu"].isNull())
|
||||
instancesObject.instanceUsedCpu = std::stof(valueInstancesInstancesItem["InstanceUsedCpu"].asString());
|
||||
if(!valueInstancesInstancesItem["InstanceUsedGpu"].isNull())
|
||||
instancesObject.instanceUsedGpu = std::stoi(valueInstancesInstancesItem["InstanceUsedGpu"].asString());
|
||||
instancesObject.instanceUsedGpu = std::stof(valueInstancesInstancesItem["InstanceUsedGpu"].asString());
|
||||
if(!valueInstancesInstancesItem["InstanceUsedMemory"].isNull())
|
||||
instancesObject.instanceUsedMemory = valueInstancesInstancesItem["InstanceUsedMemory"].asString();
|
||||
if(!valueInstancesInstancesItem["InstanceType"].isNull())
|
||||
@@ -73,6 +75,16 @@ void ListResourceInstancesResult::parse(const std::string &payload)
|
||||
instancesObject.expiredTime = valueInstancesInstancesItem["ExpiredTime"].asString();
|
||||
if(!valueInstancesInstancesItem["AutoRenewal"].isNull())
|
||||
instancesObject.autoRenewal = valueInstancesInstancesItem["AutoRenewal"].asString() == "true";
|
||||
if(!valueInstancesInstancesItem["Arch"].isNull())
|
||||
instancesObject.arch = valueInstancesInstancesItem["Arch"].asString();
|
||||
if(!valueInstancesInstancesItem["Region"].isNull())
|
||||
instancesObject.region = valueInstancesInstancesItem["Region"].asString();
|
||||
if(!valueInstancesInstancesItem["Zone"].isNull())
|
||||
instancesObject.zone = valueInstancesInstancesItem["Zone"].asString();
|
||||
if(!valueInstancesInstancesItem["InstanceTenantIp"].isNull())
|
||||
instancesObject.instanceTenantIp = valueInstancesInstancesItem["InstanceTenantIp"].asString();
|
||||
if(!valueInstancesInstancesItem["InstanceUsedGpuMemory"].isNull())
|
||||
instancesObject.instanceUsedGpuMemory = valueInstancesInstancesItem["InstanceUsedGpuMemory"].asString();
|
||||
instances_.push_back(instancesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
|
||||
@@ -26,38 +26,38 @@ ListResourceServicesRequest::ListResourceServicesRequest()
|
||||
|
||||
ListResourceServicesRequest::~ListResourceServicesRequest() {}
|
||||
|
||||
string ListResourceServicesRequest::getResourceId() const {
|
||||
std::string ListResourceServicesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListResourceServicesRequest::setResourceId(string resourceId) {
|
||||
void ListResourceServicesRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
integer ListResourceServicesRequest::getPageSize() const {
|
||||
int ListResourceServicesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListResourceServicesRequest::setPageSize(integer pageSize) {
|
||||
void ListResourceServicesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
string ListResourceServicesRequest::getClusterId() const {
|
||||
std::string ListResourceServicesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListResourceServicesRequest::setClusterId(string clusterId) {
|
||||
void ListResourceServicesRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
integer ListResourceServicesRequest::getPageNumber() const {
|
||||
int ListResourceServicesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListResourceServicesRequest::setPageNumber(integer pageNumber) {
|
||||
void ListResourceServicesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
@@ -81,10 +81,14 @@ void ListResourceServicesResult::parse(const std::string &payload)
|
||||
servicesObject.reason = valueServicesServicesItem["Reason"].asString();
|
||||
if(!valueServicesServicesItem["Resource"].isNull())
|
||||
servicesObject.resource = valueServicesServicesItem["Resource"].asString();
|
||||
if(!valueServicesServicesItem["ResourceAlias"].isNull())
|
||||
servicesObject.resourceAlias = valueServicesServicesItem["ResourceAlias"].asString();
|
||||
if(!valueServicesServicesItem["ServiceConfig"].isNull())
|
||||
servicesObject.serviceConfig = valueServicesServicesItem["ServiceConfig"].asString();
|
||||
if(!valueServicesServicesItem["ServiceName"].isNull())
|
||||
servicesObject.serviceName = valueServicesServicesItem["ServiceName"].asString();
|
||||
if(!valueServicesServicesItem["ServiceGroup"].isNull())
|
||||
servicesObject.serviceGroup = valueServicesServicesItem["ServiceGroup"].asString();
|
||||
if(!valueServicesServicesItem["Status"].isNull())
|
||||
servicesObject.status = valueServicesServicesItem["Status"].asString();
|
||||
if(!valueServicesServicesItem["CreateTime"].isNull())
|
||||
@@ -95,10 +99,30 @@ void ListResourceServicesResult::parse(const std::string &payload)
|
||||
servicesObject.weight = std::stoi(valueServicesServicesItem["Weight"].asString());
|
||||
if(!valueServicesServicesItem["ServiceId"].isNull())
|
||||
servicesObject.serviceId = valueServicesServicesItem["ServiceId"].asString();
|
||||
if(!valueServicesServicesItem["ServiceUid"].isNull())
|
||||
servicesObject.serviceUid = valueServicesServicesItem["ServiceUid"].asString();
|
||||
if(!valueServicesServicesItem["AccessToken"].isNull())
|
||||
servicesObject.accessToken = valueServicesServicesItem["AccessToken"].asString();
|
||||
if(!valueServicesServicesItem["Source"].isNull())
|
||||
servicesObject.source = valueServicesServicesItem["Source"].asString();
|
||||
if(!valueServicesServicesItem["ExtraData"].isNull())
|
||||
servicesObject.extraData = valueServicesServicesItem["ExtraData"].asString();
|
||||
if(!valueServicesServicesItem["Role"].isNull())
|
||||
servicesObject.role = valueServicesServicesItem["Role"].asString();
|
||||
if(!valueServicesServicesItem["RoleAttrs"].isNull())
|
||||
servicesObject.roleAttrs = valueServicesServicesItem["RoleAttrs"].asString();
|
||||
if(!valueServicesServicesItem["SafetyLock"].isNull())
|
||||
servicesObject.safetyLock = valueServicesServicesItem["SafetyLock"].asString();
|
||||
auto allLabelsNode = valueServicesServicesItem["Labels"]["LabelsItem"];
|
||||
for (auto valueServicesServicesItemLabelsLabelsItem : allLabelsNode)
|
||||
{
|
||||
ServicesItem::LabelsItem labelsObject;
|
||||
if(!valueServicesServicesItemLabelsLabelsItem["LabelKey"].isNull())
|
||||
labelsObject.labelKey = valueServicesServicesItemLabelsLabelsItem["LabelKey"].asString();
|
||||
if(!valueServicesServicesItemLabelsLabelsItem["LabelValue"].isNull())
|
||||
labelsObject.labelValue = valueServicesServicesItemLabelsLabelsItem["LabelValue"].asString();
|
||||
servicesObject.labels.push_back(labelsObject);
|
||||
}
|
||||
services_.push_back(servicesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
|
||||
@@ -26,20 +26,38 @@ ListResourcesRequest::ListResourcesRequest()
|
||||
|
||||
ListResourcesRequest::~ListResourcesRequest() {}
|
||||
|
||||
integer ListResourcesRequest::getPageSize() const {
|
||||
std::string ListResourcesRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void ListResourcesRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
int ListResourcesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListResourcesRequest::setPageSize(integer pageSize) {
|
||||
void ListResourcesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
integer ListResourcesRequest::getPageNumber() const {
|
||||
std::string ListResourcesRequest::getResourceName() const {
|
||||
return resourceName_;
|
||||
}
|
||||
|
||||
void ListResourcesRequest::setResourceName(const std::string &resourceName) {
|
||||
resourceName_ = resourceName;
|
||||
setParameter(std::string("ResourceName"), resourceName);
|
||||
}
|
||||
|
||||
int ListResourcesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListResourcesRequest::setPageNumber(integer pageNumber) {
|
||||
void ListResourcesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
@@ -26,38 +26,38 @@ ListServiceInstancesRequest::ListServiceInstancesRequest()
|
||||
|
||||
ListServiceInstancesRequest::~ListServiceInstancesRequest() {}
|
||||
|
||||
integer ListServiceInstancesRequest::getPageSize() const {
|
||||
int ListServiceInstancesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setPageSize(integer pageSize) {
|
||||
void ListServiceInstancesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
string ListServiceInstancesRequest::getServiceName() const {
|
||||
std::string ListServiceInstancesRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setServiceName(string serviceName) {
|
||||
void ListServiceInstancesRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string ListServiceInstancesRequest::getClusterId() const {
|
||||
std::string ListServiceInstancesRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setClusterId(string clusterId) {
|
||||
void ListServiceInstancesRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
integer ListServiceInstancesRequest::getPageNumber() const {
|
||||
int ListServiceInstancesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListServiceInstancesRequest::setPageNumber(integer pageNumber) {
|
||||
void ListServiceInstancesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
@@ -67,6 +67,14 @@ void ListServiceInstancesResult::parse(const std::string &payload)
|
||||
instancesObject.readyProcesses = std::stoi(valueInstancesInstancesItem["ReadyProcesses"].asString());
|
||||
if(!valueInstancesInstancesItem["StartAt"].isNull())
|
||||
instancesObject.startAt = valueInstancesInstancesItem["StartAt"].asString();
|
||||
if(!valueInstancesInstancesItem["Role"].isNull())
|
||||
instancesObject.role = valueInstancesInstancesItem["Role"].asString();
|
||||
if(!valueInstancesInstancesItem["ResourceType"].isNull())
|
||||
instancesObject.resourceType = valueInstancesInstancesItem["ResourceType"].asString();
|
||||
if(!valueInstancesInstancesItem["TenantInstanceIP"].isNull())
|
||||
instancesObject.tenantInstanceIP = valueInstancesInstancesItem["TenantInstanceIP"].asString();
|
||||
if(!valueInstancesInstancesItem["TenantHostIP"].isNull())
|
||||
instancesObject.tenantHostIP = valueInstancesInstancesItem["TenantHostIP"].asString();
|
||||
auto allLastState = value["LastState"]["null"];
|
||||
for (auto value : allLastState)
|
||||
instancesObject.lastState.push_back(value.asString());
|
||||
|
||||
64
eas/src/model/ListServiceVersionsRequest.cc
Normal file
64
eas/src/model/ListServiceVersionsRequest.cc
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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/eas/model/ListServiceVersionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::ListServiceVersionsRequest;
|
||||
|
||||
ListServiceVersionsRequest::ListServiceVersionsRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/versions"};
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListServiceVersionsRequest::~ListServiceVersionsRequest() {}
|
||||
|
||||
int ListServiceVersionsRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListServiceVersionsRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListServiceVersionsRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void ListServiceVersionsRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string ListServiceVersionsRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ListServiceVersionsRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
int ListServiceVersionsRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListServiceVersionsRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
86
eas/src/model/ListServiceVersionsResult.cc
Normal file
86
eas/src/model/ListServiceVersionsResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/eas/model/ListServiceVersionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
ListServiceVersionsResult::ListServiceVersionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListServiceVersionsResult::ListServiceVersionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListServiceVersionsResult::~ListServiceVersionsResult()
|
||||
{}
|
||||
|
||||
void ListServiceVersionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allVersionsNode = value["Versions"]["versionsItem"];
|
||||
for (auto valueVersionsversionsItem : allVersionsNode)
|
||||
{
|
||||
VersionsItem versionsObject;
|
||||
if(!valueVersionsversionsItem["BuildTime"].isNull())
|
||||
versionsObject.buildTime = valueVersionsversionsItem["BuildTime"].asString();
|
||||
if(!valueVersionsversionsItem["ImageAvailable"].isNull())
|
||||
versionsObject.imageAvailable = valueVersionsversionsItem["ImageAvailable"].asString();
|
||||
if(!valueVersionsversionsItem["ImageId"].isNull())
|
||||
versionsObject.imageId = std::stoi(valueVersionsversionsItem["ImageId"].asString());
|
||||
if(!valueVersionsversionsItem["Message"].isNull())
|
||||
versionsObject.message = valueVersionsversionsItem["Message"].asString();
|
||||
if(!valueVersionsversionsItem["ServiceRunnable"].isNull())
|
||||
versionsObject.serviceRunnable = valueVersionsversionsItem["ServiceRunnable"].asString();
|
||||
versions_.push_back(versionsObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stol(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListServiceVersionsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<ListServiceVersionsResult::VersionsItem> ListServiceVersionsResult::getVersions()const
|
||||
{
|
||||
return versions_;
|
||||
}
|
||||
|
||||
int ListServiceVersionsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListServiceVersionsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
@@ -26,48 +26,84 @@ ListServicesRequest::ListServicesRequest()
|
||||
|
||||
ListServicesRequest::~ListServicesRequest() {}
|
||||
|
||||
string ListServicesRequest::getFilter() const {
|
||||
std::string ListServicesRequest::getFilter() const {
|
||||
return filter_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setFilter(string filter) {
|
||||
void ListServicesRequest::setFilter(const std::string &filter) {
|
||||
filter_ = filter;
|
||||
setParameter(std::string("Filter"), std::to_string(filter));
|
||||
setParameter(std::string("Filter"), filter);
|
||||
}
|
||||
|
||||
integer ListServicesRequest::getPageSize() const {
|
||||
std::string ListServicesRequest::getServiceType() const {
|
||||
return serviceType_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setServiceType(const std::string &serviceType) {
|
||||
serviceType_ = serviceType;
|
||||
setParameter(std::string("ServiceType"), serviceType);
|
||||
}
|
||||
|
||||
std::string ListServicesRequest::getParentServiceUid() const {
|
||||
return parentServiceUid_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setParentServiceUid(const std::string &parentServiceUid) {
|
||||
parentServiceUid_ = parentServiceUid;
|
||||
setParameter(std::string("ParentServiceUid"), parentServiceUid);
|
||||
}
|
||||
|
||||
int ListServicesRequest::getPageSize() const {
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setPageSize(integer pageSize) {
|
||||
void ListServicesRequest::setPageSize(int pageSize) {
|
||||
pageSize_ = pageSize;
|
||||
setParameter(std::string("PageSize"), std::to_string(pageSize));
|
||||
}
|
||||
|
||||
string ListServicesRequest::getSort() const {
|
||||
std::string ListServicesRequest::getSort() const {
|
||||
return sort_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setSort(string sort) {
|
||||
void ListServicesRequest::setSort(const std::string &sort) {
|
||||
sort_ = sort;
|
||||
setParameter(std::string("Sort"), std::to_string(sort));
|
||||
setParameter(std::string("Sort"), sort);
|
||||
}
|
||||
|
||||
integer ListServicesRequest::getPageNumber() const {
|
||||
std::string ListServicesRequest::getLabel() const {
|
||||
return label_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setLabel(const std::string &label) {
|
||||
label_ = label;
|
||||
setParameter(std::string("Label"), label);
|
||||
}
|
||||
|
||||
std::string ListServicesRequest::getGroupName() const {
|
||||
return groupName_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setGroupName(const std::string &groupName) {
|
||||
groupName_ = groupName;
|
||||
setParameter(std::string("GroupName"), groupName);
|
||||
}
|
||||
|
||||
int ListServicesRequest::getPageNumber() const {
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setPageNumber(integer pageNumber) {
|
||||
void ListServicesRequest::setPageNumber(int pageNumber) {
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter(std::string("PageNumber"), std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
string ListServicesRequest::getOrder() const {
|
||||
std::string ListServicesRequest::getOrder() const {
|
||||
return order_;
|
||||
}
|
||||
|
||||
void ListServicesRequest::setOrder(string order) {
|
||||
void ListServicesRequest::setOrder(const std::string &order) {
|
||||
order_ = order;
|
||||
setParameter(std::string("Order"), std::to_string(order));
|
||||
setParameter(std::string("Order"), order);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,10 +81,14 @@ void ListServicesResult::parse(const std::string &payload)
|
||||
servicesObject.reason = valueServicesServicesItem["Reason"].asString();
|
||||
if(!valueServicesServicesItem["Resource"].isNull())
|
||||
servicesObject.resource = valueServicesServicesItem["Resource"].asString();
|
||||
if(!valueServicesServicesItem["ResourceAlias"].isNull())
|
||||
servicesObject.resourceAlias = valueServicesServicesItem["ResourceAlias"].asString();
|
||||
if(!valueServicesServicesItem["ServiceConfig"].isNull())
|
||||
servicesObject.serviceConfig = valueServicesServicesItem["ServiceConfig"].asString();
|
||||
if(!valueServicesServicesItem["ServiceName"].isNull())
|
||||
servicesObject.serviceName = valueServicesServicesItem["ServiceName"].asString();
|
||||
if(!valueServicesServicesItem["ServiceGroup"].isNull())
|
||||
servicesObject.serviceGroup = valueServicesServicesItem["ServiceGroup"].asString();
|
||||
if(!valueServicesServicesItem["Status"].isNull())
|
||||
servicesObject.status = valueServicesServicesItem["Status"].asString();
|
||||
if(!valueServicesServicesItem["CreateTime"].isNull())
|
||||
@@ -95,10 +99,30 @@ void ListServicesResult::parse(const std::string &payload)
|
||||
servicesObject.weight = std::stoi(valueServicesServicesItem["Weight"].asString());
|
||||
if(!valueServicesServicesItem["ServiceId"].isNull())
|
||||
servicesObject.serviceId = valueServicesServicesItem["ServiceId"].asString();
|
||||
if(!valueServicesServicesItem["ServiceUid"].isNull())
|
||||
servicesObject.serviceUid = valueServicesServicesItem["ServiceUid"].asString();
|
||||
if(!valueServicesServicesItem["AccessToken"].isNull())
|
||||
servicesObject.accessToken = valueServicesServicesItem["AccessToken"].asString();
|
||||
if(!valueServicesServicesItem["Source"].isNull())
|
||||
servicesObject.source = valueServicesServicesItem["Source"].asString();
|
||||
if(!valueServicesServicesItem["ExtraData"].isNull())
|
||||
servicesObject.extraData = valueServicesServicesItem["ExtraData"].asString();
|
||||
if(!valueServicesServicesItem["Role"].isNull())
|
||||
servicesObject.role = valueServicesServicesItem["Role"].asString();
|
||||
if(!valueServicesServicesItem["RoleAttrs"].isNull())
|
||||
servicesObject.roleAttrs = valueServicesServicesItem["RoleAttrs"].asString();
|
||||
if(!valueServicesServicesItem["SafetyLock"].isNull())
|
||||
servicesObject.safetyLock = valueServicesServicesItem["SafetyLock"].asString();
|
||||
auto allLabelsNode = valueServicesServicesItem["Labels"]["LabelsItem"];
|
||||
for (auto valueServicesServicesItemLabelsLabelsItem : allLabelsNode)
|
||||
{
|
||||
ServicesItem::LabelsItem labelsObject;
|
||||
if(!valueServicesServicesItemLabelsLabelsItem["LabelKey"].isNull())
|
||||
labelsObject.labelKey = valueServicesServicesItemLabelsLabelsItem["LabelKey"].asString();
|
||||
if(!valueServicesServicesItemLabelsLabelsItem["LabelValue"].isNull())
|
||||
labelsObject.labelValue = valueServicesServicesItemLabelsLabelsItem["LabelValue"].asString();
|
||||
servicesObject.labels.push_back(labelsObject);
|
||||
}
|
||||
services_.push_back(servicesObject);
|
||||
}
|
||||
if(!value["PageNumber"].isNull())
|
||||
|
||||
@@ -26,22 +26,22 @@ ReleaseServiceRequest::ReleaseServiceRequest()
|
||||
|
||||
ReleaseServiceRequest::~ReleaseServiceRequest() {}
|
||||
|
||||
string ReleaseServiceRequest::getServiceName() const {
|
||||
std::string ReleaseServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void ReleaseServiceRequest::setServiceName(string serviceName) {
|
||||
void ReleaseServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string ReleaseServiceRequest::getClusterId() const {
|
||||
std::string ReleaseServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void ReleaseServiceRequest::setClusterId(string clusterId) {
|
||||
void ReleaseServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string ReleaseServiceRequest::getBody() const {
|
||||
|
||||
@@ -26,21 +26,21 @@ StartBenchmarkTaskRequest::StartBenchmarkTaskRequest()
|
||||
|
||||
StartBenchmarkTaskRequest::~StartBenchmarkTaskRequest() {}
|
||||
|
||||
string StartBenchmarkTaskRequest::getTaskName() const {
|
||||
std::string StartBenchmarkTaskRequest::getTaskName() const {
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
void StartBenchmarkTaskRequest::setTaskName(string taskName) {
|
||||
void StartBenchmarkTaskRequest::setTaskName(const std::string &taskName) {
|
||||
taskName_ = taskName;
|
||||
setParameter(std::string("TaskName"), std::to_string(taskName));
|
||||
setParameter(std::string("TaskName"), taskName);
|
||||
}
|
||||
|
||||
string StartBenchmarkTaskRequest::getClusterId() const {
|
||||
std::string StartBenchmarkTaskRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void StartBenchmarkTaskRequest::setClusterId(string clusterId) {
|
||||
void StartBenchmarkTaskRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ StartServiceRequest::StartServiceRequest()
|
||||
|
||||
StartServiceRequest::~StartServiceRequest() {}
|
||||
|
||||
string StartServiceRequest::getServiceName() const {
|
||||
std::string StartServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void StartServiceRequest::setServiceName(string serviceName) {
|
||||
void StartServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string StartServiceRequest::getClusterId() const {
|
||||
std::string StartServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void StartServiceRequest::setClusterId(string clusterId) {
|
||||
void StartServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ StopBenchmarkTaskRequest::StopBenchmarkTaskRequest()
|
||||
|
||||
StopBenchmarkTaskRequest::~StopBenchmarkTaskRequest() {}
|
||||
|
||||
string StopBenchmarkTaskRequest::getTaskName() const {
|
||||
std::string StopBenchmarkTaskRequest::getTaskName() const {
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
void StopBenchmarkTaskRequest::setTaskName(string taskName) {
|
||||
void StopBenchmarkTaskRequest::setTaskName(const std::string &taskName) {
|
||||
taskName_ = taskName;
|
||||
setParameter(std::string("TaskName"), std::to_string(taskName));
|
||||
setParameter(std::string("TaskName"), taskName);
|
||||
}
|
||||
|
||||
string StopBenchmarkTaskRequest::getClusterId() const {
|
||||
std::string StopBenchmarkTaskRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void StopBenchmarkTaskRequest::setClusterId(string clusterId) {
|
||||
void StopBenchmarkTaskRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,21 +26,21 @@ StopServiceRequest::StopServiceRequest()
|
||||
|
||||
StopServiceRequest::~StopServiceRequest() {}
|
||||
|
||||
string StopServiceRequest::getServiceName() const {
|
||||
std::string StopServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void StopServiceRequest::setServiceName(string serviceName) {
|
||||
void StopServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string StopServiceRequest::getClusterId() const {
|
||||
std::string StopServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void StopServiceRequest::setClusterId(string clusterId) {
|
||||
void StopServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,30 +26,30 @@ UpdateBenchmarkTaskRequest::UpdateBenchmarkTaskRequest()
|
||||
|
||||
UpdateBenchmarkTaskRequest::~UpdateBenchmarkTaskRequest() {}
|
||||
|
||||
string UpdateBenchmarkTaskRequest::getTaskName() const {
|
||||
std::string UpdateBenchmarkTaskRequest::getTaskName() const {
|
||||
return taskName_;
|
||||
}
|
||||
|
||||
void UpdateBenchmarkTaskRequest::setTaskName(string taskName) {
|
||||
void UpdateBenchmarkTaskRequest::setTaskName(const std::string &taskName) {
|
||||
taskName_ = taskName;
|
||||
setParameter(std::string("TaskName"), std::to_string(taskName));
|
||||
setParameter(std::string("TaskName"), taskName);
|
||||
}
|
||||
|
||||
string UpdateBenchmarkTaskRequest::getClusterId() const {
|
||||
std::string UpdateBenchmarkTaskRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateBenchmarkTaskRequest::setClusterId(string clusterId) {
|
||||
void UpdateBenchmarkTaskRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
string UpdateBenchmarkTaskRequest::getBody() const {
|
||||
std::string UpdateBenchmarkTaskRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void UpdateBenchmarkTaskRequest::setBody(string body) {
|
||||
void UpdateBenchmarkTaskRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), std::to_string(body));
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,22 +26,22 @@ UpdateResourceDLinkRequest::UpdateResourceDLinkRequest()
|
||||
|
||||
UpdateResourceDLinkRequest::~UpdateResourceDLinkRequest() {}
|
||||
|
||||
string UpdateResourceDLinkRequest::getResourceId() const {
|
||||
std::string UpdateResourceDLinkRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void UpdateResourceDLinkRequest::setResourceId(string resourceId) {
|
||||
void UpdateResourceDLinkRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string UpdateResourceDLinkRequest::getClusterId() const {
|
||||
std::string UpdateResourceDLinkRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateResourceDLinkRequest::setClusterId(string clusterId) {
|
||||
void UpdateResourceDLinkRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateResourceDLinkRequest::getBody() const {
|
||||
|
||||
64
eas/src/model/UpdateResourceInstanceRequest.cc
Normal file
64
eas/src/model/UpdateResourceInstanceRequest.cc
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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/eas/model/UpdateResourceInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::UpdateResourceInstanceRequest;
|
||||
|
||||
UpdateResourceInstanceRequest::UpdateResourceInstanceRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/resources/[ClusterId]/[ResourceId]/instances/[InstanceId]"};
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateResourceInstanceRequest::~UpdateResourceInstanceRequest() {}
|
||||
|
||||
std::string UpdateResourceInstanceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void UpdateResourceInstanceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
std::string UpdateResourceInstanceRequest::getInstanceId() const {
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void UpdateResourceInstanceRequest::setInstanceId(const std::string &instanceId) {
|
||||
instanceId_ = instanceId;
|
||||
setParameter(std::string("InstanceId"), instanceId);
|
||||
}
|
||||
|
||||
std::string UpdateResourceInstanceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateResourceInstanceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateResourceInstanceRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void UpdateResourceInstanceRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
58
eas/src/model/UpdateResourceInstanceResult.cc
Normal file
58
eas/src/model/UpdateResourceInstanceResult.cc
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* 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/eas/model/UpdateResourceInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
UpdateResourceInstanceResult::UpdateResourceInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateResourceInstanceResult::UpdateResourceInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateResourceInstanceResult::~UpdateResourceInstanceResult()
|
||||
{}
|
||||
|
||||
void UpdateResourceInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ResourceId"].isNull())
|
||||
resourceId_ = value["ResourceId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateResourceInstanceResult::getResourceId()const
|
||||
{
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
std::string UpdateResourceInstanceResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
@@ -26,22 +26,22 @@ UpdateResourceRequest::UpdateResourceRequest()
|
||||
|
||||
UpdateResourceRequest::~UpdateResourceRequest() {}
|
||||
|
||||
string UpdateResourceRequest::getResourceId() const {
|
||||
std::string UpdateResourceRequest::getResourceId() const {
|
||||
return resourceId_;
|
||||
}
|
||||
|
||||
void UpdateResourceRequest::setResourceId(string resourceId) {
|
||||
void UpdateResourceRequest::setResourceId(const std::string &resourceId) {
|
||||
resourceId_ = resourceId;
|
||||
setParameter(std::string("ResourceId"), std::to_string(resourceId));
|
||||
setParameter(std::string("ResourceId"), resourceId);
|
||||
}
|
||||
|
||||
string UpdateResourceRequest::getClusterId() const {
|
||||
std::string UpdateResourceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateResourceRequest::setClusterId(string clusterId) {
|
||||
void UpdateResourceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateResourceRequest::getBody() const {
|
||||
|
||||
@@ -26,22 +26,22 @@ UpdateServiceAutoScalerRequest::UpdateServiceAutoScalerRequest()
|
||||
|
||||
UpdateServiceAutoScalerRequest::~UpdateServiceAutoScalerRequest() {}
|
||||
|
||||
string UpdateServiceAutoScalerRequest::getServiceName() const {
|
||||
std::string UpdateServiceAutoScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceAutoScalerRequest::setServiceName(string serviceName) {
|
||||
void UpdateServiceAutoScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string UpdateServiceAutoScalerRequest::getClusterId() const {
|
||||
std::string UpdateServiceAutoScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceAutoScalerRequest::setClusterId(string clusterId) {
|
||||
void UpdateServiceAutoScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateServiceAutoScalerRequest::getBody() const {
|
||||
|
||||
@@ -26,22 +26,22 @@ UpdateServiceCronScalerRequest::UpdateServiceCronScalerRequest()
|
||||
|
||||
UpdateServiceCronScalerRequest::~UpdateServiceCronScalerRequest() {}
|
||||
|
||||
string UpdateServiceCronScalerRequest::getServiceName() const {
|
||||
std::string UpdateServiceCronScalerRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceCronScalerRequest::setServiceName(string serviceName) {
|
||||
void UpdateServiceCronScalerRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string UpdateServiceCronScalerRequest::getClusterId() const {
|
||||
std::string UpdateServiceCronScalerRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceCronScalerRequest::setClusterId(string clusterId) {
|
||||
void UpdateServiceCronScalerRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateServiceCronScalerRequest::getBody() const {
|
||||
|
||||
55
eas/src/model/UpdateServiceLabelRequest.cc
Normal file
55
eas/src/model/UpdateServiceLabelRequest.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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/eas/model/UpdateServiceLabelRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::UpdateServiceLabelRequest;
|
||||
|
||||
UpdateServiceLabelRequest::UpdateServiceLabelRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/label"};
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateServiceLabelRequest::~UpdateServiceLabelRequest() {}
|
||||
|
||||
std::string UpdateServiceLabelRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceLabelRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string UpdateServiceLabelRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceLabelRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateServiceLabelRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void UpdateServiceLabelRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
51
eas/src/model/UpdateServiceLabelResult.cc
Normal file
51
eas/src/model/UpdateServiceLabelResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eas/model/UpdateServiceLabelResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
UpdateServiceLabelResult::UpdateServiceLabelResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateServiceLabelResult::UpdateServiceLabelResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateServiceLabelResult::~UpdateServiceLabelResult()
|
||||
{}
|
||||
|
||||
void UpdateServiceLabelResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateServiceLabelResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
@@ -26,22 +26,22 @@ UpdateServiceMirrorRequest::UpdateServiceMirrorRequest()
|
||||
|
||||
UpdateServiceMirrorRequest::~UpdateServiceMirrorRequest() {}
|
||||
|
||||
string UpdateServiceMirrorRequest::getServiceName() const {
|
||||
std::string UpdateServiceMirrorRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceMirrorRequest::setServiceName(string serviceName) {
|
||||
void UpdateServiceMirrorRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string UpdateServiceMirrorRequest::getClusterId() const {
|
||||
std::string UpdateServiceMirrorRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceMirrorRequest::setClusterId(string clusterId) {
|
||||
void UpdateServiceMirrorRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateServiceMirrorRequest::getBody() const {
|
||||
|
||||
@@ -26,30 +26,30 @@ UpdateServiceRequest::UpdateServiceRequest()
|
||||
|
||||
UpdateServiceRequest::~UpdateServiceRequest() {}
|
||||
|
||||
string UpdateServiceRequest::getServiceName() const {
|
||||
std::string UpdateServiceRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceRequest::setServiceName(string serviceName) {
|
||||
void UpdateServiceRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string UpdateServiceRequest::getClusterId() const {
|
||||
std::string UpdateServiceRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceRequest::setClusterId(string clusterId) {
|
||||
void UpdateServiceRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
string UpdateServiceRequest::getBody() const {
|
||||
std::string UpdateServiceRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void UpdateServiceRequest::setBody(string body) {
|
||||
void UpdateServiceRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), std::to_string(body));
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
|
||||
55
eas/src/model/UpdateServiceSafetyLockRequest.cc
Normal file
55
eas/src/model/UpdateServiceSafetyLockRequest.cc
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* 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/eas/model/UpdateServiceSafetyLockRequest.h>
|
||||
|
||||
using AlibabaCloud::Eas::Model::UpdateServiceSafetyLockRequest;
|
||||
|
||||
UpdateServiceSafetyLockRequest::UpdateServiceSafetyLockRequest()
|
||||
: RoaServiceRequest("eas", "2021-07-01") {
|
||||
setResourcePath("/api/v2/services/[ClusterId]/[ServiceName]/lock"};
|
||||
setMethod(HttpRequest::Method::Put);
|
||||
}
|
||||
|
||||
UpdateServiceSafetyLockRequest::~UpdateServiceSafetyLockRequest() {}
|
||||
|
||||
std::string UpdateServiceSafetyLockRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceSafetyLockRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
std::string UpdateServiceSafetyLockRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceSafetyLockRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateServiceSafetyLockRequest::getBody() const {
|
||||
return body_;
|
||||
}
|
||||
|
||||
void UpdateServiceSafetyLockRequest::setBody(const std::string &body) {
|
||||
body_ = body;
|
||||
setBodyParameter(std::string("body"), body);
|
||||
}
|
||||
|
||||
51
eas/src/model/UpdateServiceSafetyLockResult.cc
Normal file
51
eas/src/model/UpdateServiceSafetyLockResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/eas/model/UpdateServiceSafetyLockResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Eas;
|
||||
using namespace AlibabaCloud::Eas::Model;
|
||||
|
||||
UpdateServiceSafetyLockResult::UpdateServiceSafetyLockResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateServiceSafetyLockResult::UpdateServiceSafetyLockResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateServiceSafetyLockResult::~UpdateServiceSafetyLockResult()
|
||||
{}
|
||||
|
||||
void UpdateServiceSafetyLockResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpdateServiceSafetyLockResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
@@ -26,22 +26,22 @@ UpdateServiceVersionRequest::UpdateServiceVersionRequest()
|
||||
|
||||
UpdateServiceVersionRequest::~UpdateServiceVersionRequest() {}
|
||||
|
||||
string UpdateServiceVersionRequest::getServiceName() const {
|
||||
std::string UpdateServiceVersionRequest::getServiceName() const {
|
||||
return serviceName_;
|
||||
}
|
||||
|
||||
void UpdateServiceVersionRequest::setServiceName(string serviceName) {
|
||||
void UpdateServiceVersionRequest::setServiceName(const std::string &serviceName) {
|
||||
serviceName_ = serviceName;
|
||||
setParameter(std::string("ServiceName"), std::to_string(serviceName));
|
||||
setParameter(std::string("ServiceName"), serviceName);
|
||||
}
|
||||
|
||||
string UpdateServiceVersionRequest::getClusterId() const {
|
||||
std::string UpdateServiceVersionRequest::getClusterId() const {
|
||||
return clusterId_;
|
||||
}
|
||||
|
||||
void UpdateServiceVersionRequest::setClusterId(string clusterId) {
|
||||
void UpdateServiceVersionRequest::setClusterId(const std::string &clusterId) {
|
||||
clusterId_ = clusterId;
|
||||
setParameter(std::string("ClusterId"), std::to_string(clusterId));
|
||||
setParameter(std::string("ClusterId"), clusterId);
|
||||
}
|
||||
|
||||
std::string UpdateServiceVersionRequest::getBody() const {
|
||||
|
||||
Reference in New Issue
Block a user