sdk-team 5 vuotta sitten
vanhempi
sitoutus
6ff5b2e255

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2021-01-21 Version: patch
+- Add.
+
 2021-01-21 Version: patch
 - Supported RunInstances specifiy Dedicated Host Cluster Id.
 

+ 4 - 0
devops-rdc/CMakeLists.txt

@@ -69,6 +69,8 @@ set(devops-rdc_public_header_model
 	include/alibabacloud/devops-rdc/model/GetDevopsProjectSprintInfoResult.h
 	include/alibabacloud/devops-rdc/model/GetDevopsProjectTaskInfoRequest.h
 	include/alibabacloud/devops-rdc/model/GetDevopsProjectTaskInfoResult.h
+	include/alibabacloud/devops-rdc/model/GetLastWorkspaceRequest.h
+	include/alibabacloud/devops-rdc/model/GetLastWorkspaceResult.h
 	include/alibabacloud/devops-rdc/model/GetPipelineInstHistoryRequest.h
 	include/alibabacloud/devops-rdc/model/GetPipelineInstHistoryResult.h
 	include/alibabacloud/devops-rdc/model/GetPipelineInstanceBuildNumberStatusRequest.h
@@ -194,6 +196,8 @@ set(devops-rdc_src
 	src/model/GetDevopsProjectSprintInfoResult.cc
 	src/model/GetDevopsProjectTaskInfoRequest.cc
 	src/model/GetDevopsProjectTaskInfoResult.cc
+	src/model/GetLastWorkspaceRequest.cc
+	src/model/GetLastWorkspaceResult.cc
 	src/model/GetPipelineInstHistoryRequest.cc
 	src/model/GetPipelineInstHistoryResult.cc
 	src/model/GetPipelineInstanceBuildNumberStatusRequest.cc

+ 8 - 0
devops-rdc/include/alibabacloud/devops-rdc/Devops_rdcClient.h

@@ -70,6 +70,8 @@
 #include "model/GetDevopsProjectSprintInfoResult.h"
 #include "model/GetDevopsProjectTaskInfoRequest.h"
 #include "model/GetDevopsProjectTaskInfoResult.h"
+#include "model/GetLastWorkspaceRequest.h"
+#include "model/GetLastWorkspaceResult.h"
 #include "model/GetPipelineInstHistoryRequest.h"
 #include "model/GetPipelineInstHistoryResult.h"
 #include "model/GetPipelineInstanceBuildNumberStatusRequest.h"
@@ -225,6 +227,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::GetDevopsProjectTaskInfoResult> GetDevopsProjectTaskInfoOutcome;
 			typedef std::future<GetDevopsProjectTaskInfoOutcome> GetDevopsProjectTaskInfoOutcomeCallable;
 			typedef std::function<void(const Devops_rdcClient*, const Model::GetDevopsProjectTaskInfoRequest&, const GetDevopsProjectTaskInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDevopsProjectTaskInfoAsyncHandler;
+			typedef Outcome<Error, Model::GetLastWorkspaceResult> GetLastWorkspaceOutcome;
+			typedef std::future<GetLastWorkspaceOutcome> GetLastWorkspaceOutcomeCallable;
+			typedef std::function<void(const Devops_rdcClient*, const Model::GetLastWorkspaceRequest&, const GetLastWorkspaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetLastWorkspaceAsyncHandler;
 			typedef Outcome<Error, Model::GetPipelineInstHistoryResult> GetPipelineInstHistoryOutcome;
 			typedef std::future<GetPipelineInstHistoryOutcome> GetPipelineInstHistoryOutcomeCallable;
 			typedef std::function<void(const Devops_rdcClient*, const Model::GetPipelineInstHistoryRequest&, const GetPipelineInstHistoryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPipelineInstHistoryAsyncHandler;
@@ -413,6 +418,9 @@ namespace AlibabaCloud
 			GetDevopsProjectTaskInfoOutcome getDevopsProjectTaskInfo(const Model::GetDevopsProjectTaskInfoRequest &request)const;
 			void getDevopsProjectTaskInfoAsync(const Model::GetDevopsProjectTaskInfoRequest& request, const GetDevopsProjectTaskInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			GetDevopsProjectTaskInfoOutcomeCallable getDevopsProjectTaskInfoCallable(const Model::GetDevopsProjectTaskInfoRequest& request) const;
+			GetLastWorkspaceOutcome getLastWorkspace(const Model::GetLastWorkspaceRequest &request)const;
+			void getLastWorkspaceAsync(const Model::GetLastWorkspaceRequest& request, const GetLastWorkspaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			GetLastWorkspaceOutcomeCallable getLastWorkspaceCallable(const Model::GetLastWorkspaceRequest& request) const;
 			GetPipelineInstHistoryOutcome getPipelineInstHistory(const Model::GetPipelineInstHistoryRequest &request)const;
 			void getPipelineInstHistoryAsync(const Model::GetPipelineInstHistoryRequest& request, const GetPipelineInstHistoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			GetPipelineInstHistoryOutcomeCallable getPipelineInstHistoryCallable(const Model::GetPipelineInstHistoryRequest& request) const;

+ 51 - 0
devops-rdc/include/alibabacloud/devops-rdc/model/GetLastWorkspaceRequest.h

@@ -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.
+ */
+
+#ifndef ALIBABACLOUD_DEVOPS_RDC_MODEL_GETLASTWORKSPACEREQUEST_H_
+#define ALIBABACLOUD_DEVOPS_RDC_MODEL_GETLASTWORKSPACEREQUEST_H_
+
+#include <string>
+#include <vector>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <alibabacloud/devops-rdc/Devops_rdcExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Devops_rdc
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_DEVOPS_RDC_EXPORT GetLastWorkspaceRequest : public RpcServiceRequest
+			{
+
+			public:
+				GetLastWorkspaceRequest();
+				~GetLastWorkspaceRequest();
+
+				std::string getRealPk()const;
+				void setRealPk(const std::string& realPk);
+				std::string getOrgId()const;
+				void setOrgId(const std::string& orgId);
+
+            private:
+				std::string realPk_;
+				std::string orgId_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_GETLASTWORKSPACEREQUEST_H_

+ 57 - 0
devops-rdc/include/alibabacloud/devops-rdc/model/GetLastWorkspaceResult.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_GETLASTWORKSPACERESULT_H_
+#define ALIBABACLOUD_DEVOPS_RDC_MODEL_GETLASTWORKSPACERESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/devops-rdc/Devops_rdcExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Devops_rdc
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_DEVOPS_RDC_EXPORT GetLastWorkspaceResult : public ServiceResult
+			{
+			public:
+
+
+				GetLastWorkspaceResult();
+				explicit GetLastWorkspaceResult(const std::string &payload);
+				~GetLastWorkspaceResult();
+				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_GETLASTWORKSPACERESULT_H_

+ 7 - 2
devops-rdc/include/alibabacloud/devops-rdc/model/ListUserOrganizationResult.h

@@ -32,12 +32,17 @@ namespace AlibabaCloud
 			class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListUserOrganizationResult : public ServiceResult
 			{
 			public:
+				struct Organization
+				{
+					std::string id;
+					std::string name;
+				};
 
 
 				ListUserOrganizationResult();
 				explicit ListUserOrganizationResult(const std::string &payload);
 				~ListUserOrganizationResult();
-				std::string getObject()const;
+				std::vector<Organization> getObject()const;
 				std::string getErrorCode()const;
 				std::string getErrorMessage()const;
 				bool getSuccess()const;
@@ -45,7 +50,7 @@ namespace AlibabaCloud
 			protected:
 				void parse(const std::string &payload);
 			private:
-				std::string object_;
+				std::vector<Organization> object_;
 				std::string errorCode_;
 				std::string errorMessage_;
 				bool success_;

+ 36 - 0
devops-rdc/src/Devops-rdcClient.cc

@@ -915,6 +915,42 @@ Devops_rdcClient::GetDevopsProjectTaskInfoOutcomeCallable Devops_rdcClient::getD
 	return task->get_future();
 }
 
+Devops_rdcClient::GetLastWorkspaceOutcome Devops_rdcClient::getLastWorkspace(const GetLastWorkspaceRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return GetLastWorkspaceOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return GetLastWorkspaceOutcome(GetLastWorkspaceResult(outcome.result()));
+	else
+		return GetLastWorkspaceOutcome(outcome.error());
+}
+
+void Devops_rdcClient::getLastWorkspaceAsync(const GetLastWorkspaceRequest& request, const GetLastWorkspaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, getLastWorkspace(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+Devops_rdcClient::GetLastWorkspaceOutcomeCallable Devops_rdcClient::getLastWorkspaceCallable(const GetLastWorkspaceRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<GetLastWorkspaceOutcome()>>(
+			[this, request]()
+			{
+			return this->getLastWorkspace(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 Devops_rdcClient::GetPipelineInstHistoryOutcome Devops_rdcClient::getPipelineInstHistory(const GetPipelineInstHistoryRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 51 - 0
devops-rdc/src/model/GetLastWorkspaceRequest.cc

@@ -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/devops-rdc/model/GetLastWorkspaceRequest.h>
+
+using AlibabaCloud::Devops_rdc::Model::GetLastWorkspaceRequest;
+
+GetLastWorkspaceRequest::GetLastWorkspaceRequest() :
+	RpcServiceRequest("devops-rdc", "2020-03-03", "GetLastWorkspace")
+{
+	setMethod(HttpRequest::Method::Post);
+}
+
+GetLastWorkspaceRequest::~GetLastWorkspaceRequest()
+{}
+
+std::string GetLastWorkspaceRequest::getRealPk()const
+{
+	return realPk_;
+}
+
+void GetLastWorkspaceRequest::setRealPk(const std::string& realPk)
+{
+	realPk_ = realPk;
+	setBodyParameter("RealPk", realPk);
+}
+
+std::string GetLastWorkspaceRequest::getOrgId()const
+{
+	return orgId_;
+}
+
+void GetLastWorkspaceRequest::setOrgId(const std::string& orgId)
+{
+	orgId_ = orgId;
+	setBodyParameter("OrgId", orgId);
+}
+

+ 72 - 0
devops-rdc/src/model/GetLastWorkspaceResult.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 <alibabacloud/devops-rdc/model/GetLastWorkspaceResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Devops_rdc;
+using namespace AlibabaCloud::Devops_rdc::Model;
+
+GetLastWorkspaceResult::GetLastWorkspaceResult() :
+	ServiceResult()
+{}
+
+GetLastWorkspaceResult::GetLastWorkspaceResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+GetLastWorkspaceResult::~GetLastWorkspaceResult()
+{}
+
+void GetLastWorkspaceResult::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 GetLastWorkspaceResult::getObject()const
+{
+	return object_;
+}
+
+std::string GetLastWorkspaceResult::getErrorCode()const
+{
+	return errorCode_;
+}
+
+std::string GetLastWorkspaceResult::getErrorMessage()const
+{
+	return errorMessage_;
+}
+
+bool GetLastWorkspaceResult::getSuccess()const
+{
+	return success_;
+}
+

+ 13 - 5
devops-rdc/src/model/ListUserOrganizationResult.cc

@@ -39,18 +39,26 @@ void ListUserOrganizationResult::parse(const std::string &payload)
 	Json::Value value;
 	reader.parse(payload, value);
 	setRequestId(value["RequestId"].asString());
+	auto allObjectNode = value["Object"]["Organization"];
+	for (auto valueObjectOrganization : allObjectNode)
+	{
+		Organization objectObject;
+		if(!valueObjectOrganization["Name"].isNull())
+			objectObject.name = valueObjectOrganization["Name"].asString();
+		if(!valueObjectOrganization["Id"].isNull())
+			objectObject.id = valueObjectOrganization["Id"].asString();
+		object_.push_back(objectObject);
+	}
+	if(!value["Success"].isNull())
+		success_ = value["Success"].asString() == "true";
 	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
+std::vector<ListUserOrganizationResult::Organization> ListUserOrganizationResult::getObject()const
 {
 	return object_;
 }