diff --git a/CHANGELOG b/CHANGELOG index 9bfa580e7..616e87dfe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2020-10-12 Version: patch +- Add list Organizations. + 2020-10-12 Version: patch - Init. diff --git a/devops-rdc/CMakeLists.txt b/devops-rdc/CMakeLists.txt index cb2806098..5253d921f 100644 --- a/devops-rdc/CMakeLists.txt +++ b/devops-rdc/CMakeLists.txt @@ -97,6 +97,8 @@ set(devops-rdc_public_header_model include/alibabacloud/devops-rdc/model/ListPipelinesResult.h include/alibabacloud/devops-rdc/model/ListServiceConnectionsRequest.h include/alibabacloud/devops-rdc/model/ListServiceConnectionsResult.h + include/alibabacloud/devops-rdc/model/ListUserOrganizationRequest.h + include/alibabacloud/devops-rdc/model/ListUserOrganizationResult.h include/alibabacloud/devops-rdc/model/UpdateDevopsProjectRequest.h include/alibabacloud/devops-rdc/model/UpdateDevopsProjectResult.h include/alibabacloud/devops-rdc/model/UpdateDevopsProjectSprintRequest.h @@ -182,6 +184,8 @@ set(devops-rdc_src src/model/ListPipelinesResult.cc src/model/ListServiceConnectionsRequest.cc src/model/ListServiceConnectionsResult.cc + src/model/ListUserOrganizationRequest.cc + src/model/ListUserOrganizationResult.cc src/model/UpdateDevopsProjectRequest.cc src/model/UpdateDevopsProjectResult.cc src/model/UpdateDevopsProjectSprintRequest.cc diff --git a/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h b/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h index bccd4f39e..f4c130df9 100644 --- a/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h +++ b/devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h @@ -98,6 +98,8 @@ #include "model/ListPipelinesResult.h" #include "model/ListServiceConnectionsRequest.h" #include "model/ListServiceConnectionsResult.h" +#include "model/ListUserOrganizationRequest.h" +#include "model/ListUserOrganizationResult.h" #include "model/UpdateDevopsProjectRequest.h" #include "model/UpdateDevopsProjectResult.h" #include "model/UpdateDevopsProjectSprintRequest.h" @@ -227,6 +229,9 @@ namespace AlibabaCloud typedef Outcome ListServiceConnectionsOutcome; typedef std::future ListServiceConnectionsOutcomeCallable; typedef std::function&)> ListServiceConnectionsAsyncHandler; + typedef Outcome ListUserOrganizationOutcome; + typedef std::future ListUserOrganizationOutcomeCallable; + typedef std::function&)> ListUserOrganizationAsyncHandler; typedef Outcome UpdateDevopsProjectOutcome; typedef std::future UpdateDevopsProjectOutcomeCallable; typedef std::function&)> UpdateDevopsProjectAsyncHandler; @@ -355,6 +360,9 @@ namespace AlibabaCloud ListServiceConnectionsOutcome listServiceConnections(const Model::ListServiceConnectionsRequest &request)const; void listServiceConnectionsAsync(const Model::ListServiceConnectionsRequest& request, const ListServiceConnectionsAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListServiceConnectionsOutcomeCallable listServiceConnectionsCallable(const Model::ListServiceConnectionsRequest& request) const; + ListUserOrganizationOutcome listUserOrganization(const Model::ListUserOrganizationRequest &request)const; + void listUserOrganizationAsync(const Model::ListUserOrganizationRequest& request, const ListUserOrganizationAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + ListUserOrganizationOutcomeCallable listUserOrganizationCallable(const Model::ListUserOrganizationRequest& request) const; UpdateDevopsProjectOutcome updateDevopsProject(const Model::UpdateDevopsProjectRequest &request)const; void updateDevopsProjectAsync(const Model::UpdateDevopsProjectRequest& request, const UpdateDevopsProjectAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; UpdateDevopsProjectOutcomeCallable updateDevopsProjectCallable(const Model::UpdateDevopsProjectRequest& request) const; diff --git a/devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationRequest.h b/devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationRequest.h new file mode 100644 index 000000000..c0aa630ff --- /dev/null +++ b/devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationRequest.h @@ -0,0 +1,48 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTUSERORGANIZATIONREQUEST_H_ +#define ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTUSERORGANIZATIONREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Devops_rdc + { + namespace Model + { + class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListUserOrganizationRequest : public RpcServiceRequest + { + + public: + ListUserOrganizationRequest(); + ~ListUserOrganizationRequest(); + + std::string getRealPk()const; + void setRealPk(const std::string& realPk); + + private: + std::string realPk_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTUSERORGANIZATIONREQUEST_H_ \ No newline at end of file diff --git a/devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationResult.h b/devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationResult.h new file mode 100644 index 000000000..e9f9285c8 --- /dev/null +++ b/devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationResult.h @@ -0,0 +1,57 @@ +/* + * 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. + */ + +#ifndef ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTUSERORGANIZATIONRESULT_H_ +#define ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTUSERORGANIZATIONRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Devops_rdc + { + namespace Model + { + class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListUserOrganizationResult : public ServiceResult + { + public: + + + ListUserOrganizationResult(); + explicit ListUserOrganizationResult(const std::string &payload); + ~ListUserOrganizationResult(); + std::string getObject()const; + std::string getErrorCode()const; + std::string getErrorMessage()const; + bool getSuccess()const; + + protected: + void parse(const std::string &payload); + private: + std::string object_; + std::string errorCode_; + std::string errorMessage_; + bool success_; + + }; + } + } +} +#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTUSERORGANIZATIONRESULT_H_ \ No newline at end of file diff --git a/devops-rdc/src/Devops-rdcClient.cc b/devops-rdc/src/Devops-rdcClient.cc index 0445e3a69..35db174cf 100644 --- a/devops-rdc/src/Devops-rdcClient.cc +++ b/devops-rdc/src/Devops-rdcClient.cc @@ -1419,6 +1419,42 @@ Devops_rdcClient::ListServiceConnectionsOutcomeCallable Devops_rdcClient::listSe return task->get_future(); } +Devops_rdcClient::ListUserOrganizationOutcome Devops_rdcClient::listUserOrganization(const ListUserOrganizationRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return ListUserOrganizationOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return ListUserOrganizationOutcome(ListUserOrganizationResult(outcome.result())); + else + return ListUserOrganizationOutcome(outcome.error()); +} + +void Devops_rdcClient::listUserOrganizationAsync(const ListUserOrganizationRequest& request, const ListUserOrganizationAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, listUserOrganization(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +Devops_rdcClient::ListUserOrganizationOutcomeCallable Devops_rdcClient::listUserOrganizationCallable(const ListUserOrganizationRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->listUserOrganization(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + Devops_rdcClient::UpdateDevopsProjectOutcome Devops_rdcClient::updateDevopsProject(const UpdateDevopsProjectRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/devops-rdc/src/model/ListUserOrganizationRequest.cc b/devops-rdc/src/model/ListUserOrganizationRequest.cc new file mode 100644 index 000000000..27ddbb7cf --- /dev/null +++ b/devops-rdc/src/model/ListUserOrganizationRequest.cc @@ -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 + +using AlibabaCloud::Devops_rdc::Model::ListUserOrganizationRequest; + +ListUserOrganizationRequest::ListUserOrganizationRequest() : + RpcServiceRequest("devops-rdc", "2020-03-03", "ListUserOrganization") +{ + setMethod(HttpRequest::Method::Post); +} + +ListUserOrganizationRequest::~ListUserOrganizationRequest() +{} + +std::string ListUserOrganizationRequest::getRealPk()const +{ + return realPk_; +} + +void ListUserOrganizationRequest::setRealPk(const std::string& realPk) +{ + realPk_ = realPk; + setBodyParameter("RealPk", realPk); +} + diff --git a/devops-rdc/src/model/ListUserOrganizationResult.cc b/devops-rdc/src/model/ListUserOrganizationResult.cc new file mode 100644 index 000000000..4f1fa358c --- /dev/null +++ b/devops-rdc/src/model/ListUserOrganizationResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Devops_rdc; +using namespace AlibabaCloud::Devops_rdc::Model; + +ListUserOrganizationResult::ListUserOrganizationResult() : + ServiceResult() +{} + +ListUserOrganizationResult::ListUserOrganizationResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +ListUserOrganizationResult::~ListUserOrganizationResult() +{} + +void ListUserOrganizationResult::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 ListUserOrganizationResult::getObject()const +{ + return object_; +} + +std::string ListUserOrganizationResult::getErrorCode()const +{ + return errorCode_; +} + +std::string ListUserOrganizationResult::getErrorMessage()const +{ + return errorMessage_; +} + +bool ListUserOrganizationResult::getSuccess()const +{ + return success_; +} +