Supported more language for resourcemanager.
This commit is contained in:
@@ -303,6 +303,42 @@ ResourceManagerClient::CancelPromoteResourceAccountOutcomeCallable ResourceManag
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::CheckAccountDeleteOutcome ResourceManagerClient::checkAccountDelete(const CheckAccountDeleteRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CheckAccountDeleteOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CheckAccountDeleteOutcome(CheckAccountDeleteResult(outcome.result()));
|
||||
else
|
||||
return CheckAccountDeleteOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ResourceManagerClient::checkAccountDeleteAsync(const CheckAccountDeleteRequest& request, const CheckAccountDeleteAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, checkAccountDelete(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ResourceManagerClient::CheckAccountDeleteOutcomeCallable ResourceManagerClient::checkAccountDeleteCallable(const CheckAccountDeleteRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CheckAccountDeleteOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->checkAccountDelete(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::CreateCloudAccountOutcome ResourceManagerClient::createCloudAccount(const CreateCloudAccountRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -663,6 +699,42 @@ ResourceManagerClient::DeclineHandshakeOutcomeCallable ResourceManagerClient::de
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::DeleteAccountOutcome ResourceManagerClient::deleteAccount(const DeleteAccountRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteAccountOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteAccountOutcome(DeleteAccountResult(outcome.result()));
|
||||
else
|
||||
return DeleteAccountOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ResourceManagerClient::deleteAccountAsync(const DeleteAccountRequest& request, const DeleteAccountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteAccount(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ResourceManagerClient::DeleteAccountOutcomeCallable ResourceManagerClient::deleteAccountCallable(const DeleteAccountRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteAccountOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteAccount(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::DeleteControlPolicyOutcome ResourceManagerClient::deleteControlPolicy(const DeleteControlPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1203,6 +1275,78 @@ ResourceManagerClient::GetAccountOutcomeCallable ResourceManagerClient::getAccou
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::GetAccountDeletionCheckResultOutcome ResourceManagerClient::getAccountDeletionCheckResult(const GetAccountDeletionCheckResultRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAccountDeletionCheckResultOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAccountDeletionCheckResultOutcome(GetAccountDeletionCheckResultResult(outcome.result()));
|
||||
else
|
||||
return GetAccountDeletionCheckResultOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ResourceManagerClient::getAccountDeletionCheckResultAsync(const GetAccountDeletionCheckResultRequest& request, const GetAccountDeletionCheckResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAccountDeletionCheckResult(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ResourceManagerClient::GetAccountDeletionCheckResultOutcomeCallable ResourceManagerClient::getAccountDeletionCheckResultCallable(const GetAccountDeletionCheckResultRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAccountDeletionCheckResultOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAccountDeletionCheckResult(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::GetAccountDeletionStatusOutcome ResourceManagerClient::getAccountDeletionStatus(const GetAccountDeletionStatusRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAccountDeletionStatusOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAccountDeletionStatusOutcome(GetAccountDeletionStatusResult(outcome.result()));
|
||||
else
|
||||
return GetAccountDeletionStatusOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ResourceManagerClient::getAccountDeletionStatusAsync(const GetAccountDeletionStatusRequest& request, const GetAccountDeletionStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAccountDeletionStatus(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ResourceManagerClient::GetAccountDeletionStatusOutcomeCallable ResourceManagerClient::getAccountDeletionStatusCallable(const GetAccountDeletionStatusRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAccountDeletionStatusOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAccountDeletionStatus(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ResourceManagerClient::GetControlPolicyOutcome ResourceManagerClient::getControlPolicy(const GetControlPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
36
resourcemanager/src/model/CheckAccountDeleteRequest.cc
Normal file
36
resourcemanager/src/model/CheckAccountDeleteRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/resourcemanager/model/CheckAccountDeleteRequest.h>
|
||||
|
||||
using AlibabaCloud::ResourceManager::Model::CheckAccountDeleteRequest;
|
||||
|
||||
CheckAccountDeleteRequest::CheckAccountDeleteRequest()
|
||||
: RpcServiceRequest("resourcemanager", "2020-03-31", "CheckAccountDelete") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CheckAccountDeleteRequest::~CheckAccountDeleteRequest() {}
|
||||
|
||||
std::string CheckAccountDeleteRequest::getAccountId() const {
|
||||
return accountId_;
|
||||
}
|
||||
|
||||
void CheckAccountDeleteRequest::setAccountId(const std::string &accountId) {
|
||||
accountId_ = accountId;
|
||||
setParameter(std::string("AccountId"), accountId);
|
||||
}
|
||||
|
||||
44
resourcemanager/src/model/CheckAccountDeleteResult.cc
Normal file
44
resourcemanager/src/model/CheckAccountDeleteResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/resourcemanager/model/CheckAccountDeleteResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ResourceManager;
|
||||
using namespace AlibabaCloud::ResourceManager::Model;
|
||||
|
||||
CheckAccountDeleteResult::CheckAccountDeleteResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CheckAccountDeleteResult::CheckAccountDeleteResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CheckAccountDeleteResult::~CheckAccountDeleteResult()
|
||||
{}
|
||||
|
||||
void CheckAccountDeleteResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
47
resourcemanager/src/model/DeleteAccountRequest.cc
Normal file
47
resourcemanager/src/model/DeleteAccountRequest.cc
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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/resourcemanager/model/DeleteAccountRequest.h>
|
||||
|
||||
using AlibabaCloud::ResourceManager::Model::DeleteAccountRequest;
|
||||
|
||||
DeleteAccountRequest::DeleteAccountRequest()
|
||||
: RpcServiceRequest("resourcemanager", "2020-03-31", "DeleteAccount") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteAccountRequest::~DeleteAccountRequest() {}
|
||||
|
||||
std::vector<DeleteAccountRequest::std::string> DeleteAccountRequest::getAbandonableCheckId() const {
|
||||
return abandonableCheckId_;
|
||||
}
|
||||
|
||||
void DeleteAccountRequest::setAbandonableCheckId(const std::vector<DeleteAccountRequest::std::string> &abandonableCheckId) {
|
||||
abandonableCheckId_ = abandonableCheckId;
|
||||
for(int dep1 = 0; dep1 != abandonableCheckId.size(); dep1++) {
|
||||
setParameter(std::string("AbandonableCheckId") + "." + std::to_string(dep1 + 1), abandonableCheckId[dep1]);
|
||||
}
|
||||
}
|
||||
|
||||
std::string DeleteAccountRequest::getAccountId() const {
|
||||
return accountId_;
|
||||
}
|
||||
|
||||
void DeleteAccountRequest::setAccountId(const std::string &accountId) {
|
||||
accountId_ = accountId;
|
||||
setParameter(std::string("AccountId"), accountId);
|
||||
}
|
||||
|
||||
51
resourcemanager/src/model/DeleteAccountResult.cc
Normal file
51
resourcemanager/src/model/DeleteAccountResult.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/resourcemanager/model/DeleteAccountResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ResourceManager;
|
||||
using namespace AlibabaCloud::ResourceManager::Model;
|
||||
|
||||
DeleteAccountResult::DeleteAccountResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteAccountResult::DeleteAccountResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteAccountResult::~DeleteAccountResult()
|
||||
{}
|
||||
|
||||
void DeleteAccountResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DeletionType"].isNull())
|
||||
deletionType_ = value["DeletionType"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteAccountResult::getDeletionType()const
|
||||
{
|
||||
return deletionType_;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/resourcemanager/model/GetAccountDeletionCheckResultRequest.h>
|
||||
|
||||
using AlibabaCloud::ResourceManager::Model::GetAccountDeletionCheckResultRequest;
|
||||
|
||||
GetAccountDeletionCheckResultRequest::GetAccountDeletionCheckResultRequest()
|
||||
: RpcServiceRequest("resourcemanager", "2020-03-31", "GetAccountDeletionCheckResult") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAccountDeletionCheckResultRequest::~GetAccountDeletionCheckResultRequest() {}
|
||||
|
||||
std::string GetAccountDeletionCheckResultRequest::getAccountId() const {
|
||||
return accountId_;
|
||||
}
|
||||
|
||||
void GetAccountDeletionCheckResultRequest::setAccountId(const std::string &accountId) {
|
||||
accountId_ = accountId;
|
||||
setParameter(std::string("AccountId"), accountId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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/resourcemanager/model/GetAccountDeletionCheckResultResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ResourceManager;
|
||||
using namespace AlibabaCloud::ResourceManager::Model;
|
||||
|
||||
GetAccountDeletionCheckResultResult::GetAccountDeletionCheckResultResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAccountDeletionCheckResultResult::GetAccountDeletionCheckResultResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAccountDeletionCheckResultResult::~GetAccountDeletionCheckResultResult()
|
||||
{}
|
||||
|
||||
void GetAccountDeletionCheckResultResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto accountDeletionCheckResultInfoNode = value["AccountDeletionCheckResultInfo"];
|
||||
if(!accountDeletionCheckResultInfoNode["Status"].isNull())
|
||||
accountDeletionCheckResultInfo_.status = accountDeletionCheckResultInfoNode["Status"].asString();
|
||||
if(!accountDeletionCheckResultInfoNode["AllowDelete"].isNull())
|
||||
accountDeletionCheckResultInfo_.allowDelete = accountDeletionCheckResultInfoNode["AllowDelete"].asString();
|
||||
auto allNotAllowReasonNode = accountDeletionCheckResultInfoNode["NotAllowReason"]["reason"];
|
||||
for (auto accountDeletionCheckResultInfoNodeNotAllowReasonreason : allNotAllowReasonNode)
|
||||
{
|
||||
AccountDeletionCheckResultInfo::Reason reasonObject;
|
||||
if(!accountDeletionCheckResultInfoNodeNotAllowReasonreason["Description"].isNull())
|
||||
reasonObject.description = accountDeletionCheckResultInfoNodeNotAllowReasonreason["Description"].asString();
|
||||
if(!accountDeletionCheckResultInfoNodeNotAllowReasonreason["CheckId"].isNull())
|
||||
reasonObject.checkId = accountDeletionCheckResultInfoNodeNotAllowReasonreason["CheckId"].asString();
|
||||
if(!accountDeletionCheckResultInfoNodeNotAllowReasonreason["CheckName"].isNull())
|
||||
reasonObject.checkName = accountDeletionCheckResultInfoNodeNotAllowReasonreason["CheckName"].asString();
|
||||
accountDeletionCheckResultInfo_.notAllowReason.push_back(reasonObject);
|
||||
}
|
||||
auto allAbandonableChecksNode = accountDeletionCheckResultInfoNode["AbandonableChecks"]["check"];
|
||||
for (auto accountDeletionCheckResultInfoNodeAbandonableCheckscheck : allAbandonableChecksNode)
|
||||
{
|
||||
AccountDeletionCheckResultInfo::Check checkObject;
|
||||
if(!accountDeletionCheckResultInfoNodeAbandonableCheckscheck["Description"].isNull())
|
||||
checkObject.description = accountDeletionCheckResultInfoNodeAbandonableCheckscheck["Description"].asString();
|
||||
if(!accountDeletionCheckResultInfoNodeAbandonableCheckscheck["CheckId"].isNull())
|
||||
checkObject.checkId = accountDeletionCheckResultInfoNodeAbandonableCheckscheck["CheckId"].asString();
|
||||
if(!accountDeletionCheckResultInfoNodeAbandonableCheckscheck["CheckName"].isNull())
|
||||
checkObject.checkName = accountDeletionCheckResultInfoNodeAbandonableCheckscheck["CheckName"].asString();
|
||||
accountDeletionCheckResultInfo_.abandonableChecks.push_back(checkObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAccountDeletionCheckResultResult::AccountDeletionCheckResultInfo GetAccountDeletionCheckResultResult::getAccountDeletionCheckResultInfo()const
|
||||
{
|
||||
return accountDeletionCheckResultInfo_;
|
||||
}
|
||||
|
||||
36
resourcemanager/src/model/GetAccountDeletionStatusRequest.cc
Normal file
36
resourcemanager/src/model/GetAccountDeletionStatusRequest.cc
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/resourcemanager/model/GetAccountDeletionStatusRequest.h>
|
||||
|
||||
using AlibabaCloud::ResourceManager::Model::GetAccountDeletionStatusRequest;
|
||||
|
||||
GetAccountDeletionStatusRequest::GetAccountDeletionStatusRequest()
|
||||
: RpcServiceRequest("resourcemanager", "2020-03-31", "GetAccountDeletionStatus") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetAccountDeletionStatusRequest::~GetAccountDeletionStatusRequest() {}
|
||||
|
||||
std::string GetAccountDeletionStatusRequest::getAccountId() const {
|
||||
return accountId_;
|
||||
}
|
||||
|
||||
void GetAccountDeletionStatusRequest::setAccountId(const std::string &accountId) {
|
||||
accountId_ = accountId;
|
||||
setParameter(std::string("AccountId"), accountId);
|
||||
}
|
||||
|
||||
70
resourcemanager/src/model/GetAccountDeletionStatusResult.cc
Normal file
70
resourcemanager/src/model/GetAccountDeletionStatusResult.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/resourcemanager/model/GetAccountDeletionStatusResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::ResourceManager;
|
||||
using namespace AlibabaCloud::ResourceManager::Model;
|
||||
|
||||
GetAccountDeletionStatusResult::GetAccountDeletionStatusResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAccountDeletionStatusResult::GetAccountDeletionStatusResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAccountDeletionStatusResult::~GetAccountDeletionStatusResult()
|
||||
{}
|
||||
|
||||
void GetAccountDeletionStatusResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto rdAccountDeletionStatusNode = value["RdAccountDeletionStatus"];
|
||||
if(!rdAccountDeletionStatusNode["Status"].isNull())
|
||||
rdAccountDeletionStatus_.status = rdAccountDeletionStatusNode["Status"].asString();
|
||||
if(!rdAccountDeletionStatusNode["AccountId"].isNull())
|
||||
rdAccountDeletionStatus_.accountId = rdAccountDeletionStatusNode["AccountId"].asString();
|
||||
if(!rdAccountDeletionStatusNode["CreateTime"].isNull())
|
||||
rdAccountDeletionStatus_.createTime = rdAccountDeletionStatusNode["CreateTime"].asString();
|
||||
if(!rdAccountDeletionStatusNode["DeletionTime"].isNull())
|
||||
rdAccountDeletionStatus_.deletionTime = rdAccountDeletionStatusNode["DeletionTime"].asString();
|
||||
if(!rdAccountDeletionStatusNode["DeletionType"].isNull())
|
||||
rdAccountDeletionStatus_.deletionType = rdAccountDeletionStatusNode["DeletionType"].asString();
|
||||
auto allFailReasonListNode = rdAccountDeletionStatusNode["FailReasonList"]["failReasonListItem"];
|
||||
for (auto rdAccountDeletionStatusNodeFailReasonListfailReasonListItem : allFailReasonListNode)
|
||||
{
|
||||
RdAccountDeletionStatus::FailReasonListItem failReasonListItemObject;
|
||||
if(!rdAccountDeletionStatusNodeFailReasonListfailReasonListItem["Name"].isNull())
|
||||
failReasonListItemObject.name = rdAccountDeletionStatusNodeFailReasonListfailReasonListItem["Name"].asString();
|
||||
if(!rdAccountDeletionStatusNodeFailReasonListfailReasonListItem["Description"].isNull())
|
||||
failReasonListItemObject.description = rdAccountDeletionStatusNodeFailReasonListfailReasonListItem["Description"].asString();
|
||||
rdAccountDeletionStatus_.failReasonList.push_back(failReasonListItemObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GetAccountDeletionStatusResult::RdAccountDeletionStatus GetAccountDeletionStatusResult::getRdAccountDeletionStatus()const
|
||||
{
|
||||
return rdAccountDeletionStatus_;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ void ListDelegatedServicesForAccountResult::parse(const std::string &payload)
|
||||
delegatedServicesObject.delegationEnabledTime = valueDelegatedServicesDelegatedService["DelegationEnabledTime"].asString();
|
||||
if(!valueDelegatedServicesDelegatedService["ServicePrincipal"].isNull())
|
||||
delegatedServicesObject.servicePrincipal = valueDelegatedServicesDelegatedService["ServicePrincipal"].asString();
|
||||
if(!valueDelegatedServicesDelegatedService["Status"].isNull())
|
||||
delegatedServicesObject.status = valueDelegatedServicesDelegatedService["Status"].asString();
|
||||
delegatedServices_.push_back(delegatedServicesObject);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user