Support devops organization deletion.
This commit is contained in:
@@ -483,6 +483,42 @@ Devops_rdcClient::DeleteCommonGroupOutcomeCallable Devops_rdcClient::deleteCommo
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::DeleteDevopsOrganizationOutcome Devops_rdcClient::deleteDevopsOrganization(const DeleteDevopsOrganizationRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteDevopsOrganizationOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteDevopsOrganizationOutcome(DeleteDevopsOrganizationResult(outcome.result()));
|
||||
else
|
||||
return DeleteDevopsOrganizationOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::deleteDevopsOrganizationAsync(const DeleteDevopsOrganizationRequest& request, const DeleteDevopsOrganizationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteDevopsOrganization(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::DeleteDevopsOrganizationOutcomeCallable Devops_rdcClient::deleteDevopsOrganizationCallable(const DeleteDevopsOrganizationRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteDevopsOrganizationOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteDevopsOrganization(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::DeleteDevopsOrganizationMembersOutcome Devops_rdcClient::deleteDevopsOrganizationMembers(const DeleteDevopsOrganizationMembersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
40
devops-rdc/src/model/DeleteDevopsOrganizationRequest.cc
Normal file
40
devops-rdc/src/model/DeleteDevopsOrganizationRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/DeleteDevopsOrganizationRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::DeleteDevopsOrganizationRequest;
|
||||
|
||||
DeleteDevopsOrganizationRequest::DeleteDevopsOrganizationRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "DeleteDevopsOrganization")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DeleteDevopsOrganizationRequest::~DeleteDevopsOrganizationRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteDevopsOrganizationRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void DeleteDevopsOrganizationRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
72
devops-rdc/src/model/DeleteDevopsOrganizationResult.cc
Normal file
72
devops-rdc/src/model/DeleteDevopsOrganizationResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/devops-rdc/model/DeleteDevopsOrganizationResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
DeleteDevopsOrganizationResult::DeleteDevopsOrganizationResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteDevopsOrganizationResult::DeleteDevopsOrganizationResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteDevopsOrganizationResult::~DeleteDevopsOrganizationResult()
|
||||
{}
|
||||
|
||||
void DeleteDevopsOrganizationResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Object"].isNull())
|
||||
object_ = value["Object"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteDevopsOrganizationResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string DeleteDevopsOrganizationResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string DeleteDevopsOrganizationResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool DeleteDevopsOrganizationResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user